fog-softlayer 0.3.11 → 0.3.12

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWViYzVmZGQ4ZWMyNmNmZDhiYTY4ZmRkYzc5ZDQ1YzkyMzVjZDIzYg==
4
+ OGE0MjZlOWMwMjk4MWMxYzRkNzAxMjg4YWUyMzBhYzI3N2FmNjIyMw==
5
5
  data.tar.gz: !binary |-
6
- MDJlNDEzZjU1NDBkNTkwZDI0YjliYjUxNTdmMWI5NzY5Yjg5YjMwNw==
6
+ OGFlYzgxMDY5OWVlNDk2YWUzYjM4ZmMwYWMzZDBjMDNhODIwMTUxMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjU2ZTU3OWYxYTU5YzVkYjhmNDcxYjIzOGU2NmZiYTM3ZWZjMTIwN2E2N2M3
10
- NDA5MWZiMTllMDAzMDkzZjZlYmRlMjI2MmYyMjdmNGJhNzE3MjQzMmY1Nzc4
11
- ODYxZmVkZDg1Njk4NWNmYzU3MGY2OTExYjY5OTFiMWQyNDRkODQ=
9
+ MzQzOGUzNzM1NWUwNWVjODE1YjA3NTg3ZmQzZmU2MzA1OTdiNjczNmQ1OGY2
10
+ YmQyNTBjNTJlZDg0NTA4NzkyM2ExOGM4MzYzODBlMDEyODM3NmE2ZDI0N2Y5
11
+ Zjc2Zjc4MTIxNDQ2OGQ0OTIxZTQ1NmFjMTM5NTZmN2RkZGY5ZDc=
12
12
  data.tar.gz: !binary |-
13
- ZGM4NWJjN2U5ZDMwYTVmYWI4ODMzNzg2ZmU4NTgxNTFjYjIxOGU1Mjg3ODkz
14
- MjRiNTQzYjRhZDJhOTkzM2JlMTY0ZWI5MWI5MGE3ZWU3OWQ4ZjNiNjE2ZTM4
15
- MjAyODA2NzBhYTlmYjcxODFmYWE2YjQyNzk2NDZkMDkxYWViNjI=
13
+ YjcwYjk5MWQ1YmYzZGNlNmUzNWJmY2ExYWMyNTJkYjc5YTU1Y2M3NmRkNGFh
14
+ N2IxNzEyNmJhMDgwOGExYTE3ODQyYjNjZDI4MjllNDA0OTQwNTNhODMwY2Vh
15
+ Y2EwNThiYTA1NzA2NmE3NWE3MmRhN2NlNWRhZjYwYjNiYmY1MDc=
data/CONTRIBUTING.md CHANGED
@@ -5,14 +5,14 @@ New contributors are always welcome, when it doubt please ask questions. We stri
5
5
  ### Coding
6
6
 
7
7
  * Pick a task:
8
- * Offer feedback on open [pull requests](https://github.com/softlayer/fog/pulls).
9
- * Review open [issues](https://github.com/softlayer/fog/issues) for things to help on.
10
- * [Create an issue](https://github.com/softlayer/fog/issues/new) to start a discussion on additions or features.
8
+ * Offer feedback on open [pull requests](https://github.com/fog/fog-softlayer/pulls).
9
+ * Review open [issues](https://github.com/fog/fog-softlayer/issues) for things to help on.
10
+ * [Create an issue](https://github.com/fog/fog-softlayer/issues/new) to start a discussion on additions or features.
11
11
  * Fork the project, add your changes and tests to cover them in a topic branch.
12
12
  * Commit your changes and rebase against `softlayer/fog` to ensure everything is up to date.
13
- * [Submit a pull request](https://github.com/softlayer/fog/compare/).
13
+ * [Submit a pull request](https://github.com/fog/fog-softlayer/compare/).
14
14
 
15
15
  ### Non-Coding
16
16
 
17
- * Offer feedback on open [issues](https://github.com/softlayer/fog/issues).
17
+ * Offer feedback on open [issues](https://github.com/fog/fog-softlayer/issues).
18
18
  * Organize or volunteer at events.
data/examples/compute.md CHANGED
@@ -246,3 +246,19 @@ default:
246
246
  # => <Fog::Compute::Softlayer::Server>
247
247
  ```
248
248
 
249
+ 1. Provision a Server with user metadata.
250
+
251
+ ```ruby
252
+ opts = {
253
+ :flavor_id => "m1.small",
254
+ :image_id => "23f7f05f-3657-4330-8772-329ed2e816bc",
255
+ :name => "test",
256
+ :datacenter => "ams01",
257
+ :user_data => "my-custom-user-metadata"
258
+ }
259
+
260
+ new_server = @sl.servers.create(opts)
261
+ new_server.user_data # => "my-custom-user-metadata"
262
+ new_server.user_data = "new-user-metadata"
263
+ new_server.user_data # => "new-user-metadata"
264
+ ```
@@ -43,6 +43,7 @@ module Fog
43
43
  attribute :hourly_billing_flag, :aliases => 'hourlyBillingFlag'
44
44
  attribute :tags, :aliases => 'tagReferences'
45
45
  attribute :private_network_only, :aliases => 'privateNetworkOnlyFlag'
46
+ attribute :user_data, :aliases => 'userData'
46
47
 
47
48
  def initialize(attributes = {})
48
49
  # Forces every request inject bare_metal parameter
@@ -183,6 +184,15 @@ module Fog
183
184
  attributes[:ram] = set
184
185
  end
185
186
 
187
+ # @params value [String]
188
+ def user_data=(value)
189
+ attributes[:user_data] = [{'value' => value}]
190
+ end
191
+
192
+ def user_data
193
+ attributes[:user_data]
194
+ end
195
+
186
196
  def ready?
187
197
  if bare_metal?
188
198
  state == "on"
@@ -292,7 +302,7 @@ module Fog
292
302
  :private_vlan => :primaryBackendNetworkComponent,
293
303
  :key_pairs => :sshKeys,
294
304
  :private_network_only => :privateNetworkOnlyFlag,
295
-
305
+ :user_data => :userData
296
306
  }
297
307
 
298
308
  conditional = if bare_metal?
@@ -26,7 +26,7 @@ module Fog
26
26
 
27
27
  class Real
28
28
  def get_bare_metal_server(identifier)
29
- request(:hardware_server, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,tagReferences,memory,provisionDate,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag]')
29
+ request(:hardware_server, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,tagReferences,memory,provisionDate,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag,userData]')
30
30
  end
31
31
  end
32
32
  end
@@ -20,7 +20,7 @@ module Fog
20
20
 
21
21
  class Real
22
22
  def get_bare_metal_servers
23
- request(:account, :get_hardware, :query => 'objectMask=mask[datacenter,tagReferences,memory,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag]')
23
+ request(:account, :get_hardware, :query => 'objectMask=mask[datacenter,tagReferences,memory,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag,userData]')
24
24
  end
25
25
  end
26
26
  end
@@ -26,7 +26,7 @@ module Fog
26
26
 
27
27
  class Real
28
28
  def get_vm(identifier)
29
- request(:virtual_guest, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,tagReferences,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag]')
29
+ request(:virtual_guest, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,tagReferences,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.softwareLicense.softwareDescription.referenceCode,sshKeys.id,privateNetworkOnlyFlag,userData]')
30
30
  end
31
31
  end
32
32
  end
@@ -20,7 +20,7 @@ module Fog
20
20
 
21
21
  class Real
22
22
  def get_vms
23
- request(:account, :get_virtual_guests, :query => 'objectMask=mask[datacenter,tagReferences,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.softwareLicense.softwareDescription.referenceCode,primaryNetworkComponent.networkVlan,sshKeys.id,privateNetworkOnlyFlag]')
23
+ request(:account, :get_virtual_guests, :query => 'objectMask=mask[datacenter,tagReferences,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.softwareLicense.softwareDescription.referenceCode,primaryNetworkComponent.networkVlan,sshKeys.id,privateNetworkOnlyFlag,userData]')
24
24
  end
25
25
  end
26
26
  end
@@ -7,6 +7,6 @@
7
7
 
8
8
  module Fog
9
9
  module Softlayer
10
- VERSION = "0.3.11"
10
+ VERSION = "0.3.12"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-softlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Eldridge