fog-softlayer 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CONTRIBUTING.md +5 -5
- data/examples/compute.md +16 -0
- data/lib/fog/softlayer/models/compute/server.rb +11 -1
- data/lib/fog/softlayer/requests/compute/get_bare_metal_server.rb +1 -1
- data/lib/fog/softlayer/requests/compute/get_bare_metal_servers.rb +1 -1
- data/lib/fog/softlayer/requests/compute/get_vm.rb +1 -1
- data/lib/fog/softlayer/requests/compute/get_vms.rb +1 -1
- data/lib/fog/softlayer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGE0MjZlOWMwMjk4MWMxYzRkNzAxMjg4YWUyMzBhYzI3N2FmNjIyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGFlYzgxMDY5OWVlNDk2YWUzYjM4ZmMwYWMzZDBjMDNhODIwMTUxMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzQzOGUzNzM1NWUwNWVjODE1YjA3NTg3ZmQzZmU2MzA1OTdiNjczNmQ1OGY2
|
10
|
+
YmQyNTBjNTJlZDg0NTA4NzkyM2ExOGM4MzYzODBlMDEyODM3NmE2ZDI0N2Y5
|
11
|
+
Zjc2Zjc4MTIxNDQ2OGQ0OTIxZTQ1NmFjMTM5NTZmN2RkZGY5ZDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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/
|
9
|
-
* Review open [issues](https://github.com/
|
10
|
-
* [Create an issue](https://github.com/
|
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/
|
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/
|
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
|