gapinc-fog 1.12.1.1 → 1.12.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -7
- data/bin/fog +22 -0
- data/fog.gemspec +1 -1
- data/lib/fog/aws.rb +11 -0
- data/lib/fog/aws/auto_scaling.rb +13 -18
- data/lib/fog/aws/beanstalk.rb +8 -10
- data/lib/fog/aws/cloud_formation.rb +9 -12
- data/lib/fog/aws/compute.rb +8 -10
- data/lib/fog/aws/credential_fetcher.rb +6 -6
- data/lib/fog/aws/elasticache.rb +13 -17
- data/lib/fog/aws/elb.rb +29 -31
- data/lib/fog/aws/iam.rb +10 -13
- data/lib/fog/aws/models/rds/server.rb +3 -1
- data/lib/fog/aws/models/rds/snapshot.rb +1 -0
- data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
- data/lib/fog/aws/parsers/ses/verify_domain_identity.rb +26 -0
- data/lib/fog/aws/rds.rb +19 -14
- data/lib/fog/aws/requests/compute/create_volume.rb +3 -3
- data/lib/fog/aws/requests/rds/create_db_instance.rb +3 -1
- data/lib/fog/aws/requests/ses/verify_domain_identity.rb +30 -0
- data/lib/fog/aws/ses.rb +1 -0
- data/lib/fog/aws/storage.rb +2 -1
- data/lib/fog/aws/sts.rb +9 -15
- data/lib/fog/core.rb +7 -2
- data/lib/fog/core/connection.rb +62 -29
- data/lib/fog/core/deprecated/connection.rb +24 -0
- data/lib/fog/core/parser.rb +1 -1
- data/lib/fog/google/compute.rb +31 -7
- data/lib/fog/google/models/compute/disk.rb +80 -0
- data/lib/fog/google/models/compute/disks.rb +28 -0
- data/lib/fog/google/models/compute/image.rb +36 -0
- data/lib/fog/google/models/compute/server.rb +46 -33
- data/lib/fog/google/models/compute/servers.rb +15 -8
- data/lib/fog/google/requests/compute/delete_server.rb +5 -2
- data/lib/fog/google/requests/compute/get_disk.rb +3 -0
- data/lib/fog/google/requests/compute/get_server.rb +7 -1
- data/lib/fog/google/requests/compute/insert_disk.rb +8 -2
- data/lib/fog/google/requests/compute/insert_server.rb +51 -22
- data/lib/fog/google/requests/compute/list_machine_types.rb +3 -2
- data/lib/fog/hp/storage.rb +26 -9
- data/lib/fog/{core/json.rb → json.rb} +13 -2
- data/lib/fog/openstack/models/compute/metadata.rb +1 -1
- data/lib/fog/openstack/models/image/images.rb +1 -1
- data/lib/fog/openstack/requests/compute/detach_volume.rb +2 -1
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +1 -1
- data/lib/fog/rackspace.rb +5 -0
- data/lib/fog/rackspace/block_storage.rb +13 -28
- data/lib/fog/rackspace/cdn.rb +10 -24
- data/lib/fog/rackspace/compute.rb +17 -45
- data/lib/fog/rackspace/compute_v2.rb +13 -33
- data/lib/fog/rackspace/databases.rb +13 -29
- data/lib/fog/rackspace/dns.rb +20 -22
- data/lib/fog/rackspace/identity.rb +10 -26
- data/lib/fog/rackspace/load_balancers.rb +13 -29
- data/lib/fog/rackspace/mock_data.rb +3 -3
- data/lib/fog/rackspace/models/compute/server.rb +1 -1
- data/lib/fog/rackspace/models/identity/users.rb +2 -2
- data/lib/fog/rackspace/models/storage/file.rb +1 -0
- data/lib/fog/rackspace/requests/storage/get_object.rb +3 -1
- data/lib/fog/rackspace/service.rb +43 -1
- data/lib/fog/rackspace/storage.rb +9 -31
- data/lib/fog/xenserver/compute.rb +2 -0
- data/lib/fog/xenserver/models/compute/server.rb +9 -7
- data/lib/fog/xenserver/requests/compute/snapshot_revert.rb +22 -0
- data/lib/fog/xenserver/requests/compute/snapshot_server.rb +22 -0
- data/lib/fog/xml.rb +21 -0
- data/lib/fog/xml/sax_parser_connection.rb +43 -0
- data/tests/aws/requests/compute/volume_tests.rb +3 -3
- data/tests/aws/requests/rds/helper.rb +1 -0
- data/tests/aws/requests/ses/verified_domain_identity_tests.rb +16 -0
- data/tests/core/connection_tests.rb +26 -0
- data/tests/helper.rb +9 -7
- data/tests/rackspace/block_storage_tests.rb +9 -0
- data/tests/rackspace/compute_tests.rb +9 -0
- data/tests/rackspace/compute_v2_tests.rb +9 -0
- data/tests/rackspace/databases_tests.rb +9 -0
- data/tests/rackspace/dns_tests.rb +9 -0
- data/tests/rackspace/helper.rb +12 -1
- data/tests/rackspace/identity_tests.rb +25 -0
- data/tests/rackspace/load_balancer_tests.rb +10 -0
- data/tests/rackspace/models/block_storage/volume_tests.rb +2 -2
- data/tests/rackspace/models/compute_v2/metadata_tests.rb +2 -2
- data/tests/rackspace/models/compute_v2/server_tests.rb +22 -21
- data/tests/rackspace/models/storage/file_tests.rb +22 -6
- data/tests/rackspace/rackspace_tests.rb +35 -0
- data/tests/rackspace/requests/block_storage/snapshot_tests.rb +2 -3
- data/tests/rackspace/requests/block_storage/volume_type_tests.rb +4 -11
- data/tests/rackspace/requests/compute_v2/address_tests.rb +1 -1
- data/tests/rackspace/requests/compute_v2/attachment_tests.rb +8 -9
- data/tests/rackspace/requests/compute_v2/flavor_tests.rb +1 -1
- data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -4
- data/tests/rackspace/requests/databases/database_tests.rb +23 -20
- data/tests/rackspace/requests/databases/user_tests.rb +6 -6
- data/tests/rackspace/requests/identity/user_tests.rb +4 -1
- data/tests/rackspace/requests/load_balancers/usage_tests.rb +4 -2
- data/tests/rackspace/service_tests.rb +83 -0
- data/tests/rackspace/storage_tests.rb +9 -0
- data/tests/xenserver/models/compute/server_tests.rb +11 -1
- metadata +19 -4
- data/tests/core/user_agent_tests.rb +0 -6
data/lib/fog/rackspace/dns.rb
CHANGED
@@ -6,6 +6,12 @@ module Fog
|
|
6
6
|
class Rackspace < Fog::Service
|
7
7
|
include Fog::Rackspace::Errors
|
8
8
|
|
9
|
+
class ServiceError < Fog::Rackspace::Errors::ServiceError; end
|
10
|
+
class InternalServerError < Fog::Rackspace::Errors::InternalServerError; end
|
11
|
+
class BadRequest < Fog::Rackspace::Errors::BadRequest; end
|
12
|
+
class Conflict < Fog::Rackspace::Errors::Conflict; end
|
13
|
+
class ServiceUnavailable < Fog::Rackspace::Errors::ServiceUnavailable; end
|
14
|
+
|
9
15
|
class CallbackError < Fog::Errors::Error
|
10
16
|
attr_reader :response, :message, :details
|
11
17
|
def initialize(response)
|
@@ -95,9 +101,6 @@ module Fog
|
|
95
101
|
|
96
102
|
deprecation_warnings(options)
|
97
103
|
|
98
|
-
@connection_options[:headers] ||= {}
|
99
|
-
@connection_options[:headers].merge!({ 'Content-Type' => 'application/json', 'X-Auth-Token' => auth_token })
|
100
|
-
|
101
104
|
@persistent = options[:persistent] || false
|
102
105
|
@connection = Fog::Connection.new(endpoint_uri.to_s, @persistent, @connection_options)
|
103
106
|
end
|
@@ -108,25 +111,22 @@ module Fog
|
|
108
111
|
|
109
112
|
private
|
110
113
|
|
111
|
-
def request(params)
|
112
|
-
#TODO - Unify code with other rackspace services
|
114
|
+
def request(params, parse_json = true, &block)
|
113
115
|
begin
|
114
|
-
|
115
|
-
:path => "#{endpoint_uri.path}/#{params[:path]}"
|
116
|
-
}))
|
117
|
-
rescue Excon::Errors::BadRequest => error
|
118
|
-
raise Fog::Rackspace::Errors::BadRequest.slurp error
|
119
|
-
rescue Excon::Errors::Conflict => error
|
120
|
-
raise Fog::Rackspace::Errors::Conflict.slurp error
|
116
|
+
super(params, parse_json, &block)
|
121
117
|
rescue Excon::Errors::NotFound => error
|
122
118
|
raise NotFound.slurp(error, region)
|
119
|
+
rescue Excon::Errors::BadRequest => error
|
120
|
+
raise BadRequest.slurp error
|
121
|
+
rescue Excon::Errors::InternalServerError => error
|
122
|
+
raise InternalServerError.slurp error
|
123
123
|
rescue Excon::Errors::ServiceUnavailable => error
|
124
|
-
raise
|
125
|
-
|
126
|
-
|
127
|
-
|
124
|
+
raise ServiceUnavailable.slurp error
|
125
|
+
rescue Excon::Errors::Conflict => error
|
126
|
+
raise Conflict.slurp error
|
127
|
+
rescue Excon::Errors::HTTPStatusError => error
|
128
|
+
raise ServiceError.slurp error
|
128
129
|
end
|
129
|
-
response
|
130
130
|
end
|
131
131
|
|
132
132
|
def array_to_query_string(arr)
|
@@ -164,15 +164,13 @@ module Fog
|
|
164
164
|
@auth_token = credentials['X-Auth-Token']
|
165
165
|
end
|
166
166
|
|
167
|
-
def authenticate
|
168
|
-
|
167
|
+
def authenticate(options={})
|
168
|
+
super({
|
169
169
|
:rackspace_api_key => @rackspace_api_key,
|
170
170
|
:rackspace_username => @rackspace_username,
|
171
171
|
:rackspace_auth_url => @rackspace_auth_url,
|
172
172
|
:connection_options => @connection_options
|
173
|
-
}
|
174
|
-
|
175
|
-
super(options)
|
173
|
+
})
|
176
174
|
end
|
177
175
|
end
|
178
176
|
end
|
@@ -3,6 +3,7 @@ require 'fog/rackspace'
|
|
3
3
|
module Fog
|
4
4
|
module Rackspace
|
5
5
|
class Identity < Fog::Service
|
6
|
+
|
6
7
|
US_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0'
|
7
8
|
UK_ENDPOINT = 'https://lon.identity.api.rackspacecloud.com/v2.0'
|
8
9
|
|
@@ -33,7 +34,7 @@ module Fog
|
|
33
34
|
request :update_user
|
34
35
|
request :delete_user
|
35
36
|
|
36
|
-
class Mock
|
37
|
+
class Mock < Fog::Rackspace::Service
|
37
38
|
attr_reader :service_catalog
|
38
39
|
|
39
40
|
def request
|
@@ -41,7 +42,7 @@ module Fog
|
|
41
42
|
end
|
42
43
|
end
|
43
44
|
|
44
|
-
class Real
|
45
|
+
class Real < Fog::Rackspace::Service
|
45
46
|
attr_reader :service_catalog, :auth_token
|
46
47
|
|
47
48
|
def initialize(options={})
|
@@ -50,36 +51,19 @@ module Fog
|
|
50
51
|
@rackspace_region = options[:rackspace_region]
|
51
52
|
@rackspace_auth_url = options[:rackspace_auth_url] || US_ENDPOINT
|
52
53
|
|
53
|
-
uri = URI.parse(@rackspace_auth_url)
|
54
|
-
@host = uri.host
|
55
|
-
@path = uri.path
|
56
|
-
@port = uri.port
|
57
|
-
@scheme = uri.scheme
|
54
|
+
@uri = URI.parse(@rackspace_auth_url)
|
55
|
+
@host = @uri.host
|
56
|
+
@path = @uri.path
|
57
|
+
@port = @uri.port
|
58
|
+
@scheme = @uri.scheme
|
58
59
|
@persistent = options[:persistent] || false
|
59
60
|
@connection_options = options[:connection_options] || {}
|
60
|
-
@connection = Fog::Connection.new(uri.to_s, @persistent, @connection_options)
|
61
|
+
@connection = Fog::Connection.new(@uri.to_s, @persistent, @connection_options)
|
61
62
|
|
62
63
|
authenticate
|
63
64
|
end
|
64
65
|
|
65
|
-
def
|
66
|
-
begin
|
67
|
-
parameters = params.merge!({
|
68
|
-
:headers => {
|
69
|
-
'Content-Type' => 'application/json',
|
70
|
-
'Accept' => 'application/json',
|
71
|
-
'X-Auth-Token' => @auth_token
|
72
|
-
},
|
73
|
-
:host => @host,
|
74
|
-
:path => "#{@path}/#{params[:path]}"
|
75
|
-
})
|
76
|
-
response = @connection.request(parameters)
|
77
|
-
response.body = Fog::JSON.decode(response.body) unless response.body.empty?
|
78
|
-
response
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
def authenticate
|
66
|
+
def authenticate(options={})
|
83
67
|
data = self.create_token(@rackspace_username, @rackspace_api_key).body
|
84
68
|
@service_catalog = ServiceCatalog.from_response(self, data)
|
85
69
|
@auth_token = data['access']['token']['id']
|
@@ -119,41 +119,25 @@ module Fog
|
|
119
119
|
@connection = Fog::Connection.new(endpoint_uri.to_s, @persistent, @connection_options)
|
120
120
|
end
|
121
121
|
|
122
|
-
def request(params)
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
:path => "#{endpoint_uri.path}/#{params[:path]}"
|
133
|
-
}))
|
134
|
-
rescue Excon::Errors::NotFound => error
|
135
|
-
raise NotFound.slurp(error, region)
|
136
|
-
rescue Excon::Errors::BadRequest => error
|
137
|
-
raise BadRequest.slurp error
|
138
|
-
rescue Excon::Errors::InternalServerError => error
|
139
|
-
raise InternalServerError.slurp error
|
140
|
-
rescue Excon::Errors::HTTPStatusError => error
|
141
|
-
raise ServiceError.slurp error
|
142
|
-
end
|
143
|
-
unless response.body.empty?
|
144
|
-
response.body = Fog::JSON.decode(response.body)
|
145
|
-
end
|
146
|
-
response
|
122
|
+
def request(params, parse_json = true, &block)
|
123
|
+
super(params, parse_json, &block)
|
124
|
+
rescue Excon::Errors::NotFound => error
|
125
|
+
raise NotFound.slurp(error, region)
|
126
|
+
rescue Excon::Errors::BadRequest => error
|
127
|
+
raise BadRequest.slurp error
|
128
|
+
rescue Excon::Errors::InternalServerError => error
|
129
|
+
raise InternalServerError.slurp error
|
130
|
+
rescue Excon::Errors::HTTPStatusError => error
|
131
|
+
raise ServiceError.slurp error
|
147
132
|
end
|
148
133
|
|
149
|
-
def authenticate
|
150
|
-
|
134
|
+
def authenticate(options={})
|
135
|
+
super({
|
151
136
|
:rackspace_api_key => @rackspace_api_key,
|
152
137
|
:rackspace_username => @rackspace_username,
|
153
138
|
:rackspace_auth_url => @rackspace_auth_url,
|
154
139
|
:connection_options => @connection_options
|
155
|
-
}
|
156
|
-
super(options)
|
140
|
+
})
|
157
141
|
end
|
158
142
|
|
159
143
|
def service_name
|
@@ -14,7 +14,7 @@ module Fog
|
|
14
14
|
network_id = Fog::Rackspace::MockData.uuid
|
15
15
|
|
16
16
|
flavor = {
|
17
|
-
"OS-FLV-
|
17
|
+
"OS-FLV-EXT-DATA:ephemeral" => 4,
|
18
18
|
"disk" => 20,
|
19
19
|
"id" => flavor_id,
|
20
20
|
"links" => [
|
@@ -89,8 +89,8 @@ module Fog
|
|
89
89
|
}
|
90
90
|
|
91
91
|
#Block Storage
|
92
|
-
volume_type1_id = Fog::Mock.random_numbers(3).
|
93
|
-
volume_type2_id = Fog::Mock.random_numbers(3).
|
92
|
+
volume_type1_id = Fog::Mock.random_numbers(3).to_s
|
93
|
+
volume_type2_id = Fog::Mock.random_numbers(3).to_s
|
94
94
|
|
95
95
|
volume_type1 = {
|
96
96
|
"id" => volume_type1_id,
|
@@ -18,7 +18,7 @@ module Fog
|
|
18
18
|
new(data)
|
19
19
|
rescue Excon::Errors::NotFound
|
20
20
|
nil
|
21
|
-
rescue Excon::Errors::
|
21
|
+
rescue Excon::Errors::Unauthorized
|
22
22
|
nil
|
23
23
|
end
|
24
24
|
|
@@ -27,7 +27,7 @@ module Fog
|
|
27
27
|
new(data)
|
28
28
|
rescue Excon::Errors::NotFound
|
29
29
|
nil
|
30
|
-
rescue Excon::Errors::
|
30
|
+
rescue Excon::Errors::Unauthorized
|
31
31
|
nil
|
32
32
|
end
|
33
33
|
end
|
@@ -227,6 +227,7 @@ module Fog
|
|
227
227
|
options['Access-Control-Allow-Origin'] = access_control_allow_origin if access_control_allow_origin
|
228
228
|
options['Origin'] = origin if origin
|
229
229
|
options['Content-Disposition'] = content_disposition if content_disposition
|
230
|
+
options['Etag'] = etag if etag
|
230
231
|
options.merge!(metadata.to_headers)
|
231
232
|
|
232
233
|
data = service.put_object(directory.key, key, body, options)
|
@@ -26,12 +26,54 @@ module Fog
|
|
26
26
|
@uri = URI.parse url
|
27
27
|
end
|
28
28
|
|
29
|
-
def authenticate(options)
|
29
|
+
def authenticate(options={})
|
30
30
|
self.send authentication_method, options
|
31
31
|
end
|
32
32
|
|
33
|
+
def request(params, parse_json = true, &block)
|
34
|
+
first_attempt = true
|
35
|
+
begin
|
36
|
+
response = @connection.request(request_params(params), &block)
|
37
|
+
rescue Excon::Errors::Unauthorized => error
|
38
|
+
raise error unless first_attempt
|
39
|
+
first_attempt = false
|
40
|
+
authenticate
|
41
|
+
retry
|
42
|
+
end
|
43
|
+
|
44
|
+
process_response(response) if parse_json
|
45
|
+
response
|
46
|
+
end
|
47
|
+
|
33
48
|
private
|
34
49
|
|
50
|
+
def process_response(response)
|
51
|
+
if response && response.body && response.body.is_a?(String) && Fog::Rackspace.json_response?(response)
|
52
|
+
begin
|
53
|
+
response.body = Fog::JSON.decode(response.body)
|
54
|
+
rescue MultiJson::DecodeError => e
|
55
|
+
Fog::Logger.warning("Error Parsing response json - #{e}")
|
56
|
+
response.body = {}
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def headers(options={})
|
62
|
+
h = {
|
63
|
+
'Content-Type' => 'application/json',
|
64
|
+
'Accept' => 'application/json',
|
65
|
+
'X-Auth-Token' => auth_token
|
66
|
+
}.merge(options[:headers] || {})
|
67
|
+
end
|
68
|
+
|
69
|
+
def request_params(params)
|
70
|
+
params.merge({
|
71
|
+
:headers => headers(params),
|
72
|
+
:host => endpoint_uri.host,
|
73
|
+
:path => "#{endpoint_uri.path}/#{params[:path]}"
|
74
|
+
})
|
75
|
+
end
|
76
|
+
|
35
77
|
def authentication_method
|
36
78
|
if v2_authentication?
|
37
79
|
:authenticate_v2
|
@@ -139,37 +139,15 @@ module Fog
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def request(params, parse_json = true, &block)
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
}), &block)
|
152
|
-
rescue Excon::Errors::Unauthorized => error
|
153
|
-
if error.response.body != 'Bad username or password' # token expiration
|
154
|
-
@rackspace_must_reauthenticate = true
|
155
|
-
authenticate
|
156
|
-
retry
|
157
|
-
else # bad credentials
|
158
|
-
raise error
|
159
|
-
end
|
160
|
-
rescue Excon::Errors::NotFound => error
|
161
|
-
raise NotFound.slurp(error, region)
|
162
|
-
rescue Excon::Errors::BadRequest => error
|
163
|
-
raise BadRequest.slurp error
|
164
|
-
rescue Excon::Errors::InternalServerError => error
|
165
|
-
raise InternalServerError.slurp error
|
166
|
-
rescue Excon::Errors::HTTPStatusError => error
|
167
|
-
raise ServiceError.slurp error
|
168
|
-
end
|
169
|
-
if !response.body.empty? && parse_json && response.headers['Content-Type'] =~ %r{application/json}
|
170
|
-
response.body = Fog::JSON.decode(response.body)
|
171
|
-
end
|
172
|
-
response
|
142
|
+
super(params, parse_json, &block)
|
143
|
+
rescue Excon::Errors::NotFound => error
|
144
|
+
raise NotFound.slurp(error, region)
|
145
|
+
rescue Excon::Errors::BadRequest => error
|
146
|
+
raise BadRequest.slurp error
|
147
|
+
rescue Excon::Errors::InternalServerError => error
|
148
|
+
raise InternalServerError.slurp error
|
149
|
+
rescue Excon::Errors::HTTPStatusError => error
|
150
|
+
raise ServiceError.slurp error
|
173
151
|
end
|
174
152
|
|
175
153
|
def service_net?
|
@@ -50,6 +50,7 @@ module Fog
|
|
50
50
|
attribute :hvm_boot_policy, :aliases => :HVM_boot_policy
|
51
51
|
attribute :hvm_boot_params, :aliases => :HVM_boot_params
|
52
52
|
attribute :pci_bus, :aliases => :PCI_bus
|
53
|
+
attribute :snapshots
|
53
54
|
|
54
55
|
def initialize(attributes={})
|
55
56
|
super
|
@@ -198,14 +199,15 @@ module Fog
|
|
198
199
|
service.provision_server reference
|
199
200
|
end
|
200
201
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
202
|
+
def snapshot(name)
|
203
|
+
service.snapshot_server(reference, name)
|
204
|
+
end
|
205
|
+
|
206
|
+
def revert(snapshot_ref)
|
207
|
+
service.snapshot_revert(snapshot_ref)
|
208
|
+
end
|
207
209
|
end
|
208
210
|
|
209
211
|
end
|
210
212
|
end
|
211
|
-
end
|
213
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
def snapshot_revert( snapshot_ref, extra_args = {})
|
8
|
+
@connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.revert'}, snapshot_ref)
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
class Mock
|
14
|
+
|
15
|
+
def snapshot_revert()
|
16
|
+
Fog::Mock.not_implemented
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
def snapshot_server( vm_ref , name, extra_args = {})
|
8
|
+
@connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.snapshot'}, vm_ref, name)
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
class Mock
|
14
|
+
|
15
|
+
def snapshot_server()
|
16
|
+
Fog::Mock.not_implemented
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|