fog-maestrodev 1.18.0.20131121075022 → 1.18.0.20131122203507
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/fog.gemspec +2 -2
- data/lib/fog/aws/models/auto_scaling/configuration.rb +1 -0
- data/lib/fog/aws/models/compute/flavors.rb +10 -0
- data/lib/fog/aws/models/glacier/vault.rb +1 -1
- data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +3 -0
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +1 -0
- data/lib/fog/aws/requests/dns/get_change.rb +1 -1
- data/lib/fog/aws/storage.rb +2 -1
- data/lib/fog/core/errors.rb +3 -3
- data/lib/fog/dreamhost/dns.rb +2 -4
- data/lib/fog/google/compute.rb +72 -62
- data/lib/fog/google/models/compute/zones.rb +1 -1
- data/lib/fog/google/requests/compute/delete_disk.rb +19 -2
- data/lib/fog/google/requests/compute/delete_server.rb +3 -3
- data/lib/fog/google/requests/compute/get_disk.rb +26 -2
- data/lib/fog/google/requests/compute/get_image.rb +3 -3
- data/lib/fog/google/requests/compute/get_server.rb +1 -0
- data/lib/fog/google/requests/compute/insert_disk.rb +37 -2
- data/lib/fog/google/requests/compute/insert_firewall.rb +2 -1
- data/lib/fog/google/requests/compute/insert_image.rb +1 -1
- data/lib/fog/google/requests/compute/insert_server.rb +31 -22
- data/lib/fog/google/requests/compute/list_disks.rb +8 -2
- data/lib/fog/google/requests/compute/list_images.rb +2 -2
- data/lib/fog/google/requests/compute/list_machine_types.rb +2 -2
- data/lib/fog/google/requests/compute/list_servers.rb +2 -2
- data/lib/fog/google/requests/compute/list_zone_operations.rb +1 -1
- data/lib/fog/google/requests/compute/list_zones.rb +1 -1
- data/lib/fog/hp.rb +1 -1
- data/lib/fog/hp/README.md +57 -0
- data/lib/fog/hp/articles/auth_caching.md +23 -0
- data/lib/fog/hp/docs/connect.md +152 -0
- data/lib/fog/hp/docs/install.md +133 -0
- data/lib/fog/hp/examples/block_storage.md +296 -0
- data/lib/fog/hp/examples/block_storage_v2.md +446 -0
- data/lib/fog/hp/examples/cdn.md +54 -0
- data/lib/fog/hp/examples/compute.md +794 -0
- data/lib/fog/hp/examples/compute_v2.md +848 -0
- data/lib/fog/hp/examples/getting_started_examples.md +30 -0
- data/lib/fog/hp/examples/networking.md +472 -0
- data/lib/fog/hp/examples/object_storage.md +387 -0
- data/lib/fog/json.rb +6 -3
- data/lib/fog/openstack/identity.rb +2 -3
- data/lib/fog/openstack/image.rb +1 -4
- data/lib/fog/openstack/metering.rb +1 -4
- data/lib/fog/openstack/network.rb +1 -3
- data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
- data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
- data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
- data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
- data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +2 -2
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +1 -1
- data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/volume.rb +1 -4
- data/lib/fog/rackspace/compute_v2.rb +1 -0
- data/lib/fog/rackspace/examples/queues/claim_messages.rb +60 -0
- data/lib/fog/rackspace/examples/queues/create_queue.rb +45 -0
- data/lib/fog/rackspace/examples/queues/delete_message.rb +72 -0
- data/lib/fog/rackspace/examples/queues/delete_queue.rb +53 -0
- data/lib/fog/rackspace/examples/queues/list_messages.rb +64 -0
- data/lib/fog/rackspace/examples/queues/post_message.rb +59 -0
- data/lib/fog/rackspace/models/queues/claim.rb +2 -0
- data/lib/fog/rackspace/models/queues/message.rb +5 -5
- data/lib/fog/rackspace/models/queues/queue.rb +1 -1
- data/lib/fog/rackspace/service.rb +1 -1
- data/lib/fog/riakcs.rb +2 -2
- data/lib/fog/riakcs/provisioning.rb +1 -3
- data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
- data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
- data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
- data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
- data/lib/fog/riakcs/usage.rb +0 -2
- data/lib/fog/vsphere/compute.rb +1 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +1 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +9 -8
- data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +19 -0
- data/lib/tasks/changelog_task.rb +0 -1
- data/tests/google/models/compute/disk_tests.rb +5 -0
- data/tests/google/models/compute/disks_tests.rb +5 -0
- data/tests/google/models/compute/server_tests.rb +3 -0
- data/tests/google/models/compute/servers_tests.rb +5 -0
- data/tests/google/requests/compute/disk_tests.rb +2 -1
- data/tests/google/requests/compute/firewall_tests.rb +1 -0
- data/tests/google/requests/compute/image_tests.rb +3 -0
- data/tests/google/requests/compute/network_tests.rb +1 -0
- data/tests/google/requests/compute/operation_tests.rb +1 -0
- data/tests/google/requests/compute/server_tests.rb +2 -3
- data/tests/google/requests/compute/zone_tests.rb +1 -6
- data/tests/helpers/mock_helper.rb +3 -4
- data/tests/rackspace/models/queues/message_tests.rb +16 -0
- data/tests/vsphere/requests/compute/set_vm_customvalue_tests.rb +21 -0
- metadata +29 -3
- data/lib/fog/hp/README_HP.rdoc +0 -61
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmY1YmUxY2NiMjM2MGNlMWY4YTliNTZlZWE3ZDU0ZTEzOWVhZDM3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmVlZDNlZTc5OTc0YjhmNGE1YzNhODU3OWUxZGNhZTAyZTFiYzYzZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDBlMzk5MGFlMGY2ZjY4ODRhY2U0YjE5MWUxNGY4MzJlNTE2ZTMzMjRmYTFj
|
10
|
+
MWY0OTMxN2QyYTMwMWNhYzI4NTA5NzU4OGQ1MzU0ZTYzNjhkZGViYmZiNDQw
|
11
|
+
OGI0MmI1ZTFmNWZiNGIwMWI5MGY3ZTk3ZTBkNDJkY2I1YWY1YTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWQ1MzI2OGMzNjkyOWJhYWU2OTk2MzRlMWQwMTY3ZDI2N2ZiMmZhZjUwN2Y1
|
14
|
+
NzE5NmZhMDhlYTE1YmJmMWUyZjgzOTQyY2JjN2U3YzE2YzY5ZWE3ZTI0MDlh
|
15
|
+
YmJlMDIwOTUzM2Y4YWU3NjY2MWY0NjE2MmI0NjdjMmMwMjVmMzU=
|
data/fog.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
## If your rubyforge_project name is different, then edit it and comment out
|
7
7
|
## the sub! line in the Rakefile
|
8
8
|
s.name = 'fog-maestrodev'
|
9
|
-
s.version = '1.18.0.
|
10
|
-
s.date = '2013-11-
|
9
|
+
s.version = '1.18.0.20131122203507'
|
10
|
+
s.date = '2013-11-22'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
13
13
|
## Make sure your summary is short. The description may be as long
|
@@ -7,6 +7,7 @@ module Fog
|
|
7
7
|
|
8
8
|
identity :id, :aliases => 'LaunchConfigurationName'
|
9
9
|
attribute :arn, :aliases => 'LaunchConfigurationARN'
|
10
|
+
attribute :associate_public_ip, :aliases => 'AssociatePublicIpAddress'
|
10
11
|
attribute :block_device_mappings, :aliases => 'BlockDeviceMappings'
|
11
12
|
attribute :created_at, :aliases => 'CreatedTime'
|
12
13
|
attribute :iam_instance_profile, :aliases => 'IamInstanceProfile'
|
@@ -16,6 +16,16 @@ module Fog
|
|
16
16
|
{ :bits => 32, :cores => 5, :disk => 350, :id => 'c1.medium', :name => 'High-CPU Medium', :ram => 1740.8},
|
17
17
|
{ :bits => 64, :cores => 20, :disk => 1690, :id => 'c1.xlarge', :name => 'High-CPU Extra Large', :ram => 7168},
|
18
18
|
|
19
|
+
{ :bits => 64, :cores => 7, :disk => 32, :id => 'c3.large', :name => 'C3 Large', :ram => 3750},
|
20
|
+
{ :bits => 64, :cores => 14, :disk => 80, :id => 'c3.xlarge', :name => 'C3 Extra Large', :ram => 7168},
|
21
|
+
{ :bits => 64, :cores => 28, :disk => 160, :id => 'c3.2xlarge', :name => 'C3 Double Extra Large', :ram => 15360},
|
22
|
+
{ :bits => 64, :cores => 55, :disk => 320, :id => 'c3.4xlarge', :name => 'C3 Quadruple Extra Large', :ram => 30720},
|
23
|
+
{ :bits => 64, :cores => 108, :disk => 640, :id => 'c3.8xlarge', :name => 'C3 Eight Extra Large', :ram => 61440},
|
24
|
+
|
25
|
+
{ :bits => 64, :cores => 26, :disk => 60, :id => 'g2.2xlarge', :name => 'GPU Double Extra Large', :ram => 15360},
|
26
|
+
|
27
|
+
{ :bits => 64, :cores => 35, :disk => 50331648, :id => 'hs1.8xlarge', :name => 'High Storage Eight Extra Large', :ram => 119808},
|
28
|
+
|
19
29
|
{ :bits => 64, :cores => 6.5, :disk => 420, :id => 'm2.xlarge', :name => 'High-Memory Extra Large', :ram => 17510.4},
|
20
30
|
{ :bits => 64, :cores => 13, :disk => 850, :id => 'm2.2xlarge', :name => 'High Memory Double Extra Large', :ram => 35020.8},
|
21
31
|
{ :bits => 64, :cores => 26, :disk => 1690, :id => 'm2.4xlarge', :name => 'High Memory Quadruple Extra Large', :ram => 70041.6},
|
@@ -72,6 +72,9 @@ module Fog
|
|
72
72
|
@launch_configuration[name] = value
|
73
73
|
when 'SpotPrice'
|
74
74
|
@launch_configuration[name] = value.to_f
|
75
|
+
|
76
|
+
when 'AssociatePublicIpAddress'
|
77
|
+
@in_associate_public_ip = false
|
75
78
|
when 'BlockDeviceMappings'
|
76
79
|
@in_block_device_mappings = false
|
77
80
|
when 'LaunchConfigurations'
|
@@ -83,6 +83,7 @@ module Fog
|
|
83
83
|
raise Fog::AWS::AutoScaling::IdentifierTaken.new("Launch Configuration by this name already exists - A launch configuration already exists with the name #{launch_configuration_name}")
|
84
84
|
end
|
85
85
|
self.data[:launch_configurations][launch_configuration_name] = {
|
86
|
+
'AssociatePublicIpAddress' => nil,
|
86
87
|
'BlockDeviceMappings' => [],
|
87
88
|
'CreatedTime' => Time.now.utc,
|
88
89
|
'IamInstanceProfile' => nil,
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
response.body = {
|
48
48
|
'Id' => change[:id],
|
49
49
|
# set as insync after some time
|
50
|
-
'Status' => (submitted_at +
|
50
|
+
'Status' => (submitted_at + Fog::Mock.delay) < Time.now ? 'INSYNC' : change[:status],
|
51
51
|
'SubmittedAt' => change[:submitted_at]
|
52
52
|
}
|
53
53
|
response
|
data/lib/fog/aws/storage.rb
CHANGED
@@ -413,6 +413,8 @@ module Fog
|
|
413
413
|
@connection_options = options[:connection_options] || {}
|
414
414
|
@persistent = options.fetch(:persistent, false)
|
415
415
|
|
416
|
+
@path_style = options[:path_style] || false
|
417
|
+
|
416
418
|
if @endpoint = options[:endpoint]
|
417
419
|
endpoint = URI.parse(@endpoint)
|
418
420
|
@host = endpoint.host
|
@@ -423,7 +425,6 @@ module Fog
|
|
423
425
|
@host = options[:host] || region_to_host(@region)
|
424
426
|
@scheme = options[:scheme] || DEFAULT_SCHEME
|
425
427
|
@port = options[:port] || DEFAULT_SCHEME_PORT[@scheme]
|
426
|
-
@path_style = options[:path_style] || false
|
427
428
|
end
|
428
429
|
end
|
429
430
|
|
data/lib/fog/core/errors.rb
CHANGED
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
attr_accessor :verbose
|
6
6
|
|
7
7
|
def self.slurp(error, message = nil)
|
8
|
-
new_error = new(message)
|
8
|
+
new_error = new(message || error.message)
|
9
9
|
new_error.set_backtrace(error.backtrace)
|
10
10
|
new_error.verbose = error.message
|
11
11
|
new_error
|
@@ -17,9 +17,9 @@ module Fog
|
|
17
17
|
class NotFound < Fog::Errors::Error; end
|
18
18
|
|
19
19
|
class LoadError < LoadError; end
|
20
|
-
|
20
|
+
|
21
21
|
class TimeoutError< Fog::Errors::Error; end
|
22
|
-
|
22
|
+
|
23
23
|
class NotImplemented < Fog::Errors::Error; end
|
24
24
|
|
25
25
|
# @return [String] The error message that will be raised, if credentials cannot be found
|
data/lib/fog/dreamhost/dns.rb
CHANGED
@@ -47,8 +47,6 @@ module Fog
|
|
47
47
|
class Real
|
48
48
|
|
49
49
|
def initialize(options={})
|
50
|
-
require 'multi_json'
|
51
|
-
|
52
50
|
@dreamhost_api_key = options[:dreamhost_api_key]
|
53
51
|
if options[:dreamhost_url]
|
54
52
|
uri = URI.parse(options[:dreamhost_url])
|
@@ -68,12 +66,12 @@ module Fog
|
|
68
66
|
end
|
69
67
|
|
70
68
|
def request(params)
|
71
|
-
params[:query].merge!( { :key => @dreamhost_api_key,
|
69
|
+
params[:query].merge!( { :key => @dreamhost_api_key,
|
72
70
|
:format => 'json' } )
|
73
71
|
response = @connection.request(params)
|
74
72
|
|
75
73
|
unless response.body.empty?
|
76
|
-
response.body =
|
74
|
+
response.body = Fog::JSON.decode(response.body)
|
77
75
|
end
|
78
76
|
if response.body['result'] != 'success'
|
79
77
|
raise response.body['data']
|
data/lib/fog/google/compute.rb
CHANGED
@@ -66,16 +66,24 @@ module Fog
|
|
66
66
|
collection :zones
|
67
67
|
|
68
68
|
module Shared
|
69
|
-
attr_reader :project
|
69
|
+
attr_reader :project, :api_version
|
70
|
+
|
71
|
+
def shared_initialize(options = {})
|
72
|
+
@project = options[:google_project]
|
73
|
+
@api_version = 'v1beta16'
|
74
|
+
end
|
70
75
|
|
71
76
|
def build_excon_response(body)
|
72
77
|
response = Excon::Response.new
|
73
78
|
response.body = body
|
74
79
|
if response.body["error"]
|
75
80
|
response.status = response.body["error"]["code"]
|
76
|
-
|
77
|
-
response.
|
78
|
-
|
81
|
+
msg = response.body["error"]["errors"].map{|error| error["message"]}.join(", ")
|
82
|
+
case response.status
|
83
|
+
when 404
|
84
|
+
raise Fog::Errors::NotFound.new(msg)
|
85
|
+
else
|
86
|
+
raise Fog::Errors::Error.new(msg)
|
79
87
|
end
|
80
88
|
else
|
81
89
|
response.status = 200
|
@@ -98,6 +106,7 @@ module Fog
|
|
98
106
|
end
|
99
107
|
result
|
100
108
|
end
|
109
|
+
|
101
110
|
end
|
102
111
|
|
103
112
|
class Mock
|
@@ -105,7 +114,7 @@ module Fog
|
|
105
114
|
include Shared
|
106
115
|
|
107
116
|
def initialize(options={})
|
108
|
-
|
117
|
+
shared_initialize(options)
|
109
118
|
end
|
110
119
|
|
111
120
|
def build_response(params={})
|
@@ -113,7 +122,7 @@ module Fog
|
|
113
122
|
build_excon_response(body)
|
114
123
|
end
|
115
124
|
|
116
|
-
def self.data
|
125
|
+
def self.data(api_version)
|
117
126
|
@data ||= Hash.new do |hash, key|
|
118
127
|
case key
|
119
128
|
when 'google'
|
@@ -121,51 +130,51 @@ module Fog
|
|
121
130
|
:images => {
|
122
131
|
"centos-6-2-v20120621" => {
|
123
132
|
"kind" => "compute#image",
|
124
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
133
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/images/centos-6-2-v20120621",
|
125
134
|
"id" => "12920641029336858796",
|
126
135
|
"creationTimestamp" => "2012-06-21T22:59:56.392-07:00",
|
127
136
|
"name" => "centos-6-2-v20120621",
|
128
137
|
"description" => "CentOS 6.2; Created Thu, 21 Jun 2012 14:22:21 +0000",
|
129
138
|
"sourceType" => "RAW",
|
130
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
139
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-20120621",
|
131
140
|
"rawDisk" => {
|
132
141
|
"containerType" => "TAR",
|
133
142
|
"source" => ""
|
134
143
|
},
|
135
144
|
"deprecated" => {
|
136
145
|
"state" => "DELETED",
|
137
|
-
"replacement" => "https://www.googleapis.com/compute/
|
146
|
+
"replacement" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/images/centos-6-v20130104"
|
138
147
|
},
|
139
148
|
"status" => "READY"
|
140
149
|
},
|
141
150
|
"centos-6-v20120912" => {
|
142
151
|
"kind" => "compute#image",
|
143
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
152
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/images/centos-6-v20120912",
|
144
153
|
"id" => "12994279803511049620",
|
145
154
|
"creationTimestamp" => "2012-09-18T08:52:47.584-07:00",
|
146
155
|
"name" => "centos-6-v20120912",
|
147
156
|
"description" => "CentOS 6; Created Wed, 12 Sep 2012 00:00:00 +0000",
|
148
157
|
"sourceType" => "RAW",
|
149
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
158
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20120912",
|
150
159
|
"rawDisk" => {
|
151
160
|
"containerType" => "TAR",
|
152
161
|
"source" => ""
|
153
162
|
},
|
154
163
|
"deprecated" => {
|
155
164
|
"state" => "DEPRECATED",
|
156
|
-
"replacement" => "https://www.googleapis.com/compute/
|
165
|
+
"replacement" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/images/centos-6-v20130104"
|
157
166
|
},
|
158
167
|
"status" => "READY"
|
159
168
|
},
|
160
169
|
"centos-6-v20121106" => {
|
161
170
|
"kind" => "compute#image",
|
162
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
171
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/images/centos-6-v20121106",
|
163
172
|
"id" => "13037720516378381209",
|
164
173
|
"creationTimestamp" => "2012-11-09T11:40:41.079-08:00",
|
165
174
|
"name" => "centos-6-v20121106",
|
166
175
|
"description" => "SCSI-enabled CentOS 6; Created Tue, 06 Nov 2012 00:00:00 +0000",
|
167
176
|
"sourceType" => "RAW",
|
168
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
177
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20121106",
|
169
178
|
"rawDisk" => {
|
170
179
|
"containerType" => "TAR",
|
171
180
|
"source" => ""
|
@@ -179,13 +188,13 @@ module Fog
|
|
179
188
|
:images => {
|
180
189
|
"debian-6-squeeze-v20130816" => {
|
181
190
|
"kind" => "compute#image",
|
182
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
191
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/debian-cloud/global/images/debian-6-squeeze-v20130816",
|
183
192
|
"id" => "14841592146580482051",
|
184
193
|
"creationTimestamp" => "2013-09-04T13:21:53.292-07:00",
|
185
194
|
"name" => "debian-6-squeeze-v20130816",
|
186
195
|
"description" => "Debian GNU/Linux 6.0.7 (squeeze) built on 2013-08-16",
|
187
196
|
"sourceType" => "RAW",
|
188
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
197
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
|
189
198
|
"rawDisk" => {
|
190
199
|
"containerType" => "TAR",
|
191
200
|
"source" => ""
|
@@ -194,13 +203,13 @@ module Fog
|
|
194
203
|
},
|
195
204
|
"debian-7-wheezy-v20130816" => {
|
196
205
|
"kind" => "compute#image",
|
197
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
206
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/debian-cloud/global/images/debian-7-wheezy-v20130816",
|
198
207
|
"id" => "4213305957435180899",
|
199
208
|
"creationTimestamp" => "2013-09-04T13:24:30.479-07:00",
|
200
209
|
"name" => "debian-7-wheezy-v20130816",
|
201
210
|
"description" => "Debian GNU/Linux 7.1 (wheezy) built on 2013-08-16",
|
202
211
|
"sourceType" => "RAW",
|
203
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
212
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
|
204
213
|
"rawDisk" => {
|
205
214
|
"containerType" => "TAR",
|
206
215
|
"source" => ""
|
@@ -214,13 +223,13 @@ module Fog
|
|
214
223
|
:images => {
|
215
224
|
"centos-6-v20130813" => {
|
216
225
|
"kind" => "compute#image",
|
217
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
226
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/centos-cloud/global/images/centos-6-v20130813",
|
218
227
|
"id" => "4670523370938782739",
|
219
228
|
"creationTimestamp" => "2013-08-19T11:56:47.004-07:00",
|
220
229
|
"name" => "centos-6-v20130813",
|
221
230
|
"description" => "SCSI-enabled CentOS 6; Created Tue, 13 Aug 2013 00:00:00 +0000",
|
222
231
|
"sourceType" => "RAW",
|
223
|
-
"preferredKernel" => "https://www.googleapis.com/compute/
|
232
|
+
"preferredKernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
|
224
233
|
"rawDisk" => {
|
225
234
|
"containerType" => "TAR",
|
226
235
|
"source" => ""
|
@@ -236,17 +245,17 @@ module Fog
|
|
236
245
|
"kind" => "compute#instance",
|
237
246
|
"id" => "1361932147851415727",
|
238
247
|
"creationTimestamp" => "2013-09-26T04:55:43.881-07:00",
|
239
|
-
"zone" => "https://www.googleapis.com/compute/
|
248
|
+
"zone" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central1-a",
|
240
249
|
"status" => "RUNNING",
|
241
250
|
"name" => "fog-1380196541",
|
242
251
|
"tags" => { "fingerprint" => "42WmSpB8rSM=" },
|
243
|
-
"machineType" => "https://www.googleapis.com/compute/
|
244
|
-
"image" => "https://www.googleapis.com/compute/
|
245
|
-
"kernel" => "https://www.googleapis.com/compute/
|
252
|
+
"machineType" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central1-a/machineTypes/n1-standard-1",
|
253
|
+
"image" => "https://www.googleapis.com/compute/#{api_version}/projects/centos-cloud/global/images/centos-6-v20130813",
|
254
|
+
"kernel" => "https://www.googleapis.com/compute/#{api_version}/projects/google/global/kernels/gce-v20130813",
|
246
255
|
"canIpForward" => false,
|
247
256
|
"networkInterfaces" => [
|
248
257
|
{
|
249
|
-
"network" => "https://www.googleapis.com/compute/
|
258
|
+
"network" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/global/networks/default",
|
250
259
|
"networkIP" => "10.240.121.54",
|
251
260
|
"name" => "nic0",
|
252
261
|
"accessConfigs" => [
|
@@ -277,13 +286,13 @@ module Fog
|
|
277
286
|
}
|
278
287
|
]
|
279
288
|
},
|
280
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
289
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central1-a/instances/fog-1380196541"
|
281
290
|
}
|
282
291
|
},
|
283
292
|
:zones => {
|
284
293
|
"europe-west1-a" => {
|
285
294
|
"kind" => "compute#zone",
|
286
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
295
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/europe-west1-a",
|
287
296
|
"id" => "10419676573632995924",
|
288
297
|
"creationTimestamp" => "2013-09-26T02:56:13.115-07:00",
|
289
298
|
"name" => "europe-west1-a",
|
@@ -303,27 +312,28 @@ module Fog
|
|
303
312
|
{"metric" => "DISKS", "limit" => 16.0, "usage" => 0.0},
|
304
313
|
{"metric" => "DISKS_TOTAL_GB", "limit" => 2048.0, "usage" => 0.0}
|
305
314
|
],
|
306
|
-
"region" => "https://www.googleapis.com/compute/
|
315
|
+
"region" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/regions/europe-west1"
|
307
316
|
},
|
308
317
|
"us-central1-a" => {
|
309
318
|
"kind" => "compute#zone",
|
310
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
319
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central1-a",
|
311
320
|
"id" => "6562457277909136262",
|
312
321
|
"creationTimestamp" => "2013-09-26T02:56:13.116-07:00",
|
313
322
|
"name" => "us-central1-a",
|
314
323
|
"description" => "us-central1-a",
|
315
324
|
"status" => "UP",
|
325
|
+
"maintenanceWindows" => nil,
|
316
326
|
"quotas" => [
|
317
327
|
{"metric" => "INSTANCES", "limit" => 16.0, "usage" => 1.0},
|
318
328
|
{"metric" => "CPUS", "limit" => 24.0, "usage" => 1.0},
|
319
329
|
{"metric" => "DISKS", "limit" => 16.0, "usage" => 0.0},
|
320
330
|
{"metric" => "DISKS_TOTAL_GB", "limit" => 2048.0, "usage" => 0.0}
|
321
331
|
],
|
322
|
-
"region" => "https://www.googleapis.com/compute/
|
332
|
+
"region" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/regions/us-central1"
|
323
333
|
},
|
324
334
|
"us-central1-b" => {
|
325
335
|
"kind" => "compute#zone",
|
326
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
336
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central1-b",
|
327
337
|
"id" => "8701502109626061015",
|
328
338
|
"creationTimestamp" => "2013-09-26T02:56:13.124-07:00",
|
329
339
|
"name" => "us-central1-b",
|
@@ -339,11 +349,11 @@ module Fog
|
|
339
349
|
{"metric" => "DISKS", "limit" => 16.0, "usage" => 0.0},
|
340
350
|
{"metric" => "DISKS_TOTAL_GB", "limit" => 2048.0, "usage" => 0.0}
|
341
351
|
],
|
342
|
-
"region" => "https://www.googleapis.com/compute/
|
352
|
+
"region" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/regions/us-central1"
|
343
353
|
},
|
344
354
|
"us-central2-a" => {
|
345
355
|
"kind" => "compute#zone",
|
346
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
356
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/us-central2-a",
|
347
357
|
"id" => "13611654493253680292",
|
348
358
|
"creationTimestamp" => "2013-09-26T02:56:13.125-07:00",
|
349
359
|
"name" => "us-central2-a",
|
@@ -363,7 +373,7 @@ module Fog
|
|
363
373
|
{"metric" => "DISKS", "limit" => 16.0, "usage" => 0.0},
|
364
374
|
{"metric" => "DISKS_TOTAL_GB", "limit" => 2048.0, "usage" => 0.0}
|
365
375
|
],
|
366
|
-
"region" => "https://www.googleapis.com/compute/
|
376
|
+
"region" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/regions/us-central2"
|
367
377
|
}
|
368
378
|
},
|
369
379
|
:machine_types => Hash.new do |machine_types_hash, zone|
|
@@ -380,7 +390,7 @@ module Fog
|
|
380
390
|
"maximumPersistentDisks" => 4,
|
381
391
|
"maximumPersistentDisksSizeGb" => "3072",
|
382
392
|
"zone" => zone,
|
383
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
393
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/f1-micro"
|
384
394
|
},
|
385
395
|
"g1-small" => {
|
386
396
|
"kind" => "compute#machineType",
|
@@ -394,7 +404,7 @@ module Fog
|
|
394
404
|
"maximumPersistentDisks" => 4,
|
395
405
|
"maximumPersistentDisksSizeGb" => "3072",
|
396
406
|
"zone" => zone,
|
397
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
407
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/g1-small"
|
398
408
|
},
|
399
409
|
"n1-highcpu-2" => {
|
400
410
|
"kind" => "compute#machineType",
|
@@ -408,7 +418,7 @@ module Fog
|
|
408
418
|
"maximumPersistentDisks" => 16,
|
409
419
|
"maximumPersistentDisksSizeGb" => "10240",
|
410
420
|
"zone" => zone,
|
411
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
421
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-2"
|
412
422
|
},
|
413
423
|
"n1-highcpu-2-d" => {
|
414
424
|
"kind" => "compute#machineType",
|
@@ -427,7 +437,7 @@ module Fog
|
|
427
437
|
"maximumPersistentDisks" => 16,
|
428
438
|
"maximumPersistentDisksSizeGb" => "10240",
|
429
439
|
"zone" => zone,
|
430
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
440
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-2-d"
|
431
441
|
},
|
432
442
|
"n1-highcpu-4" => {
|
433
443
|
"kind" => "compute#machineType",
|
@@ -441,7 +451,7 @@ module Fog
|
|
441
451
|
"maximumPersistentDisks" => 16,
|
442
452
|
"maximumPersistentDisksSizeGb" => "10240",
|
443
453
|
"zone" => zone,
|
444
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
454
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-4"
|
445
455
|
},
|
446
456
|
"n1-highcpu-4-d" => {
|
447
457
|
"kind" => "compute#machineType",
|
@@ -460,7 +470,7 @@ module Fog
|
|
460
470
|
"maximumPersistentDisks" => 16,
|
461
471
|
"maximumPersistentDisksSizeGb" => "10240",
|
462
472
|
"zone" => zone,
|
463
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
473
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-4-d"
|
464
474
|
},
|
465
475
|
"n1-highcpu-8" => {
|
466
476
|
"kind" => "compute#machineType",
|
@@ -474,7 +484,7 @@ module Fog
|
|
474
484
|
"maximumPersistentDisks" => 16,
|
475
485
|
"maximumPersistentDisksSizeGb" => "10240",
|
476
486
|
"zone" => zone,
|
477
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
487
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-8"
|
478
488
|
},
|
479
489
|
"n1-highcpu-8-d" => {
|
480
490
|
"kind" => "compute#machineType",
|
@@ -496,7 +506,7 @@ module Fog
|
|
496
506
|
"maximumPersistentDisks" => 16,
|
497
507
|
"maximumPersistentDisksSizeGb" => "10240",
|
498
508
|
"zone" => zone,
|
499
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
509
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highcpu-8-d"
|
500
510
|
},
|
501
511
|
"n1-highmem-2" => {
|
502
512
|
"kind" => "compute#machineType",
|
@@ -510,7 +520,7 @@ module Fog
|
|
510
520
|
"maximumPersistentDisks" => 16,
|
511
521
|
"maximumPersistentDisksSizeGb" => "10240",
|
512
522
|
"zone" => zone,
|
513
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
523
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-2"
|
514
524
|
},
|
515
525
|
"n1-highmem-2-d" => {
|
516
526
|
"kind" => "compute#machineType",
|
@@ -529,7 +539,7 @@ module Fog
|
|
529
539
|
"maximumPersistentDisks" => 16,
|
530
540
|
"maximumPersistentDisksSizeGb" => "10240",
|
531
541
|
"zone" => zone,
|
532
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
542
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-2-d"
|
533
543
|
},
|
534
544
|
"n1-highmem-4" => {
|
535
545
|
"kind" => "compute#machineType",
|
@@ -543,7 +553,7 @@ module Fog
|
|
543
553
|
"maximumPersistentDisks" => 16,
|
544
554
|
"maximumPersistentDisksSizeGb" => "10240",
|
545
555
|
"zone" => zone,
|
546
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
556
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-4"
|
547
557
|
},
|
548
558
|
"n1-highmem-4-d" => {
|
549
559
|
"kind" => "compute#machineType",
|
@@ -562,7 +572,7 @@ module Fog
|
|
562
572
|
"maximumPersistentDisks" => 16,
|
563
573
|
"maximumPersistentDisksSizeGb" => "10240",
|
564
574
|
"zone" => zone,
|
565
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
575
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-4-d"
|
566
576
|
},
|
567
577
|
"n1-highmem-8" => {
|
568
578
|
"kind" => "compute#machineType",
|
@@ -576,7 +586,7 @@ module Fog
|
|
576
586
|
"maximumPersistentDisks" => 16,
|
577
587
|
"maximumPersistentDisksSizeGb" => "10240",
|
578
588
|
"zone" => zone,
|
579
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
589
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-8"
|
580
590
|
},
|
581
591
|
"n1-highmem-8-d" => {
|
582
592
|
"kind" => "compute#machineType",
|
@@ -598,7 +608,7 @@ module Fog
|
|
598
608
|
"maximumPersistentDisks" => 16,
|
599
609
|
"maximumPersistentDisksSizeGb" => "10240",
|
600
610
|
"zone" => zone,
|
601
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
611
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-highmem-8-d"
|
602
612
|
},
|
603
613
|
"n1-standard-1" => {
|
604
614
|
"kind" => "compute#machineType",
|
@@ -612,7 +622,7 @@ module Fog
|
|
612
622
|
"maximumPersistentDisks" => 16,
|
613
623
|
"maximumPersistentDisksSizeGb" => "10240",
|
614
624
|
"zone" => zone,
|
615
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
625
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-1"
|
616
626
|
},
|
617
627
|
"n1-standard-1-d" => {
|
618
628
|
"kind" => "compute#machineType",
|
@@ -631,7 +641,7 @@ module Fog
|
|
631
641
|
"maximumPersistentDisks" => 16,
|
632
642
|
"maximumPersistentDisksSizeGb" => "10240",
|
633
643
|
"zone" => zone,
|
634
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
644
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-1-d"
|
635
645
|
},
|
636
646
|
"n1-standard-2" => {
|
637
647
|
"kind" => "compute#machineType",
|
@@ -645,7 +655,7 @@ module Fog
|
|
645
655
|
"maximumPersistentDisks" => 16,
|
646
656
|
"maximumPersistentDisksSizeGb" => "10240",
|
647
657
|
"zone" => zone,
|
648
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
658
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-2"
|
649
659
|
},
|
650
660
|
"n1-standard-2-d" => {
|
651
661
|
"kind" => "compute#machineType",
|
@@ -664,7 +674,7 @@ module Fog
|
|
664
674
|
"maximumPersistentDisks" => 16,
|
665
675
|
"maximumPersistentDisksSizeGb" => "10240",
|
666
676
|
"zone" => zone,
|
667
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
677
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-2-d"
|
668
678
|
},
|
669
679
|
"n1-standard-4" => {
|
670
680
|
"kind" => "compute#machineType",
|
@@ -678,7 +688,7 @@ module Fog
|
|
678
688
|
"maximumPersistentDisks" => 16,
|
679
689
|
"maximumPersistentDisksSizeGb" => "10240",
|
680
690
|
"zone" => zone,
|
681
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
691
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-4"
|
682
692
|
},
|
683
693
|
"n1-standard-4-d" => {
|
684
694
|
"kind" => "compute#machineType",
|
@@ -697,7 +707,7 @@ module Fog
|
|
697
707
|
"maximumPersistentDisks" => 16,
|
698
708
|
"maximumPersistentDisksSizeGb" => "10240",
|
699
709
|
"zone" => zone,
|
700
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
710
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-4-d"
|
701
711
|
},
|
702
712
|
"n1-standard-8" => {
|
703
713
|
"kind" => "compute#machineType",
|
@@ -711,7 +721,7 @@ module Fog
|
|
711
721
|
"maximumPersistentDisks" => 16,
|
712
722
|
"maximumPersistentDisksSizeGb" => "10240",
|
713
723
|
"zone" => zone,
|
714
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
724
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-8"
|
715
725
|
},
|
716
726
|
"n1-standard-8-d" => {
|
717
727
|
"kind" => "compute#machineType",
|
@@ -733,11 +743,12 @@ module Fog
|
|
733
743
|
"maximumPersistentDisks" => 16,
|
734
744
|
"maximumPersistentDisksSizeGb" => "10240",
|
735
745
|
"zone" => zone,
|
736
|
-
"selfLink" => "https://www.googleapis.com/compute/
|
746
|
+
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{key}/zones/#{zone}/machineTypes/n1-standard-8-d"
|
737
747
|
}
|
738
748
|
}
|
739
749
|
end,
|
740
|
-
:images => {}
|
750
|
+
:images => {},
|
751
|
+
:disks => {}
|
741
752
|
}
|
742
753
|
end
|
743
754
|
end
|
@@ -747,13 +758,13 @@ module Fog
|
|
747
758
|
@data = nil
|
748
759
|
end
|
749
760
|
|
750
|
-
def data
|
751
|
-
self.class.data[
|
761
|
+
def data(project = @project)
|
762
|
+
self.class.data(api_version)[project]
|
752
763
|
end
|
753
764
|
|
754
765
|
def reset_data
|
755
766
|
# not particularly useful because it deletes zones
|
756
|
-
self.class.data.delete(@project)
|
767
|
+
self.class.data(api_version).delete(@project)
|
757
768
|
end
|
758
769
|
|
759
770
|
end
|
@@ -764,10 +775,9 @@ module Fog
|
|
764
775
|
|
765
776
|
def initialize(options)
|
766
777
|
base_url = 'https://www.googleapis.com/compute/'
|
767
|
-
api_version = 'v1beta16'
|
768
778
|
api_scope_url = 'https://www.googleapis.com/auth/compute'
|
779
|
+
shared_initialize(options)
|
769
780
|
|
770
|
-
@project = options[:google_project]
|
771
781
|
google_client_email = options[:google_client_email]
|
772
782
|
@api_url = base_url + api_version + '/projects/'
|
773
783
|
|