fog-google 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/google/compute.rb +0 -13
- data/lib/fog/google/version.rb +1 -1
- metadata +3 -17
- data/lib/fog/google/models/compute/resource_view.rb +0 -116
- data/lib/fog/google/models/compute/resource_views.rb +0 -57
- data/lib/fog/google/requests/compute/add_region_view_resources.rb +0 -27
- data/lib/fog/google/requests/compute/add_zone_view_resources.rb +0 -27
- data/lib/fog/google/requests/compute/delete_region_view.rb +0 -24
- data/lib/fog/google/requests/compute/delete_zone_view.rb +0 -24
- data/lib/fog/google/requests/compute/get_region_view.rb +0 -24
- data/lib/fog/google/requests/compute/get_zone_view.rb +0 -24
- data/lib/fog/google/requests/compute/insert_region_view.rb +0 -25
- data/lib/fog/google/requests/compute/insert_zone_view.rb +0 -27
- data/lib/fog/google/requests/compute/list_region_view_resources.rb +0 -25
- data/lib/fog/google/requests/compute/list_region_views.rb +0 -23
- data/lib/fog/google/requests/compute/list_zone_view_resources.rb +0 -25
- data/lib/fog/google/requests/compute/list_zone_views.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51ec61f928f8668849b6efb20d68f275a6c675df
|
4
|
+
data.tar.gz: e18dd6d20414570bf59dda8953bcf9d96cd329b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa39d37f8dea272a61dd94efc7ddd22dcb6fe98ed2595b6936a30f563f679a5c539ac31b4549e334ef074173ed8343edba435daf0e2e9d0819418cfc799d757b
|
7
|
+
data.tar.gz: 3017357888faa9bbbb6c850f87db67c85fb72a041575df7eefcf1f69839ec1444d8dbf8861c966f03f93dd88f18fe44f5e30c76e5af44e4ba8d3adafebe9baa3
|
data/lib/fog/google/compute.rb
CHANGED
@@ -41,10 +41,6 @@ module Fog
|
|
41
41
|
request :list_global_forwarding_rules
|
42
42
|
request :list_url_maps
|
43
43
|
request :list_target_http_proxies
|
44
|
-
request :list_zone_views
|
45
|
-
request :list_region_views
|
46
|
-
request :list_region_view_resources
|
47
|
-
request :list_zone_view_resources
|
48
44
|
request :list_target_instances
|
49
45
|
request :list_aggregated_target_instances
|
50
46
|
request :list_instance_groups
|
@@ -76,8 +72,6 @@ module Fog
|
|
76
72
|
request :get_url_map
|
77
73
|
request :get_global_forwarding_rule
|
78
74
|
request :get_target_http_proxy
|
79
|
-
request :get_zone_view
|
80
|
-
request :get_region_view
|
81
75
|
request :get_target_instance
|
82
76
|
request :get_instance_group
|
83
77
|
|
@@ -99,8 +93,6 @@ module Fog
|
|
99
93
|
request :delete_url_map
|
100
94
|
request :delete_target_http_proxy
|
101
95
|
request :delete_global_forwarding_rule
|
102
|
-
request :delete_zone_view
|
103
|
-
request :delete_region_view
|
104
96
|
request :delete_target_instance
|
105
97
|
request :delete_instance_group
|
106
98
|
|
@@ -119,8 +111,6 @@ module Fog
|
|
119
111
|
request :insert_url_map
|
120
112
|
request :insert_target_http_proxy
|
121
113
|
request :insert_global_forwarding_rule
|
122
|
-
request :insert_zone_view
|
123
|
-
request :insert_region_view
|
124
114
|
request :insert_target_instance
|
125
115
|
request :insert_instance_group
|
126
116
|
|
@@ -135,8 +125,6 @@ module Fog
|
|
135
125
|
request :add_backend_service_backends
|
136
126
|
request :add_url_map_host_rules
|
137
127
|
request :add_url_map_path_matchers
|
138
|
-
request :add_zone_view_resources
|
139
|
-
request :add_region_view_resources
|
140
128
|
request :add_instance_group_instance
|
141
129
|
|
142
130
|
request :remove_target_pool_instances
|
@@ -1072,7 +1060,6 @@ module Fog
|
|
1072
1060
|
|
1073
1061
|
@client = initialize_google_client(options)
|
1074
1062
|
@compute = @client.discovered_api('compute', api_version)
|
1075
|
-
@resourceviews = @client.discovered_api('resourceviews', 'v1beta1')
|
1076
1063
|
@extra_global_projects = options[:google_extra_global_projects] || []
|
1077
1064
|
end
|
1078
1065
|
end
|
data/lib/fog/google/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Welch
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fog-core
|
@@ -268,8 +268,6 @@ files:
|
|
268
268
|
- lib/fog/google/models/compute/projects.rb
|
269
269
|
- lib/fog/google/models/compute/region.rb
|
270
270
|
- lib/fog/google/models/compute/regions.rb
|
271
|
-
- lib/fog/google/models/compute/resource_view.rb
|
272
|
-
- lib/fog/google/models/compute/resource_views.rb
|
273
271
|
- lib/fog/google/models/compute/route.rb
|
274
272
|
- lib/fog/google/models/compute/routes.rb
|
275
273
|
- lib/fog/google/models/compute/server.rb
|
@@ -327,13 +325,11 @@ files:
|
|
327
325
|
- lib/fog/google/parsers/storage/get_service.rb
|
328
326
|
- lib/fog/google/requests/compute/add_backend_service_backends.rb
|
329
327
|
- lib/fog/google/requests/compute/add_instance_group_instance.rb
|
330
|
-
- lib/fog/google/requests/compute/add_region_view_resources.rb
|
331
328
|
- lib/fog/google/requests/compute/add_server_access_config.rb
|
332
329
|
- lib/fog/google/requests/compute/add_target_pool_health_checks.rb
|
333
330
|
- lib/fog/google/requests/compute/add_target_pool_instances.rb
|
334
331
|
- lib/fog/google/requests/compute/add_url_map_host_rules.rb
|
335
332
|
- lib/fog/google/requests/compute/add_url_map_path_matchers.rb
|
336
|
-
- lib/fog/google/requests/compute/add_zone_view_resources.rb
|
337
333
|
- lib/fog/google/requests/compute/attach_disk.rb
|
338
334
|
- lib/fog/google/requests/compute/delete_address.rb
|
339
335
|
- lib/fog/google/requests/compute/delete_backend_service.rb
|
@@ -347,7 +343,6 @@ files:
|
|
347
343
|
- lib/fog/google/requests/compute/delete_instance_group.rb
|
348
344
|
- lib/fog/google/requests/compute/delete_network.rb
|
349
345
|
- lib/fog/google/requests/compute/delete_region_operation.rb
|
350
|
-
- lib/fog/google/requests/compute/delete_region_view.rb
|
351
346
|
- lib/fog/google/requests/compute/delete_route.rb
|
352
347
|
- lib/fog/google/requests/compute/delete_server.rb
|
353
348
|
- lib/fog/google/requests/compute/delete_server_access_config.rb
|
@@ -357,7 +352,6 @@ files:
|
|
357
352
|
- lib/fog/google/requests/compute/delete_target_pool.rb
|
358
353
|
- lib/fog/google/requests/compute/delete_url_map.rb
|
359
354
|
- lib/fog/google/requests/compute/delete_zone_operation.rb
|
360
|
-
- lib/fog/google/requests/compute/delete_zone_view.rb
|
361
355
|
- lib/fog/google/requests/compute/detach_disk.rb
|
362
356
|
- lib/fog/google/requests/compute/get_address.rb
|
363
357
|
- lib/fog/google/requests/compute/get_backend_service.rb
|
@@ -377,7 +371,6 @@ files:
|
|
377
371
|
- lib/fog/google/requests/compute/get_project.rb
|
378
372
|
- lib/fog/google/requests/compute/get_region.rb
|
379
373
|
- lib/fog/google/requests/compute/get_region_operation.rb
|
380
|
-
- lib/fog/google/requests/compute/get_region_view.rb
|
381
374
|
- lib/fog/google/requests/compute/get_route.rb
|
382
375
|
- lib/fog/google/requests/compute/get_server.rb
|
383
376
|
- lib/fog/google/requests/compute/get_server_serial_port_output.rb
|
@@ -389,7 +382,6 @@ files:
|
|
389
382
|
- lib/fog/google/requests/compute/get_url_map.rb
|
390
383
|
- lib/fog/google/requests/compute/get_zone.rb
|
391
384
|
- lib/fog/google/requests/compute/get_zone_operation.rb
|
392
|
-
- lib/fog/google/requests/compute/get_zone_view.rb
|
393
385
|
- lib/fog/google/requests/compute/insert_address.rb
|
394
386
|
- lib/fog/google/requests/compute/insert_backend_service.rb
|
395
387
|
- lib/fog/google/requests/compute/insert_disk.rb
|
@@ -400,7 +392,6 @@ files:
|
|
400
392
|
- lib/fog/google/requests/compute/insert_image.rb
|
401
393
|
- lib/fog/google/requests/compute/insert_instance_group.rb
|
402
394
|
- lib/fog/google/requests/compute/insert_network.rb
|
403
|
-
- lib/fog/google/requests/compute/insert_region_view.rb
|
404
395
|
- lib/fog/google/requests/compute/insert_route.rb
|
405
396
|
- lib/fog/google/requests/compute/insert_server.rb
|
406
397
|
- lib/fog/google/requests/compute/insert_snapshot.rb
|
@@ -408,7 +399,6 @@ files:
|
|
408
399
|
- lib/fog/google/requests/compute/insert_target_instance.rb
|
409
400
|
- lib/fog/google/requests/compute/insert_target_pool.rb
|
410
401
|
- lib/fog/google/requests/compute/insert_url_map.rb
|
411
|
-
- lib/fog/google/requests/compute/insert_zone_view.rb
|
412
402
|
- lib/fog/google/requests/compute/list_addresses.rb
|
413
403
|
- lib/fog/google/requests/compute/list_aggregated_addresses.rb
|
414
404
|
- lib/fog/google/requests/compute/list_aggregated_disk_types.rb
|
@@ -431,8 +421,6 @@ files:
|
|
431
421
|
- lib/fog/google/requests/compute/list_machine_types.rb
|
432
422
|
- lib/fog/google/requests/compute/list_networks.rb
|
433
423
|
- lib/fog/google/requests/compute/list_region_operations.rb
|
434
|
-
- lib/fog/google/requests/compute/list_region_view_resources.rb
|
435
|
-
- lib/fog/google/requests/compute/list_region_views.rb
|
436
424
|
- lib/fog/google/requests/compute/list_regions.rb
|
437
425
|
- lib/fog/google/requests/compute/list_routes.rb
|
438
426
|
- lib/fog/google/requests/compute/list_servers.rb
|
@@ -442,8 +430,6 @@ files:
|
|
442
430
|
- lib/fog/google/requests/compute/list_target_pools.rb
|
443
431
|
- lib/fog/google/requests/compute/list_url_maps.rb
|
444
432
|
- lib/fog/google/requests/compute/list_zone_operations.rb
|
445
|
-
- lib/fog/google/requests/compute/list_zone_view_resources.rb
|
446
|
-
- lib/fog/google/requests/compute/list_zone_views.rb
|
447
433
|
- lib/fog/google/requests/compute/list_zones.rb
|
448
434
|
- lib/fog/google/requests/compute/remove_instance_group_instance.rb
|
449
435
|
- lib/fog/google/requests/compute/remove_target_pool_health_checks.rb
|
@@ -628,7 +614,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
628
614
|
version: '0'
|
629
615
|
requirements: []
|
630
616
|
rubyforge_project:
|
631
|
-
rubygems_version: 2.
|
617
|
+
rubygems_version: 2.5.2.2
|
632
618
|
signing_key:
|
633
619
|
specification_version: 4
|
634
620
|
summary: Module for the 'fog' gem to support Google.
|
@@ -1,116 +0,0 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
# the resource view model creates either a region view or zone view depending on which is parameter is passed
|
3
|
-
|
4
|
-
module Fog
|
5
|
-
module Compute
|
6
|
-
class Google
|
7
|
-
class ResourceView < Fog::Model
|
8
|
-
identity :name
|
9
|
-
|
10
|
-
attribute :kind, :aliases => 'kind'
|
11
|
-
attribute :self_link, :aliases => 'selfLink'
|
12
|
-
attribute :id, :aliases => 'id'
|
13
|
-
attribute :creation_timestamp, :aliases => 'creationTimestamp'
|
14
|
-
attribute :description, :aliases => 'description'
|
15
|
-
attribute :region, :aliases => "region" # string, required for region views
|
16
|
-
attribute :labels, :aliases => "labels" # array of hashes including 'key' and 'value' as keys
|
17
|
-
attribute :zone, :aliases => "zone" # string, required for zone views
|
18
|
-
attribute :last_modified, :aliases => "lastModified"
|
19
|
-
attribute :members, :aliases => "members" # array of members of resource view
|
20
|
-
attribute :num_members, :aliases => "numMemebers" # integer
|
21
|
-
|
22
|
-
def save
|
23
|
-
requires :name
|
24
|
-
labels ||= []
|
25
|
-
members ||= []
|
26
|
-
|
27
|
-
if region then
|
28
|
-
options = {
|
29
|
-
'description' => description,
|
30
|
-
'labels' => labels,
|
31
|
-
'lastModified' => last_modified,
|
32
|
-
'members' => members,
|
33
|
-
'numMembers' => num_members
|
34
|
-
}
|
35
|
-
@region = region
|
36
|
-
data = service.insert_region_view(name, region, options).body
|
37
|
-
operation = service.get_region_view(data['resource']['name'],nil, @region).body
|
38
|
-
end
|
39
|
-
|
40
|
-
if zone then
|
41
|
-
options = {
|
42
|
-
'description' => description,
|
43
|
-
'labels' => labels,
|
44
|
-
'lastModified' => last_modified,
|
45
|
-
'members' => members,
|
46
|
-
'numMembers' => num_members
|
47
|
-
}
|
48
|
-
@zone = zone
|
49
|
-
data = service.insert_zone_view(name, zone, options).body
|
50
|
-
operation = service.get_zone_view(data['resource']['name'], @zone).body
|
51
|
-
end
|
52
|
-
reload
|
53
|
-
end
|
54
|
-
|
55
|
-
def destroy(async=false)
|
56
|
-
requires :name
|
57
|
-
# parse the self link to get the zone or region
|
58
|
-
selflink = self.self_link.split('/')
|
59
|
-
if selflink[7]=='regions' then
|
60
|
-
operation = service.delete_region_view(name, selflink[8])
|
61
|
-
end
|
62
|
-
|
63
|
-
if selflink[7]== 'zones' then
|
64
|
-
operation= service.delete_zone_view(name, selflink[8])
|
65
|
-
end
|
66
|
-
|
67
|
-
if not async
|
68
|
-
# wait until "DONE" to ensure the operation doesn't fail, raises
|
69
|
-
# exception on error
|
70
|
-
Fog.wait_for do
|
71
|
-
operation.body == nil
|
72
|
-
end
|
73
|
-
end
|
74
|
-
operation
|
75
|
-
end
|
76
|
-
|
77
|
-
def add_resources resources
|
78
|
-
resources = [resources] unless resources.class == Array
|
79
|
-
resources.map { |resource| resource.class == String ? resource : resource.self_link }
|
80
|
-
if @zone then
|
81
|
-
service.add_zone_view_resources(self, resources, @zone)
|
82
|
-
end
|
83
|
-
if @region then
|
84
|
-
service.add_region_view_resources(self, reources, @region)
|
85
|
-
end
|
86
|
-
reload
|
87
|
-
end
|
88
|
-
|
89
|
-
def ready?
|
90
|
-
begin
|
91
|
-
if @zone then service.get_zone_view(self.name, @zone) end
|
92
|
-
if @region then service.get_region_view(self.name, @region) end
|
93
|
-
true
|
94
|
-
rescue Fog::Errors::NotFound
|
95
|
-
false
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def reload
|
100
|
-
requires :name
|
101
|
-
|
102
|
-
return unless data = begin
|
103
|
-
collection.get(name, region, zone)
|
104
|
-
rescue Excon::Errors::SocketError
|
105
|
-
nil
|
106
|
-
end
|
107
|
-
|
108
|
-
new_attributes = data.attributes
|
109
|
-
merge_attributes(new_attributes)
|
110
|
-
self
|
111
|
-
end
|
112
|
-
RUNNING_STATE = "READY"
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'fog/core/collection'
|
2
|
-
require 'fog/google/models/compute/resource_view'
|
3
|
-
|
4
|
-
module Fog
|
5
|
-
module Compute
|
6
|
-
class Google
|
7
|
-
class ResourceViews < Fog::Collection
|
8
|
-
model Fog::Compute::Google::ResourceView
|
9
|
-
|
10
|
-
def all(filters={})
|
11
|
-
if filters['region'].nil? && filters['zone'].nil?
|
12
|
-
data = []
|
13
|
-
service.list_regions.body['items'].each do |region|
|
14
|
-
data += service.list_region_views(region['name']).body['items'] || []
|
15
|
-
end
|
16
|
-
service.list_zones.body['items'].each do |zone|
|
17
|
-
data += service.list_zone_views(zone['name']).body['items'] || []
|
18
|
-
end
|
19
|
-
elsif filters['zone']
|
20
|
-
data = service.list_zone_views(filters['zone']).body['items'] || []
|
21
|
-
else
|
22
|
-
data = service.list_region_views(filters['region']).body['items'] || []
|
23
|
-
end
|
24
|
-
load(data)
|
25
|
-
end
|
26
|
-
|
27
|
-
def get(identity, region=nil, zone=nil)
|
28
|
-
response = nil
|
29
|
-
|
30
|
-
if region.nil? & zone.nil?
|
31
|
-
service.list_regions.body['items'].each do |region|
|
32
|
-
begin
|
33
|
-
response = service.get_region_view(identity, region['name'])
|
34
|
-
break if response.status == 200
|
35
|
-
rescue Fog::Errors::Error
|
36
|
-
end
|
37
|
-
end
|
38
|
-
service.list_zones.body['items'].each do |zone|
|
39
|
-
begin
|
40
|
-
response = service.get_zone_view(identity, zone['name'])
|
41
|
-
break if response.status == 200
|
42
|
-
rescue Fog::Errors::Error
|
43
|
-
end
|
44
|
-
end
|
45
|
-
elsif region
|
46
|
-
response = service.get_region_view(identity, region)
|
47
|
-
else
|
48
|
-
response = service.get_zone_view(identity, zone)
|
49
|
-
end
|
50
|
-
|
51
|
-
return nil if response.nil?
|
52
|
-
new(response.body)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def add_region_view_resources(region_view, resources)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def add_region_view_resources(region_view, resources, region)
|
12
|
-
api_method = @resourceviews.region_views.add_resources
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => region_view,
|
16
|
-
'region' => region
|
17
|
-
}
|
18
|
-
body = {
|
19
|
-
'resources' => resources
|
20
|
-
}
|
21
|
-
|
22
|
-
request(api_method, parameters, body_object=body)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def add_zone_view_resources(zone_view, resources)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def add_zone_view_resources(zone_view, resources, zone)
|
12
|
-
api_method = @resourceviews.zone_views.addresources
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => zone_view.name,
|
16
|
-
'zone' => zone
|
17
|
-
}
|
18
|
-
body = {
|
19
|
-
'resources' => resources
|
20
|
-
}
|
21
|
-
|
22
|
-
request(api_method, parameters, body_object=body)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def delete_region_view(region_view)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def delete_region_view(region_view, region)
|
12
|
-
api_method = @resourceviews.region_views.delete
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => region_view,
|
16
|
-
'region' => region
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def delete_zone_view(zone_view)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def delete_zone_view(zone_view, zone)
|
12
|
-
api_method = @resourceviews.zone_views.delete
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => zone_view,
|
16
|
-
'zone' => zone
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def get_region_view(region_view_name, region)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def get_region_view(region_view_name, region)
|
12
|
-
api_method = @resourceviews.region_views.get
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => region_view_name,
|
16
|
-
'region' => region
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def get_zone_view(zone_view)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def get_zone_view(zone_view_name, zone)
|
12
|
-
api_method = @resourceviews.zone_views.get
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'resourceViewName' => zone_view_name,
|
16
|
-
'zone' => zone
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def insert_region_view(region_view_name, region_name)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def insert_region_view(region_view_name, region_name, opts = {})
|
12
|
-
api_method = @resourceviews.region_views.insert
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'region' => region_name
|
16
|
-
}
|
17
|
-
body_object = { 'name' => region_view_name }
|
18
|
-
body_object.merge!(opts)
|
19
|
-
|
20
|
-
request(api_method, parameters, body_object=body_object)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def insert_zone_view(zone_view_name, zone_name)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def insert_zone_view(zone_view_name, zone_name, opts = {})
|
12
|
-
api_method = @resourceviews.zone_views.insert
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'zone' => zone_name
|
16
|
-
# 'zone' => zone_name
|
17
|
-
}
|
18
|
-
body_object = { 'name' => zone_view_name }
|
19
|
-
body_object.merge!(opts)
|
20
|
-
|
21
|
-
request(api_method, parameters, body_object=body_object)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def list_region_view_resources(region_view)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def list_region_view_resources(region_view)
|
12
|
-
api_method = @resourceviews.region_views.list_resources
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'region' => region_view.region,
|
16
|
-
'resourceViewName' => region_view.name
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def list_region_views(region_name)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def list_region_views(region_name)
|
12
|
-
api_method = @resourceviews.region_views.list
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'region' => region_name,
|
16
|
-
}
|
17
|
-
|
18
|
-
request(api_method, parameters)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def list_zone_view_resources(zone_view)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def list_zone_view_resources(zone_view)
|
12
|
-
api_method = @resourceviews.zone_views.list_resources
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'zone' => zone_view.zone,
|
16
|
-
'resourceViewName' => zone_view.name
|
17
|
-
}
|
18
|
-
|
19
|
-
request(api_method, parameters)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Google
|
4
|
-
class Mock
|
5
|
-
def list_zone_views(zone_name)
|
6
|
-
Fog::Mock.not_implemented
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
class Real
|
11
|
-
def list_zone_views(zone_name)
|
12
|
-
api_method = @resourceviews.zone_views.list
|
13
|
-
parameters = {
|
14
|
-
'projectName' => @project,
|
15
|
-
'zone' => zone_name,
|
16
|
-
}
|
17
|
-
|
18
|
-
request(api_method, parameters)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|