fog-sakuracloud 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44007b32b6e17b0fe4a28c84c57bc4e8848b4da6
4
- data.tar.gz: f091a5cfcd6e290c829dc31502dd3a146bb8c31c
3
+ metadata.gz: c18a6120741137db78a06d626e5a28d3703cdf1d
4
+ data.tar.gz: 025fdbc626abf29dcfb0041c61eca9644dd416b2
5
5
  SHA512:
6
- metadata.gz: fa9b69bdb76aabcec1945c580ec77bd267562473309101a5920978dc1177df88a032f455dff0fad173918cec77f854efb079cbc1247177f69ce4a91db9c0baf7
7
- data.tar.gz: 386799b76c599ba970b03c7d91f3449beaa943775bb798827f0469792d8fa53a6a7cc907f69893ecd56e3f773fd08ac4923862cf829931a9d00604362b93412a
6
+ metadata.gz: 6993a0c02fc14eefbaada19360f0a7231a05e20540c9c8b73c6ae660c5a9441ffae15cd766b60065964d9cf49c771718bbdc6b0e21b1c450cee28214a8907740
7
+ data.tar.gz: af89f6fe9929c4165d3612ef95e7e7936b6d663ebc19a3cd5680c12cab0a8e6b1ccd6fa01483c80371b5d63fe67bf9e81497fc77bcff16f3ad5339bb272c07bc
@@ -1,5 +1,9 @@
1
1
  # Changelog of fog-sakuracloud
2
2
 
3
+ ## v1.5.1
4
+
5
+ - Feature: Add monitor to Router model PR #20 HT: @miyukki
6
+
3
7
  ## v1.5.0
4
8
 
5
9
  - Feature: # Add new option api_zone to Provider to select zone easily.
@@ -32,6 +32,10 @@ module Fog
32
32
  true
33
33
  end
34
34
 
35
+ def collect_monitor
36
+ service.collect_monitor_router(identity).body["Data"]
37
+ end
38
+
35
39
  def router_available?(network, router_id)
36
40
  until network.switches.find {|r| r.internet != nil && r.internet["ID"] == router_id}
37
41
  print '.'
@@ -18,6 +18,7 @@ module Fog
18
18
  request :list_routers
19
19
  request :create_router
20
20
  request :delete_router
21
+ request :collect_monitor_router
21
22
  request :list_switches
22
23
  request :create_switch
23
24
  request :delete_switch
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ module Fog
4
+ module Network
5
+ class SakuraCloud
6
+ class Real
7
+ def collect_monitor_router( id )
8
+ request(
9
+ :headers => {
10
+ 'Authorization' => "Basic #{@auth_encode}"
11
+ },
12
+ :expects => [200],
13
+ :method => 'GET',
14
+ :path => "#{Fog::SakuraCloud.build_endpoint(@api_zone)}/internet/#{id}/monitor"
15
+ )
16
+ end
17
+ end # Real
18
+
19
+ class Mock
20
+ def collect_monitor_router( id )
21
+ response = Excon::Response.new
22
+ response.status = 200
23
+ response.body = {
24
+ "Data"=>{
25
+ "2015-12-16T18:00:00+09:00"=>{
26
+ "In"=>500000,
27
+ "Out"=>70000000
28
+ }
29
+ },
30
+ "is_ok"=>true
31
+ }
32
+ response
33
+ end
34
+ end # Mock
35
+ end # SakuraCloud
36
+ end # Network
37
+ end # Fog
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Sakuracloud
3
- VERSION = "1.5.0"
3
+ VERSION = "1.5.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-sakuracloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -251,6 +251,7 @@ files:
251
251
  - lib/fog/sakuracloud/requests/dns/delete_zone.rb
252
252
  - lib/fog/sakuracloud/requests/dns/list_zones.rb
253
253
  - lib/fog/sakuracloud/requests/dns/modify_zone.rb
254
+ - lib/fog/sakuracloud/requests/network/collect_monitor_router.rb
254
255
  - lib/fog/sakuracloud/requests/network/connect_interface_to_switch.rb
255
256
  - lib/fog/sakuracloud/requests/network/create_router.rb
256
257
  - lib/fog/sakuracloud/requests/network/create_switch.rb