fog-sakuracloud 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c18a6120741137db78a06d626e5a28d3703cdf1d
|
4
|
+
data.tar.gz: 025fdbc626abf29dcfb0041c61eca9644dd416b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6993a0c02fc14eefbaada19360f0a7231a05e20540c9c8b73c6ae660c5a9441ffae15cd766b60065964d9cf49c771718bbdc6b0e21b1c450cee28214a8907740
|
7
|
+
data.tar.gz: af89f6fe9929c4165d3612ef95e7e7936b6d663ebc19a3cd5680c12cab0a8e6b1ccd6fa01483c80371b5d63fe67bf9e81497fc77bcff16f3ad5339bb272c07bc
|
data/CHANGELOG.md
CHANGED
@@ -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 '.'
|
@@ -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
|
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.
|
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-
|
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
|