fog-maestrodev 1.18.0.20131219193542 → 1.19.0.20131219203941

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -176,25 +176,10 @@ spec.add_dependency 'fog', '~> 1.16'
176
176
  * Ask specific questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/fog)
177
177
  * Report bugs and discuss potential features in [Github issues](https://github.com/fog/fog/issues).
178
178
 
179
- ## Getting Involved
179
+ ## Contributing
180
180
 
181
- New contributors are always welcome, when it doubt please ask questions. We strive to be an open and welcoming community. Please be nice to one another.
181
+ Please refer to [CONTRIBUTING.md](https://github.com/fog/fog/blob/master/CONTRIBUTING.md).
182
182
 
183
- ### Coding
183
+ ## License
184
184
 
185
- * Pick a task:
186
- * Offer feedback on open [pull requests](https://github.com/fog/fog/pulls).
187
- * Review open [issues](https://github.com/fog/fog/issues) for things to help on.
188
- * [Create an issue](https://github.com/fog/fog/issues/new) to start a discussion on additions or features.
189
- * Fork the project, add your changes and tests to cover them in a topic branch.
190
- * Commit your changes and rebase against `fog/fog` to ensure everything is up to date.
191
- * [Submit a pull request](https://github.com/fog/fog/compare/)
192
-
193
- ### Non-Coding
194
-
195
- * Offer feedback on open [issues](https://github.com/fog/fog/issues).
196
- * Write and help edit [documentation](https://github.com/fog/fog.github.com).
197
- * Translate [documentation](https://github.com/fog/fog.github.com) in to other languages.
198
- * Organize or volunteer at events.
199
- * [Donate](https://www.gittip.com/geemus/)
200
- * Discuss other ideas for contribution with [geemus](mailto:geemus+fog@gmail.com).
185
+ Please refer to [LICENSE.md](https://github.com/fog/fog/blob/master/LICENSE.md).
data/changelog.txt CHANGED
@@ -1,3 +1,265 @@
1
+ 1.19.0 12/19/2013 15180fd7c0993f7fe6cfdc861a4db7ada14825ad
2
+ ==========================================================
3
+
4
+ Stats! { 'collaborators' => 53, 'downloads' => 3970307, 'forks' => 1015, 'open_issues' => 149, 'watchers' => 2831 }
5
+
6
+ MVP! Mike Pountney
7
+
8
+ [AWS]
9
+ add modify_vpc_attribute. thanks Eric Stonfer
10
+ add modify_vpc_attribute. thanks Eric Stonfer
11
+
12
+ [AWS|Autoscaling]
13
+ Fix option name in documentation. thanks Frederick Cheung
14
+
15
+ [AWS|RDS]
16
+ Support for creating and removing subnet groups. thanks Akshay Joshi
17
+
18
+ [AWS|Storage]
19
+ fixed signed urls when using session tokens. thanks Frederick Cheung
20
+
21
+ [Brightbox]
22
+ Fix test issue with reusing servers. thanks Paul Thornthwaite
23
+ Add new SSL cert metadata attributes. thanks Paul Thornthwaite
24
+ Remove commented resource from schema. thanks Paul Thornthwaite
25
+ Fix typo in yard tag. thanks Paul Thornthwaite
26
+ Clean up Cloud IP mapping code. thanks Paul Thornthwaite
27
+ Code style clean up. thanks Paul Thornthwaite
28
+
29
+ [OS|Volume]
30
+ Add listing/showing volume types. thanks Grzesiek Kolodziejczyk
31
+
32
+ [aws]
33
+ Implement missing mocks for Route 53. thanks Carlos Sanchez
34
+ style fix for address model. thanks Eric Stonfer
35
+ narrow scope of unf warning. thanks geemus
36
+
37
+ [aws:storage]
38
+ path_style option availability. thanks David Illsley
39
+
40
+ [aws|cloudwatch]
41
+ remove :host key from request. thanks Brian D. Burns
42
+
43
+ [aws|dns]
44
+ Don't set mock changes to INSYNC immediately, only after some timeout. thanks Carlos Sanchez
45
+
46
+ [aws|elb]
47
+ support for cross zone load balancing. thanks Frederick Cheung
48
+
49
+ [aws|rds]
50
+ Implement `ready?` for subnet group. thanks Akshay Joshi
51
+ Support Iops parameter. thanks Eric Hankins
52
+
53
+ [aws|sqs]
54
+ remove host/port from request. thanks geemus
55
+
56
+ [aws|storage]
57
+ warn/load unf as needed. thanks geemus
58
+
59
+ [bluebox]
60
+ remove :host from excon request. thanks Sam Cooper
61
+
62
+ [core]
63
+ use Excon :persistent option. thanks Brian D. Burns
64
+
65
+ [digitalocean]
66
+ Add support for private networking. thanks Trae Robrock
67
+
68
+ [dnsimple]
69
+ remove host from request. thanks Jose Luis Salas
70
+
71
+ [general]
72
+ Allow default wait_for interval to be overiden globally. thanks radekg
73
+ Merge Forg.interval and Fog.timeout into a single file. thanks radekg
74
+
75
+ [google]
76
+ natIP is set to true when it must be an ip. thanks Carlos Sanchez
77
+ Add support for instance tags. thanks Carlos Sanchez
78
+ Add support for instance tags. thanks Carlos Sanchez
79
+ Raise Fog::Errors::NotFound on 404. thanks Carlos Sanchez
80
+ Implement disk mocks and enable tests. thanks Carlos Sanchez
81
+ Alias flavor_id and machine_type for consistency with other providers. thanks Carlos Sanchez
82
+ Instances are created without description, and disk size is ignored. thanks Carlos Sanchez
83
+ Implement operation model. thanks Carlos Sanchez
84
+
85
+ [hp]
86
+ Add documentation and examples for the provider for HP Cloud Services. thanks Rupak Ganguly
87
+ Fix links in some documentation pages. thanks Rupak Ganguly
88
+ Fix a few more documentation page links. thanks Rupak Ganguly
89
+ Fix connection section for newer services. thanks Rupak Ganguly
90
+
91
+ [misc]
92
+ Get VcloudDirector working again in fog interactive. Fixes #2373. thanks Adam Heinz
93
+ Use OpenSSL::Digest instead of deprecated OpenSSL::Digest::Digest. thanks Akira Matsuda
94
+ Add new AWS EC2 flavors to the compute model. thanks Alfred Moreno
95
+ Add exponential backoff to backoff_if_unfound. thanks Andrew Leonard
96
+ add in 'AssociatePublicIpAddress' to launch configuration creation. thanks Andrew Stangl
97
+ merge upstream changes and resolve merge conflict. thanks Andrew Stangl
98
+ add in 'AssociatePublicIpAddress' to launch configuration creation. thanks Andrew Stangl
99
+ remove duplicate code introduced during rebase. thanks Andrew Stangl
100
+ tidy up and remove whitespace. thanks Andrew Stangl
101
+ use original error message if none given. thanks Brian D. Burns
102
+ use Fog::JSON. thanks Brian D. Burns
103
+ Add ready? method to aws VPC and Subnet models. thanks Brian Nelson
104
+ Add pending -> available transitions for AWS VPC and Subnets. thanks Brian Nelson
105
+ all? not working in JRuby 1.7.5+. Configure Travis. thanks Carlos Sanchez
106
+ Disable specific tests that don't pass on jruby 1.7.5+. thanks Carlos Sanchez
107
+ Disable coveralls on travis with jruby. thanks Carlos Sanchez
108
+ Ensure vpc created in a test doesn't affect another. thanks Carlos Sanchez
109
+ Allows custom username for aws spot instances. thanks Casey Abernathy
110
+ Added content_encoding attribute to Rackspace storage. thanks Cezar Sa Espinola
111
+ Remove :host key in RDS request method to eliminate excon warning. thanks David Faber
112
+ Remove stray private key. thanks Dominic Cleal
113
+ Update excon dependency to version ~>0.30.0. thanks Erik Michaels-Ober
114
+ Fix typo in documentation. thanks Erik Michaels-Ober
115
+ ecloud api version bump. thanks Eugene Howe
116
+ Lock user by default. thanks Evan Light
117
+ Updated docs to reflect RackConnect compatibility. thanks Evan Light
118
+ Typo. thanks Evan Light
119
+ service attribute conflicts with the service defined in the parent. thanks Evan Petrie
120
+ details sometimes fails with a not-found. thanks Evan Petrie
121
+ Add index for describe_images parameters that use them. thanks James Bence
122
+ Make changes to a copy of the options parameter. thanks Joe Yates
123
+ Give 'versionId' value the expected structure. thanks Joe Yates
124
+ Add IAMInstanceProfile support to launch configs. thanks Jon Topper
125
+ Improve support for VPC Security Groups in RDS. thanks Jon Topper
126
+ Add IAMInstanceProfile support to launch configs. thanks Jon Topper
127
+ Improve support for VPC Security Groups in RDS. thanks Jon Topper
128
+ Remove duplication. thanks Jon Topper
129
+ Update S3 ACL whitelist. thanks Keith Barrette
130
+ Revert "[rackspace] wrapping test blocks around test helpers to prevent unexpected shindo exceptions". thanks Kyle Rames
131
+ merging in changes. thanks Kyle Rames
132
+ Added syntax highlighting for ruby code fragments. thanks Mark IJbema
133
+ Add request to set VM annotations in vSphere. thanks Martin Matuska
134
+ Add the uncommitted property to the vsphere datastore object. thanks Martin Matuska
135
+ changed shutdown to reboot in reboot server method. thanks Matheus Mina
136
+ changed __consoles to consoles and renamed consoles method to get_consoles. thanks Matheus Mina
137
+ fixed tests. thanks Matheus Mina
138
+ fixed consoles to use :aliases. thanks Matheus Mina
139
+ fixed AWS::Glacier::Vault.delete_notification_configuration so that it passes the ID to the underlying core request. thanks Matt Pokress
140
+ Allow custom Mock.not_implemented message. thanks Mike Pountney
141
+ Allow custom Mock.not_implemented message. thanks Mike Pountney
142
+ ignore .ruby-version. thanks Mike Pountney
143
+ vApp rename via put_vapp_name_and_description. thanks Mike Pountney
144
+ use std options={} format for optional parameters. thanks Mike Pountney
145
+ Find all and by-name Mock for Query API orgVdcNetwork. thanks Mike Pountney
146
+ improve network mock test data, to include vdc & IsShared. thanks Mike Pountney
147
+ fix tests for running against live environment. thanks Mike Pountney
148
+ make Mock vcloud_director_host an FQDN. thanks Mike Pountney
149
+ rename Mock vcloud_director_host to pass URI.parse. thanks Mike Pountney
150
+ Add delete_network request. thanks Mike Pountney
151
+ add Mock for post_create_network, use this to create/delete network in tests. thanks Mike Pountney
152
+ Modified AWS S3 mock, so that it errors when creating an existing bucket. thanks Nassos Antoniou
153
+ return NS and SOA records as per https://github.com/fog/fog/issues/2419 - this allows us to work with NS subdelegations, as well as the NS and SOA records while the type can't be changed, the values and TTLs can be. thanks Nathan Sullivan
154
+ Added parameter to force request timeout on xen. thanks Paulo Henrique Lopes Ribeiro
155
+ Adding more XenServer models. thanks Paulo Henrique Lopes Ribeiro
156
+ Forget to reference models on main class. thanks Paulo Henrique Lopes Ribeiro
157
+ adding spot price to launch configurations. thanks Rodrigo Estebanez
158
+ Sometimes :Environments is not a key. thanks Sarah Vessels
159
+ Fog::Storage::Local#directories#all: Don't break when :local_root folder is missing. thanks Sjoerd Andringa
160
+ Also call #load in case of missing local root folder. thanks Sjoerd Andringa
161
+ using new way of task mocking for edgegateway tests. thanks Sneha Somwanshi
162
+ updated documentation for put_vm. thanks Sneha Somwanshi
163
+ openstack modifications. thanks Thom Mahoney & Eugene Howe
164
+ openstack modifications. thanks Thom Mahoney & Eugene Howe
165
+ Need to list block in the argument list to access the variable. thanks Trae Robrock
166
+ Update describe_addresses.rb. thanks Virender Khatri
167
+ Update address.rb. thanks Virender Khatri
168
+ add gittip shield. thanks geemus
169
+ fix for broken AWS records tests. thanks geemus
170
+ expanding/rewriting the getting-help/involved section of README. thanks geemus
171
+ fix spacing for getting help section of README. thanks geemus
172
+ streamline openstack security groups tests. thanks geemus
173
+ move license to LICENSE.md. thanks geemus
174
+ add CONTRIBUTING.md. thanks geemus
175
+ just refer to contrib/license in readme to DRY. thanks geemus
176
+ Create parser for AWS assign private ip addresses. thanks joe
177
+ Assign private ip parser. thanks joe
178
+ add assign private ip request path. thanks joe
179
+ fix typo and add mock. thanks joe
180
+ Update error message on tests. thanks joe
181
+ private ip tests. thanks joe
182
+ pass options as a hash add support for multiple ips. thanks joe
183
+ update tests to reflect argument hash. thanks joe
184
+ remove debugging. thanks joe
185
+ fix variable name typo. thanks joe
186
+ remove unneeded test and destroy objects. thanks joe
187
+
188
+ [openstack|compute]
189
+ Basic examples for Compute. thanks Daniel Lobato
190
+
191
+ [openstack|storage]
192
+ adding missing request methods to Storage service. thanks Kyle Rames
193
+ updating request to use the proper file structure. thanks Kyle Rames
194
+
195
+ [rackspace]
196
+ updating compute and storage to pull service net urls from service catalog. thanks Kyle Rames
197
+ wrapping test blocks around test helpers to prevent unexpected shindo exceptions. thanks Kyle Rames
198
+ updating test helper to log errors and not throw exceptions to prevent shindo from halting if an error occurs. thanks Kyle Rames
199
+ fixing more live tests. thanks Kyle Rames
200
+ fixing broken tests caused by bad helper. thanks Kyle Rames
201
+ apply documentation edits. thanks Kyle Rames
202
+ apply documentation edits. thanks Kyle Rames
203
+
204
+ [rackspace|compute]
205
+ compute_v2 should require fog/rackspace. thanks Brian D. Burns
206
+
207
+ [rackspace|identity]
208
+ re-implementing service catalog in hopes of providing a faster more flexible solution. thanks Kyle Rames
209
+ updated service catalog support service net. thanks Kyle Rames
210
+ updated service catalog to return global endpoint if specified region endpoint does not exist. thanks Kyle Rames
211
+ tweaking service catalog to support ruby 1.8.7. thanks Kyle Rames
212
+
213
+ [rackspace|queues]
214
+ adding examples create queue, delete queue, and post message. thanks Kyle Rames
215
+ adding id alias for identity; fixed bug in message#identity that returned the id along with the claim_id query string; removed redundant code. thanks Kyle Rames
216
+ adding more examples. thanks Kyle Rames
217
+ fixing examples. thanks Kyle Rames
218
+ adding request YARD docs. thanks Kyle Rames
219
+ adding YARD docs. thanks Kyle Rames
220
+ adding the queues getting started guide. thanks Kyle Rames
221
+ updating set_messages= to populate the claim_id attribute on messages in order for destroy to work properly. thanks Kyle Rames
222
+ adding the queues getting started guide. thanks Kyle Rames
223
+
224
+ [vSphere]
225
+ Implementation of feature to specify scsi_controller type at create type and also support the attribute scsi_controller to return the right class. thanks Marc Grimme
226
+
227
+ [vcloud_director]
228
+ fix models vms_test so is pending on empty environment. thanks Dan Abel
229
+ tests become pending not failing on absense of testable resources. thanks Dan Abel
230
+ post_create_org_vdc_network. thanks Mike Pountney
231
+ fix to input format for post_create_org_vdc_network. thanks Mike Pountney
232
+ fix query test to handle delete_network. thanks Mike Pountney
233
+ Fix medias#create - issue #2440. thanks Nick Osborn
234
+ s/@end_point/end_point/. thanks Nick Osborn
235
+ update name, description and storage_profile for vm. thanks Sneha Somwanshi
236
+ ensure that MetadataEntry is a list. thanks Sneha Somwanshi
237
+ Show guest customization "admin password auto". thanks Stefano Tortarolo
238
+ Handle Guest admin password. thanks Stefano Tortarolo
239
+ allow nullable for gateway in network tests. thanks geemus
240
+
241
+ [vclouddirector]
242
+ Shore up tests re EdgeGateway. thanks Mike Pountney
243
+ correct put_vapp_name_and_description documentation. thanks Mike Pountney
244
+
245
+ [vsphere|compute]
246
+ restore default guest_id so setting it is optional. thanks Dominic Cleal
247
+ Force shutdown a server if VMware Tools is installed, but isn't running. thanks Kevin Menard
248
+ Pass server shutdown options through to the stop operation so the caller can force shutdown if desired. thanks Kevin Menard
249
+ get_vm_interface returns a hash, not an object that responds to :key. thanks Kevin Menard
250
+ Renamed 'vm' to 'server' to be more in line with other fog providers. thanks Kevin Menard
251
+ Backed out the changed to use a hash and fixed the conversion to an Interface class. thanks Kevin Menard
252
+ Implemented idiomatic interface destruction. thanks Kevin Menard
253
+ Default to a VirtualE1000 NIC if not configured. thanks Kevin Menard
254
+ Implemented idiomatic interface creation. thanks Kevin Menard
255
+ interfaces#get now properly initializes the Interface object. thanks Kevin Menard
256
+ Deprecated the old interface creation and destruction methods now that the idiomatic ones exist. thanks Kevin Menard
257
+
258
+ [xenserver]
259
+ Updated models to have all attributes from version 6.2.0. thanks Paulo Henrique Lopes Ribeiro
260
+ Adding more XenServer Models. thanks Paulo Henrique Lopes Ribeiro
261
+
262
+
1
263
  1.18.0 10/31/2013 5442bc7e893eb73dae8bb5ee8ef0845c78c43627
2
264
  ==========================================================
3
265
 
data/fog.gemspec CHANGED
@@ -6,7 +6,7 @@ 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.20131219193542'
9
+ s.version = '1.19.0.20131219203941'
10
10
  s.date = '2013-12-19'
11
11
  s.rubyforge_project = 'fog'
12
12
 
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
  require 'fog/compute/models/server'
2
3
  require 'fog/rackspace/models/compute_v2/metadata'
3
4
 
@@ -521,13 +522,14 @@ module Fog
521
522
  # @see Servers#bootstrap
522
523
  def setup(credentials = {})
523
524
  requires :public_ip_address, :identity, :public_key, :username
524
- Fog::SSH.new(public_ip_address, username, credentials).run([
525
+ commands = [
525
526
  %{mkdir .ssh},
526
527
  %{echo "#{public_key}" >> ~/.ssh/authorized_keys},
527
- %{passwd -l #{username}},
528
+ password_lock,
528
529
  %{echo "#{Fog::JSON.encode(attributes)}" >> ~/attributes.json},
529
530
  %{echo "#{Fog::JSON.encode(metadata)}" >> ~/metadata.json}
530
- ])
531
+ ].compact
532
+ Fog::SSH.new(public_ip_address, username, credentials).run(commands)
531
533
  rescue Errno::ECONNREFUSED
532
534
  sleep(1)
533
535
  retry
@@ -538,6 +540,10 @@ module Fog
538
540
  def adminPass=(new_admin_pass)
539
541
  @password = new_admin_pass
540
542
  end
543
+
544
+ def password_lock
545
+ "passwd -l #{username}" unless attributes[:no_passwd_lock]
546
+ end
541
547
  end
542
548
  end
543
549
  end
@@ -29,8 +29,8 @@ module Fog
29
29
  # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
30
30
  # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
31
31
  # @raise [Fog::Compute::RackspaceV2::ServiceError]
32
- # @note This method is incompatible with Cloud Servers utlizing RackConnect. RackConnect users
33
- # should use server personalization to install keys. Please see Server#personality for more information.
32
+ # @note This method is compatible with Cloud Servers utlizing RackConnect ***if and only if***
33
+ # provided the attribute "no_passwd_lock" set to *true*.
34
34
  # @example
35
35
  # service.servers.bootstrap :name => 'bootstrap-server',
36
36
  # :flavor_id => service.flavors.first.id,
@@ -20,11 +20,11 @@ module Fog
20
20
  # @param [Hash] options
21
21
  # @option options [String] :Description Optional description.
22
22
  # @option options [Hash] :Configuration Network configuration.
23
- # @option options [Hash] :EdgeGateway EdgeGateway that connects this
23
+ # @option options [Hash] :EdgeGateway EdgeGateway that connects this
24
24
  # Org vDC network. Applicable only for routed networks.
25
- # @option options [Hash] :ServiceConfig Specifies the service
25
+ # @option options [Hash] :ServiceConfig Specifies the service
26
26
  # configuration for an isolated Org vDC networks.
27
- # @option options [Boolean] :IsShared True if this network is shared
27
+ # @option options [Boolean] :IsShared True if this network is shared
28
28
  # to multiple Org vDCs.
29
29
  # * :Configuration<~Hash>: NetworkConfigurationType
30
30
  # * :IpScopes<~Hash>:
@@ -76,6 +76,99 @@ module Fog
76
76
  )
77
77
  end
78
78
 
79
+ type = 'network'
80
+ id = uuid
81
+
82
+ # Description
83
+ # Configuration
84
+ # IpScopes
85
+ # IpScope
86
+ # IsInherited
87
+ # Gateway
88
+ # Netmask
89
+ # Dns1
90
+ # Dns2
91
+ # DnsSuffix
92
+ # IsEnabled
93
+ # IpRanges
94
+ # IpRange
95
+ # StartAddress
96
+ # EndAddress
97
+ # FenceMode
98
+ # EdgeGateway
99
+ # IsShared
100
+
101
+ network_body = {
102
+ :name => name,
103
+ :vdc => vdc_id,
104
+ }
105
+
106
+ [:Description, :IsShared].each do |key|
107
+ network_body[key] = options[key] if options.key?(key)
108
+ end
109
+
110
+ if options.key?(:EdgeGateway)
111
+ network_body[:EdgeGateway] =
112
+ options[:EdgeGateway][:href].split('/').last
113
+ end
114
+
115
+ if configuration = options[:Configuration]
116
+ if ip_scopes = configuration[:IpScopes]
117
+ if ip_scope = ip_scopes[:IpScope]
118
+ [:IsInherited, :Gateway, :Netmask,
119
+ :Dns1, :Dns2, :DnsSuffix, :IsEnabled].each do |key|
120
+ network_body[key] = ip_scope[key] if ip_scope.key?(key)
121
+ end
122
+ if ip_ranges = ip_scope[:IpRanges]
123
+ network_body[:IpRanges] = []
124
+ ip_ranges.each do |ipr|
125
+ network_body[:IpRanges] << {
126
+ :StartAddress => ipr[:IpRange][:StartAddress],
127
+ :EndAddress => ipr[:IpRange][:EndAddress]
128
+ }
129
+ end
130
+ end
131
+ end
132
+ end
133
+ network_body[:FenceMode] = configuration[:FenceMode] if ip_scope.key?(:FenceMode)
134
+ end
135
+
136
+ owner = {
137
+ :href => make_href("#{type}/#{id}"),
138
+ :type => "application/vnd.vmware.vcloud.#{type}+xml"
139
+ }
140
+ task_id = enqueue_task(
141
+ "Adding #{type} #{name} (#{id})", 'CreateOrgVdcNetwork', owner,
142
+ :on_success => lambda do
143
+ data[:networks][id] = network_body
144
+ end
145
+ )
146
+
147
+ body = {
148
+ :xmlns => xmlns,
149
+ :xmlns_xsi => xmlns_xsi,
150
+ :xsi_schemaLocation => xsi_schema_location,
151
+ :href => make_href("admin/network/#{id}"),
152
+ :name => name,
153
+ :id => "urn:vcloud:network:#{id}",
154
+ :type => "application/vnd.vmware.vcloud.orgVdcNetwork+xml",
155
+ :Link => [
156
+ {:rel=>"up", :type=>"application/vnd.vmware.vcloud.vdc+xml", :href=>make_href("vdc/#{vdc_id}")},
157
+ {:rel=>"down", :type=>"application/vnd.vmware.vcloud.metadata+xml", :href=>make_href("admin/network/#{id}/metadata")},
158
+ {:rel=>"down", :type=>"application/vnd.vmware.vcloud.allocatedNetworkAddress+xml", :href=>make_href("admin/network/#{id}/allocatedAddresses/")},
159
+ ],
160
+ }.merge(options)
161
+
162
+ body[:Tasks] = {
163
+ :Task => task_body(task_id)
164
+ }
165
+
166
+ Excon::Response.new(
167
+ :status => 201,
168
+ :headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
169
+ :body => body
170
+ )
171
+
79
172
  end
80
173
  end
81
174
  end
data/lib/fog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fog
2
- VERSION = '1.18.0'
2
+ VERSION = '1.19.0'
3
3
  end
@@ -195,7 +195,35 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
195
195
  end
196
196
 
197
197
  @instance.wait_for { ready? }
198
- end
198
+ end
199
+
200
+ tests('#setup') do
201
+ perform_setup = lambda { |attributes|
202
+ Fog::SSH::Mock.data.clear
203
+
204
+ server = Fog::Compute::RackspaceV2::Server.new(attributes)
205
+
206
+ address = 123
207
+
208
+ server.ipv4_address = address
209
+ server.identity = "bar"
210
+ server.public_key = "baz"
211
+
212
+ server.setup
213
+
214
+ Fog::SSH::Mock.data[address].first[:commands]
215
+ }
216
+
217
+ test("leaves user unlocked only when requested") do
218
+ perform_setup.call(:service => service, :no_passwd_lock => true)
219
+ .none? { |c| c =~ /passwd\s+-l\s+root/ }
220
+ end
221
+
222
+ test("locks user by default") do
223
+ perform_setup.call(:service => service)
224
+ .one? { |c| c =~ /passwd\s+-l\s+root/ }
225
+ end
226
+ end
199
227
 
200
228
  #When after testing resize/resize_confirm we get a 409 when we try to resize_revert so I am going to split it into two blocks
201
229
  model_tests(service.servers, options, true) do
@@ -1,3 +1,6 @@
1
+
2
+ require 'pp'
3
+
1
4
  Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) do
2
5
 
3
6
  GET_NETWORK_FORMAT = {
@@ -20,6 +23,7 @@ Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) d
20
23
 
21
24
  @service = Fog::Compute::VcloudDirector.new
22
25
  @org = VcloudDirector::Compute::Helper.current_org(@service)
26
+ @created_net_id = nil
23
27
 
24
28
  tests('Create network in non-existent vDC').raises(Fog::Compute::VcloudDirector::Forbidden) do
25
29
  @service.post_create_org_vdc_network('00000000-0000-0000-0000-000000000000', 'bob')
@@ -29,6 +33,10 @@ Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) d
29
33
  @service.delete_network('00000000-0000-0000-0000-000000000000')
30
34
  end
31
35
 
36
+ tests('Retrieve non-existent OrgNetwork').raises(Fog::Compute::VcloudDirector::Forbidden) do
37
+ @service.get_network('00000000-0000-0000-0000-000000000000')
38
+ end
39
+
32
40
  tests('#get_network').data_matches_schema(GET_NETWORK_FORMAT) do
33
41
  link = @org[:Link].detect do |l|
34
42
  l[:rel] == 'down' && l[:type] == 'application/vnd.vmware.vcloud.orgNetwork+xml'
@@ -44,23 +52,52 @@ Shindo.tests('Compute::VcloudDirector | network requests', ['vclouddirector']) d
44
52
  @service.get_network_metadata(@network_id).body
45
53
  end
46
54
 
47
- tests('Retrieve non-existent OrgNetwork').raises(Fog::Compute::VcloudDirector::Forbidden) do
48
- @service.get_network('00000000-0000-0000-0000-000000000000')
49
- end
55
+ tests('#post_create_org_vdc_network') do
56
+ pending unless Fog.mocking?
57
+ link = @org[:Link].detect do |l|
58
+ l[:rel] == 'down' && l[:type] == 'application/vnd.vmware.vcloud.vdc+xml'
59
+ end
60
+
61
+ vdc_id = link[:href].split('/').last
62
+ name = VcloudDirector::Compute::Helper.test_name
50
63
 
51
- # at the moment just test delete_network in Mock mode, until we have
52
- # ability to create a test one in Real mode
53
- if Fog.mocking?
54
- # TODO replace with a Query API lookup when available
55
- net_id = @service.data[:networks].keys.first
56
- @delete_task = @service.delete_network(net_id).body
57
- tests('#delete_network returns Task').data_matches_schema(VcloudDirector::Compute::Schema::TASK_TYPE) do
58
- @delete_task
64
+ options = {
65
+ :Description => "Testing post_create_org_vdc_network #{name}",
66
+ :Configuration => {
67
+ :IpScopes => {
68
+ :IpScope => {
69
+ :IsInherited => 'false',
70
+ :Gateway => '198.51.100.1',
71
+ :Netmask => '255.255.255.0',
72
+ :Dns1 => '198.51.100.2',
73
+ :Dns2 => '198.51.100.3',
74
+ :DnsSuffix => 'example.com',
75
+ :IpRanges => [
76
+ { :IpRange => { :StartAddress => '198.51.100.10', :EndAddress => '198.51.100.20' } },
77
+ { :IpRange => { :StartAddress => '198.51.100.30', :EndAddress => '198.51.100.40' } },
78
+ ]
79
+ },
80
+ },
81
+ :FenceMode => 'isolated',
82
+ }
83
+ }
84
+
85
+ body = @service.post_create_org_vdc_network(vdc_id, name, options).body
86
+ @created_net_id = body[:href].split('/').last if body[:href]
87
+ @service.process_task(body[:Tasks][:Task]) if body && body.key?(:Tasks)
88
+
89
+ tests('fetched name matches created name').returns(name) do
90
+ net = @service.get_network(@created_net_id).body
91
+ net[:name]
59
92
  end
93
+ end
94
+
95
+ tests('#delete_network') do
96
+ pending unless Fog.mocking?
97
+ @delete_task = @service.delete_network(@created_net_id).body
60
98
  @service.process_task(@delete_task)
61
- tests('#delete_network succeeds').returns(nil) do
62
- # network missing now?
63
- net_id = @service.data[:networks][net_id]
99
+ tests('created network has been deleted').raises(Fog::Compute::VcloudDirector::Forbidden) do
100
+ @service.get_network(@created_net_id)
64
101
  end
65
102
  end
66
103
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-maestrodev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0.20131219193542
4
+ version: 1.19.0.20131219203941
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
16
- requirement: &16462360 !ruby/object:Gem::Requirement
16
+ requirement: &14003800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16462360
24
+ version_requirements: *14003800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: excon
27
- requirement: &16460300 !ruby/object:Gem::Requirement
27
+ requirement: &14001900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.31.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16460300
35
+ version_requirements: *14001900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: formatador
38
- requirement: &16458820 !ruby/object:Gem::Requirement
38
+ requirement: &14000340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *16458820
46
+ version_requirements: *14000340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: multi_json
49
- requirement: &16457500 !ruby/object:Gem::Requirement
49
+ requirement: &13998960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *16457500
57
+ version_requirements: *13998960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mime-types
60
- requirement: &16456820 !ruby/object:Gem::Requirement
60
+ requirement: &13998260 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *16456820
68
+ version_requirements: *13998260
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: net-scp
71
- requirement: &16481540 !ruby/object:Gem::Requirement
71
+ requirement: &14023100 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.1'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *16481540
79
+ version_requirements: *14023100
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: net-ssh
82
- requirement: &16479260 !ruby/object:Gem::Requirement
82
+ requirement: &14020820 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.1.3
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *16479260
90
+ version_requirements: *14020820
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: nokogiri
93
- requirement: &16477720 !ruby/object:Gem::Requirement
93
+ requirement: &14019080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '1.5'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *16477720
101
+ version_requirements: *14019080
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: ruby-hmac
104
- requirement: &16477160 !ruby/object:Gem::Requirement
104
+ requirement: &14018480 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *16477160
112
+ version_requirements: *14018480
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: jekyll
115
- requirement: &16491400 !ruby/object:Gem::Requirement
115
+ requirement: &14032640 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *16491400
123
+ version_requirements: *14032640
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rake
126
- requirement: &16489860 !ruby/object:Gem::Requirement
126
+ requirement: &14031080 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *16489860
134
+ version_requirements: *14031080
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: rbvmomi
137
- requirement: &16487960 !ruby/object:Gem::Requirement
137
+ requirement: &14029280 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *16487960
145
+ version_requirements: *14029280
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: yard
148
- requirement: &16487360 !ruby/object:Gem::Requirement
148
+ requirement: &14028660 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *16487360
156
+ version_requirements: *14028660
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: thor
159
- requirement: &16486660 !ruby/object:Gem::Requirement
159
+ requirement: &14028000 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *16486660
167
+ version_requirements: *14028000
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: rspec
170
- requirement: &16484620 !ruby/object:Gem::Requirement
170
+ requirement: &14025840 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 1.3.1
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *16484620
178
+ version_requirements: *14025840
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: rbovirt
181
- requirement: &16495180 !ruby/object:Gem::Requirement
181
+ requirement: &14036320 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: 0.0.11
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *16495180
189
+ version_requirements: *14036320
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: shindo
192
- requirement: &16493780 !ruby/object:Gem::Requirement
192
+ requirement: &14035080 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ~>
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: 0.3.4
198
198
  type: :development
199
199
  prerelease: false
200
- version_requirements: *16493780
200
+ version_requirements: *14035080
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: fission
203
- requirement: &16492320 !ruby/object:Gem::Requirement
203
+ requirement: &14033660 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0'
209
209
  type: :development
210
210
  prerelease: false
211
- version_requirements: *16492320
211
+ version_requirements: *14033660
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: pry
214
- requirement: &16522940 !ruby/object:Gem::Requirement
214
+ requirement: &14064100 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ! '>='
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: '0'
220
220
  type: :development
221
221
  prerelease: false
222
- version_requirements: *16522940
222
+ version_requirements: *14064100
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: google-api-client
225
- requirement: &16522040 !ruby/object:Gem::Requirement
225
+ requirement: &14063200 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ~>
@@ -230,10 +230,10 @@ dependencies:
230
230
  version: 0.6.2
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *16522040
233
+ version_requirements: *14063200
234
234
  - !ruby/object:Gem::Dependency
235
235
  name: unf
236
- requirement: &16521300 !ruby/object:Gem::Requirement
236
+ requirement: &14062480 !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
239
239
  - - ! '>='
@@ -241,7 +241,7 @@ dependencies:
241
241
  version: '0'
242
242
  type: :development
243
243
  prerelease: false
244
- version_requirements: *16521300
244
+ version_requirements: *14062480
245
245
  description: The Ruby cloud services library. Supports all major cloud providers including
246
246
  AWS, Rackspace, Linode, Blue Box, StormOnDemand, and many others. Full support for
247
247
  most AWS services including EC2, S3, CloudWatch, SimpleDB, ELB, and RDS.
@@ -5414,7 +5414,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
5414
5414
  version: '0'
5415
5415
  segments:
5416
5416
  - 0
5417
- hash: -1401150800215848202
5417
+ hash: 3066775075540008135
5418
5418
  required_rubygems_version: !ruby/object:Gem::Requirement
5419
5419
  none: false
5420
5420
  requirements: