fog-maestrodev 1.18.0.20131127194823 → 1.18.0.20131205181604
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 +8 -8
- data/README.md +27 -19
- data/fog.gemspec +3 -3
- data/lib/fog/aws/models/dns/records.rb +1 -3
- data/lib/fog/aws/models/rds/subnet_group.rb +15 -1
- data/lib/fog/aws/parsers/rds/delete_db_subnet_group.rb +35 -0
- data/lib/fog/aws/rds.rb +2 -1
- data/lib/fog/aws/requests/compute/create_route.rb +1 -1
- data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +7 -1
- data/lib/fog/aws/requests/rds/delete_db_subnet_group.rb +42 -0
- data/lib/fog/aws/storage.rb +4 -0
- data/lib/fog/google/models/storage/file.rb +1 -1
- data/lib/fog/google/models/storage/files.rb +1 -1
- data/lib/fog/google/requests/compute/insert_disk.rb +1 -1
- data/lib/fog/google/requests/compute/insert_image.rb +1 -1
- data/lib/fog/google/requests/compute/insert_server.rb +1 -1
- data/lib/fog/google/requests/storage/copy_object.rb +1 -1
- data/lib/fog/rackspace/models/queues/claim.rb +3 -1
- data/lib/fog/rackspace/models/queues/message.rb +0 -1
- data/lib/fog/vcloud_director/compute.rb +1 -0
- data/lib/fog/vcloud_director/generators/compute/vm.rb +33 -0
- data/lib/fog/vcloud_director/models/compute/medias.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/put_vm.rb +39 -0
- data/lib/fog/xenserver/requests/compute/reboot_server.rb +1 -1
- data/tests/aws/models/elb/model_tests.rb +4 -0
- data/tests/aws/requests/rds/{subnet_groups_test.rb → subnet_groups_tests.rb} +4 -0
- data/tests/vcloud_director/models/compute/media_tests.rb +18 -5
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjA5MTFmZDFkNDkyMDdjNWI3MWFjMmVlOTY3YzNhNTBmMjQxZDEwZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWUzMTY3YmI4YmViNTI0M2E5NDJhODE5YzlkYTc2OGZmOWYwMjVmMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2E4YTBiNDI0ZmZjYzBmNWJmZmEwNDk5MWQzNThiZTQxODg0MzlmMWRkZTBl
|
10
|
+
ZjFlN2FhNTY2NjZiMTMxMjY0ZjQ0ZDY3NzZmMTExNDBmYTBkOWJjYmRjMmZh
|
11
|
+
NTM4NGU4NDQ5NGM3Y2Y0YTE2Zjk0MGI1ODgwNjJlYjhmZTViZDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTBkMTI4MWE2ZDhkYzRhNWQyNDA4NTJmODFhMzk5N2YxZjg1NWMxMDBiOGU4
|
14
|
+
ZDIxMDgxMjM0MjhmZDg5MDAzZjhmOGUyMmI4ODkyOGQ4MzIyNmZlOGY4NDc5
|
15
|
+
NDg5OTJmMDZiOTJhNTMxMDkwODgyNDA3ZWRlMThlYzA3MGFlMjA=
|
data/README.md
CHANGED
@@ -42,7 +42,9 @@ vulnerabilities.
|
|
42
42
|
With this caveat, if you wish to bundle `fog` into your application on Ruby
|
43
43
|
1.8.7, you must add the following line to your `Gemfile`.
|
44
44
|
|
45
|
-
|
45
|
+
```ruby
|
46
|
+
gem 'nokogiri', '~>1.5.0'
|
47
|
+
```
|
46
48
|
|
47
49
|
Also, ensure that you are using LibXML version 2.8.0, since there is an
|
48
50
|
[issue with LibXML version 2.9.0][issue829] ([and 2.9.1][issue904]).
|
@@ -74,21 +76,23 @@ Collections share basic CRUD type operations, such as:
|
|
74
76
|
|
75
77
|
As an example, we'll try initializing and persisting a Rackspace Cloud server:
|
76
78
|
|
77
|
-
|
79
|
+
```ruby
|
80
|
+
require 'fog'
|
78
81
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
82
|
+
compute = Fog::Compute.new(
|
83
|
+
:provider => 'Rackspace',
|
84
|
+
:rackspace_api_key => key,
|
85
|
+
:rackspace_username => username
|
86
|
+
)
|
84
87
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
+
# boot a gentoo server (flavor 1 = 256, image 3 = gentoo 2008.0)
|
89
|
+
server = compute.servers.create(:flavor_id => 1, :image_id => 3, :name => 'my_server')
|
90
|
+
server.wait_for { ready? } # give server time to boot
|
88
91
|
|
89
|
-
|
92
|
+
# DO STUFF
|
90
93
|
|
91
|
-
|
94
|
+
server.destroy # cleanup after yourself or regret it, trust me
|
95
|
+
```
|
92
96
|
|
93
97
|
## Models
|
94
98
|
|
@@ -104,7 +108,9 @@ As you might imagine, testing code using Fog can be slow and expensive, constant
|
|
104
108
|
Mocking allows skipping this overhead by providing an in memory representation resources as you make requests.
|
105
109
|
Enabling mocking easy to use, before you run other commands, simply run:
|
106
110
|
|
107
|
-
|
111
|
+
```ruby
|
112
|
+
Fog.mock!
|
113
|
+
```
|
108
114
|
|
109
115
|
Then proceed as usual, if you run into unimplemented mocks, fog will raise an error and as always contributions are welcome!
|
110
116
|
|
@@ -126,13 +132,15 @@ It will return an [excon](http://github.com/geemus/excon) response, which has `b
|
|
126
132
|
Play around and use the console to explore or check out [fog.io](http://fog.io) and the [provider documentation](http://fog.io/about/provider_documentation.html)
|
127
133
|
for more details and examples. Once you are ready to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
|
128
134
|
|
129
|
-
|
130
|
-
|
131
|
-
|
135
|
+
```ruby
|
136
|
+
# create a compute connection
|
137
|
+
compute = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
|
138
|
+
# compute operations go here
|
132
139
|
|
133
|
-
|
134
|
-
|
135
|
-
|
140
|
+
# create a storage connection
|
141
|
+
storage = Fog::Storage.new(:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY)
|
142
|
+
# storage operations go here
|
143
|
+
```
|
136
144
|
|
137
145
|
geemus says: "That should give you everything you need to get started, but let me know if there is anything I can do to help!"
|
138
146
|
|
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-
|
9
|
+
s.version = '1.18.0.20131205181604'
|
10
|
+
s.date = '2013-12-05'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
13
13
|
## Make sure your summary is short. The description may be as long
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
## List your runtime dependencies here. Runtime dependencies are those
|
43
43
|
## that are needed for an end user to actually USE your code.
|
44
44
|
s.add_dependency('builder')
|
45
|
-
s.add_dependency('excon', '~>0.
|
45
|
+
s.add_dependency('excon', '~>0.30.0')
|
46
46
|
s.add_dependency('formatador', '~>0.2.0')
|
47
47
|
s.add_dependency('multi_json', '~>1.0')
|
48
48
|
s.add_dependency('mime-types')
|
@@ -33,9 +33,7 @@ module Fog
|
|
33
33
|
data['NextRecordIdentifier'] = nil unless data.has_key?('NextRecordIdentifier')
|
34
34
|
|
35
35
|
merge_attributes(data.reject {|key, value| !['IsTruncated', 'MaxItems', 'NextRecordName', 'NextRecordType', 'NextRecordIdentifier'].include?(key)})
|
36
|
-
|
37
|
-
data = data['ResourceRecordSets'].reject {|record| ['NS', 'SOA'].include?(record['Type'])}
|
38
|
-
load(data)
|
36
|
+
load(data['ResourceRecordSets'])
|
39
37
|
end
|
40
38
|
|
41
39
|
#
|
@@ -12,7 +12,21 @@ module Fog
|
|
12
12
|
attribute :vpc_id, :aliases => 'VpcId'
|
13
13
|
attribute :subnet_ids, :aliases => 'Subnets'
|
14
14
|
|
15
|
-
|
15
|
+
def ready?
|
16
|
+
requires :status
|
17
|
+
status == 'Complete'
|
18
|
+
end
|
19
|
+
|
20
|
+
def save
|
21
|
+
requires :description, :id, :subnet_ids
|
22
|
+
service.create_db_subnet_group(id, subnet_ids, description)
|
23
|
+
reload
|
24
|
+
end
|
25
|
+
|
26
|
+
def destroy
|
27
|
+
requires :id
|
28
|
+
service.delete_db_subnet_group(id)
|
29
|
+
end
|
16
30
|
|
17
31
|
end
|
18
32
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module RDS
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/rds/subnet_group_parser'
|
7
|
+
|
8
|
+
class DeleteDBSubnetGroup < Fog::Parsers::AWS::RDS::SubnetGroupParser
|
9
|
+
|
10
|
+
def reset
|
11
|
+
@response = { 'DeleteDBSubnetGroupResponse' => {}, 'ResponseMetadata' => {} }
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def start_element(name, attrs = [])
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def end_element(name)
|
20
|
+
case name
|
21
|
+
when 'RequestId'
|
22
|
+
@response['ResponseMetadata'][name] = value
|
23
|
+
else
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
data/lib/fog/aws/rds.rb
CHANGED
@@ -49,7 +49,8 @@ module Fog
|
|
49
49
|
|
50
50
|
request :create_db_subnet_group
|
51
51
|
request :describe_db_subnet_groups
|
52
|
-
|
52
|
+
request :delete_db_subnet_group
|
53
|
+
# TODO: :modify_db_subnet_group
|
53
54
|
|
54
55
|
request :describe_orderable_db_instance_options
|
55
56
|
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
# * RouteTableId<~String> - The ID of the route table for the route.
|
12
12
|
# * DestinationCidrBlock<~String> - The CIDR address block used for the destination match. Routing decisions are based on the most specific match.
|
13
13
|
# * GatewayId<~String> - The ID of an Internet gateway attached to your VPC.
|
14
|
-
# * InstanceId<~String> -
|
14
|
+
# * InstanceId<~String> - The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
|
15
15
|
# * NetworkInterfaceId<~String> - The ID of a network interface.
|
16
16
|
#
|
17
17
|
# === Returns
|
@@ -33,7 +33,13 @@ module Fog
|
|
33
33
|
raise Fog::AWS::RDS::IdentifierTaken.new("DBSubnetGroupAlreadyExists => The subnet group '#{name}' already exists")
|
34
34
|
end
|
35
35
|
|
36
|
-
|
36
|
+
# collection = Fog::Compute::AWS.new(:aws_access_key_id => 'mock key', :aws_secret_access_key => 'mock secret')
|
37
|
+
collection = Fog::Compute[:aws]
|
38
|
+
subnets = subnet_ids.map do |snid|
|
39
|
+
subnet = collection.subnets.get(snid)
|
40
|
+
raise Fog::AWS::RDS::NotFound.new("InvalidSubnet => The subnet '#{snid}' was not found") if subnet.nil?
|
41
|
+
subnet
|
42
|
+
end
|
37
43
|
vpc_id = subnets.first.vpc_id
|
38
44
|
|
39
45
|
data = {
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class RDS
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/rds/delete_db_subnet_group'
|
7
|
+
|
8
|
+
# Deletes a db subnet group
|
9
|
+
# http://docs.aws.amazon.com/AmazonRDS/2013-09-09/APIReference/API_DeleteDBSubnetGroup.html
|
10
|
+
# ==== Parameters
|
11
|
+
# * DBSubnetGroupName <~String> - The name for the DB Subnet Group. This value is stored as a lowercase string. Must contain no more than 255 alphanumeric characters or hyphens. Must not be "Default".
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
# * body<~Hash>:
|
15
|
+
def delete_db_subnet_group(name)
|
16
|
+
params = { 'Action' => 'DeleteDBSubnetGroup',
|
17
|
+
'DBSubnetGroupName' => name,
|
18
|
+
:parser => Fog::Parsers::AWS::RDS::DeleteDBSubnetGroup.new }
|
19
|
+
request(params)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
class Mock
|
25
|
+
|
26
|
+
def delete_db_subnet_group(name)
|
27
|
+
response = Excon::Response.new
|
28
|
+
unless self.data[:subnet_groups] && self.data[:subnet_groups][name]
|
29
|
+
raise Fog::AWS::RDS::NotFound.new("DBSubnetGroupNotFound => The subnet group '#{name}' doesn't exists")
|
30
|
+
end
|
31
|
+
|
32
|
+
response.body = {
|
33
|
+
'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id },
|
34
|
+
'return' => true,
|
35
|
+
}
|
36
|
+
response
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/fog/aws/storage.rb
CHANGED
@@ -140,6 +140,10 @@ module Fog
|
|
140
140
|
|
141
141
|
def signed_url(params, expires)
|
142
142
|
expires = expires.to_i
|
143
|
+
if @aws_session_token
|
144
|
+
params[:headers]||= {}
|
145
|
+
params[:headers]['x-amz-security-token'] = @aws_session_token
|
146
|
+
end
|
143
147
|
signature = signature(params, expires)
|
144
148
|
params = request_params(params)
|
145
149
|
|
@@ -121,7 +121,7 @@ module Fog
|
|
121
121
|
options['Content-MD5'] = content_md5 if content_md5
|
122
122
|
options['Content-Type'] = content_type if content_type
|
123
123
|
options['Expires'] = expires if expires
|
124
|
-
options.merge(metadata)
|
124
|
+
options.merge!(metadata)
|
125
125
|
|
126
126
|
data = service.put_object(directory.key, key, body, options)
|
127
127
|
merge_attributes(data.headers.reject {|key, value| ['Content-Length', 'Content-Type'].include?(key)})
|
@@ -179,7 +179,7 @@ module Fog
|
|
179
179
|
if options['kernel']
|
180
180
|
body_object['kernel'] = @api_url + "google/global/kernels/#{options.delete 'kernel'}"
|
181
181
|
end
|
182
|
-
body_object.merge!
|
182
|
+
body_object.merge!(options) # Adds in all remaining options that weren't explicitly handled.
|
183
183
|
|
184
184
|
result = self.build_result(api_method, parameters,
|
185
185
|
body_object=body_object)
|
@@ -26,7 +26,7 @@ module Fog
|
|
26
26
|
# * 'LastModified'<~Time> - date object was last modified
|
27
27
|
#
|
28
28
|
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
|
29
|
-
headers = { 'x-goog-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge
|
29
|
+
headers = { 'x-goog-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge(options)
|
30
30
|
request({
|
31
31
|
:expects => 200,
|
32
32
|
:headers => headers,
|
@@ -80,12 +80,14 @@ module Fog
|
|
80
80
|
})
|
81
81
|
attributes[:messages] = messages.collect do |message|
|
82
82
|
if message.instance_of? Fog::Rackspace::Queues::Message
|
83
|
+
message.claim_id = self.id
|
83
84
|
message
|
84
85
|
else
|
85
86
|
Fog::Rackspace::Queues::Message.new(
|
86
87
|
message.merge({
|
87
88
|
:service => service,
|
88
|
-
:collection => message_collection
|
89
|
+
:collection => message_collection,
|
90
|
+
:claim_id => self.id
|
89
91
|
}.merge(message))
|
90
92
|
)
|
91
93
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Generators
|
3
|
+
module Compute
|
4
|
+
module VcloudDirector
|
5
|
+
|
6
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VmType.html
|
7
|
+
class Vm
|
8
|
+
attr_reader :attrs
|
9
|
+
|
10
|
+
def initialize(attrs={})
|
11
|
+
@attrs = attrs
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_xml
|
15
|
+
attrs = @attrs
|
16
|
+
Nokogiri::XML::Builder.new do
|
17
|
+
Vm('xmlns' => 'http://www.vmware.com/vcloud/v1.5', 'name' => attrs[:name]) {
|
18
|
+
Description attrs[:Description] if attrs.key?(:Description)
|
19
|
+
if attrs.key?(:StorageProfile)
|
20
|
+
StorageProfile(
|
21
|
+
'type' => 'application/vnd.vmware.vcloud.vdcStorageProfile+xml',
|
22
|
+
'name' => attrs[:StorageProfile][:name],
|
23
|
+
'href' => attrs[:StorageProfile][:href]
|
24
|
+
)
|
25
|
+
end
|
26
|
+
}
|
27
|
+
end.to_xml
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
|
24
24
|
# Perhaps this would be better implemented as media#upload.
|
25
25
|
|
26
|
-
file = response.body[:Files][:File]
|
26
|
+
file = response.body[:Files][:File].first
|
27
27
|
file[:Link] = [file[:Link]] if file[:Link].is_a?(Hash)
|
28
28
|
link = file[:Link].detect {|l| l[:rel] == 'upload:default'}
|
29
29
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/generators/compute/vm'
|
7
|
+
|
8
|
+
# Update the name, description and storage profile for VM.
|
9
|
+
#
|
10
|
+
# This operation is asynchronous and returns a task that you can
|
11
|
+
# monitor to track the progress of the request.
|
12
|
+
#
|
13
|
+
# @param [String] id Object identifier of the VM.
|
14
|
+
# @param [String] name of the VM.
|
15
|
+
# @param [Hash] options
|
16
|
+
# * :Description<~String>: - description to be assigned.
|
17
|
+
# * :StorageProfile<~Hash>: - storage profile to be assigned.
|
18
|
+
# * :name<~String>
|
19
|
+
# * :href<~String>
|
20
|
+
# @return [Excon::Response]
|
21
|
+
# * body<~Hash>:
|
22
|
+
#
|
23
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/PUT-Vm.html
|
24
|
+
# @since vCloud API version 0.9
|
25
|
+
def put_vm(id, name, options)
|
26
|
+
body = Fog::Generators::Compute::VcloudDirector::Vm.new(options.merge(:name => name)).generate_xml
|
27
|
+
request(
|
28
|
+
:body => body,
|
29
|
+
:expects => 202,
|
30
|
+
:headers => {'Content-Type' => 'application/vnd.vmware.vcloud.vm+xml'},
|
31
|
+
:method => 'PUT',
|
32
|
+
:parser => Fog::ToHashDocument.new,
|
33
|
+
:path => "vApp/#{id}"
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
class Real
|
6
6
|
|
7
7
|
def reboot_server( ref, stype = 'clean' )
|
8
|
-
@connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "VM.#{stype}
|
8
|
+
@connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "VM.#{stype}_reboot"}, ref)
|
9
9
|
end
|
10
10
|
|
11
11
|
end
|
@@ -38,6 +38,10 @@ Shindo.tests('AWS::RDS | subnet group requests', ['aws', 'rds']) do
|
|
38
38
|
Fog::AWS[:rds].describe_db_subnet_groups.body
|
39
39
|
end
|
40
40
|
|
41
|
+
tests("#delete_db_subnet_group").formats(AWS::RDS::Formats::BASIC) do
|
42
|
+
Fog::AWS[:rds].delete_db_subnet_group(@subnet_group_name).body
|
43
|
+
end
|
44
|
+
|
41
45
|
end
|
42
46
|
|
43
47
|
@subnets.each do |sn|
|
@@ -4,8 +4,17 @@ Shindo.tests('Compute::VcloudDirector | media', ['vclouddirector']) do
|
|
4
4
|
pending if Fog.mocking?
|
5
5
|
|
6
6
|
medias = vdc.medias
|
7
|
-
|
8
|
-
|
7
|
+
media_name = VcloudDirector::Compute::Helper.test_name
|
8
|
+
|
9
|
+
tests('Compute::VcloudDirector | media', ['create']) do
|
10
|
+
tests('#create').returns(Fog::Compute::VcloudDirector::Media) do
|
11
|
+
File.open(VcloudDirector::Compute::Helper.fixture('test.iso'), 'rb') do |iso|
|
12
|
+
medias.create(media_name, iso).class
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
media = medias.get_by_name(media_name)
|
9
18
|
|
10
19
|
tests('Compute::VcloudDirector | media') do
|
11
20
|
tests('#href').returns(String) { media.href.class }
|
@@ -21,9 +30,9 @@ Shindo.tests('Compute::VcloudDirector | media', ['vclouddirector']) do
|
|
21
30
|
end
|
22
31
|
|
23
32
|
tests('Compute::VcloudDirector | media', ['load on demand']) do
|
24
|
-
tests(
|
25
|
-
tests(
|
26
|
-
tests(
|
33
|
+
tests('#description is not loaded yet').returns(NonLoaded) { media.attributes[:description] }
|
34
|
+
tests('#description is loaded on demand').returns(String) { media.description.class }
|
35
|
+
tests('#description is now loaded').returns(true) { media.attributes[:description] != NonLoaded }
|
27
36
|
end
|
28
37
|
|
29
38
|
tests('Compute::VcloudDirector | media', ['lazy load attrs']) do
|
@@ -42,4 +51,8 @@ Shindo.tests('Compute::VcloudDirector | media', ['vclouddirector']) do
|
|
42
51
|
tests('#get_by_name').returns(media.name) { medias.get_by_name(media.name).name }
|
43
52
|
tests('#get').returns(media.id) { medias.get(media.id).id }
|
44
53
|
end
|
54
|
+
|
55
|
+
tests('Compute::VcloudDirector | media', ['destroy']) do
|
56
|
+
tests('#destroy').returns(true) { media.destroy }
|
57
|
+
end
|
45
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-maestrodev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.0.
|
4
|
+
version: 1.18.0.20131205181604
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- geemus (Wesley Beary)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.30.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.30.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: formatador
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -702,6 +702,7 @@ files:
|
|
702
702
|
- lib/fog/aws/parsers/rds/delete_db_parameter_group.rb
|
703
703
|
- lib/fog/aws/parsers/rds/delete_db_security_group.rb
|
704
704
|
- lib/fog/aws/parsers/rds/delete_db_snapshot.rb
|
705
|
+
- lib/fog/aws/parsers/rds/delete_db_subnet_group.rb
|
705
706
|
- lib/fog/aws/parsers/rds/describe_db_engine_versions.rb
|
706
707
|
- lib/fog/aws/parsers/rds/describe_db_instances.rb
|
707
708
|
- lib/fog/aws/parsers/rds/describe_db_log_files.rb
|
@@ -1159,6 +1160,7 @@ files:
|
|
1159
1160
|
- lib/fog/aws/requests/rds/delete_db_parameter_group.rb
|
1160
1161
|
- lib/fog/aws/requests/rds/delete_db_security_group.rb
|
1161
1162
|
- lib/fog/aws/requests/rds/delete_db_snapshot.rb
|
1163
|
+
- lib/fog/aws/requests/rds/delete_db_subnet_group.rb
|
1162
1164
|
- lib/fog/aws/requests/rds/describe_db_engine_versions.rb
|
1163
1165
|
- lib/fog/aws/requests/rds/describe_db_instances.rb
|
1164
1166
|
- lib/fog/aws/requests/rds/describe_db_log_files.rb
|
@@ -4088,6 +4090,7 @@ files:
|
|
4088
4090
|
- lib/fog/vcloud_director/generators/compute/disks.rb
|
4089
4091
|
- lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
|
4090
4092
|
- lib/fog/vcloud_director/generators/compute/metadata.rb
|
4093
|
+
- lib/fog/vcloud_director/generators/compute/vm.rb
|
4091
4094
|
- lib/fog/vcloud_director/generators/compute/vm_network.rb
|
4092
4095
|
- lib/fog/vcloud_director/models/compute/catalog.rb
|
4093
4096
|
- lib/fog/vcloud_director/models/compute/catalog_item.rb
|
@@ -4291,6 +4294,7 @@ files:
|
|
4291
4294
|
- lib/fog/vcloud_director/requests/compute/put_network_connection_system_section_vapp.rb
|
4292
4295
|
- lib/fog/vcloud_director/requests/compute/put_vapp_metadata_item_metadata.rb
|
4293
4296
|
- lib/fog/vcloud_director/requests/compute/put_vapp_template_metadata_item_metadata.rb
|
4297
|
+
- lib/fog/vcloud_director/requests/compute/put_vm.rb
|
4294
4298
|
- lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb
|
4295
4299
|
- lib/fog/version.rb
|
4296
4300
|
- lib/fog/vmfusion.rb
|
@@ -4659,7 +4663,7 @@ files:
|
|
4659
4663
|
- tests/aws/requests/rds/parameter_group_tests.rb
|
4660
4664
|
- tests/aws/requests/rds/parameter_request_tests.rb
|
4661
4665
|
- tests/aws/requests/rds/security_group_tests.rb
|
4662
|
-
- tests/aws/requests/rds/
|
4666
|
+
- tests/aws/requests/rds/subnet_groups_tests.rb
|
4663
4667
|
- tests/aws/requests/rds/tagging_tests.rb
|
4664
4668
|
- tests/aws/requests/redshift/cluster_parameter_group_tests.rb
|
4665
4669
|
- tests/aws/requests/redshift/cluster_security_group_tests.rb
|
@@ -5586,7 +5590,7 @@ test_files:
|
|
5586
5590
|
- tests/aws/requests/rds/parameter_group_tests.rb
|
5587
5591
|
- tests/aws/requests/rds/parameter_request_tests.rb
|
5588
5592
|
- tests/aws/requests/rds/security_group_tests.rb
|
5589
|
-
- tests/aws/requests/rds/
|
5593
|
+
- tests/aws/requests/rds/subnet_groups_tests.rb
|
5590
5594
|
- tests/aws/requests/rds/tagging_tests.rb
|
5591
5595
|
- tests/aws/requests/redshift/cluster_parameter_group_tests.rb
|
5592
5596
|
- tests/aws/requests/redshift/cluster_security_group_tests.rb
|