fog-softlayer 0.3.16 → 0.3.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/examples/compute.md +15 -0
- data/lib/fog/softlayer/core.rb +6 -4
- 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
|
+
N2E4YWU0MGJjNzIyNWE2MDA2YWZiMmZmODAwYzBmYmFiN2IxNWIyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGRjMWUwMTNjZjljOTNkYmZjMDRmN2I2M2VkMzQwM2ZmODIzYjRkNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODdmYWFmYzYzYTMwMjYyNDk4NTY2MGM0NmU1ZGY5MzFmZjAwODFkNTBiZjE5
|
10
|
+
YzIxYTFhMWU5ZGMxYWY0NTk1OTg2NDQzNWE5OGU3ZjhhNjZhNTAwNmNjOTNi
|
11
|
+
NTk4NWRlZDZkOTc4YTdiNGM5M2JlZDNiZjY5ZjI4Zjc3MTM3ZGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmVjNTk1MTcyNjRkZTliZmU2ZWI2MzQ4OTA4Y2RiM2I3ODQ2OWI4MGUyOTlm
|
14
|
+
MDEwZjU5MTQ3ZDFmMjg2YzY5MDZjMWJmOTZhZDFkZjBhZjQ2NDQxNmQyOTA3
|
15
|
+
MTM1OGI0YTI3YzY0NGQzODA2ZGFiNDhiYzVkYTlkZTcwYTU2ZWM=
|
data/examples/compute.md
CHANGED
@@ -242,6 +242,21 @@ default:
|
|
242
242
|
:private_network_only => true
|
243
243
|
}
|
244
244
|
|
245
|
+
private_vm = @sl.servers.create(opts)
|
246
|
+
# => <Fog::Compute::Softlayer::Server>
|
247
|
+
```
|
248
|
+
1. Provision a Server with 1Gbps network components.
|
249
|
+
|
250
|
+
```ruby
|
251
|
+
opts = {
|
252
|
+
:flavor_id => 'm1.large',
|
253
|
+
:os_code => 'UBUNTU_LATEST',
|
254
|
+
:domain => 'example.com',
|
255
|
+
:datacenter => 'wdc01',
|
256
|
+
:name => 'speedy-tubes',
|
257
|
+
:network_components => [ {:speed => 1000 } ],
|
258
|
+
}
|
259
|
+
|
245
260
|
private_vm = @sl.servers.create(opts)
|
246
261
|
# => <Fog::Compute::Softlayer::Server>
|
247
262
|
```
|
data/lib/fog/softlayer/core.rb
CHANGED
@@ -135,10 +135,12 @@ module Fog
|
|
135
135
|
|
136
136
|
end
|
137
137
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
138
|
+
unless {}.respond_to? :deep_merge
|
139
|
+
class Hash
|
140
|
+
def deep_merge(second)
|
141
|
+
merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
|
142
|
+
self.merge(second, &merger)
|
143
|
+
end
|
142
144
|
end
|
143
145
|
end
|
144
146
|
|