fog-softlayer 0.1.0 → 0.1.1
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/CHANGELOG.md +3 -0
- data/lib/fog/softlayer/models/compute/server.rb +11 -2
- 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
- data/tests/softlayer/models/compute/server_tests.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2M4MGM2NTNkMTQ2M2UwZGUxZDU1MjBmZjJiZTIxY2ZkNzU3MWEyYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjEwY2EzZmE4YTEwOTYyOTEyNTVjNDY0ODVhM2ExN2VkZGY1NTQzMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDRkN2ZmZmE1YWFmNGZmYWY5Yzk1ZjZlOTVkNWQ4MTVmMzkyNzYyOWJkYWY1
|
10
|
+
NzMxMzFkYzU1YTc5Y2IwMzM1M2YzZDhiMDc1YjU5NWY1ZjU1ZmEzNGQ5MTg3
|
11
|
+
MTYyYjlmMmEwY2Q4ZjY5NTM1MGUyZDliZDM0ZTJiZWNiOWE2NDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2NmN2YyNjUyZjUyZjhjNzBlNDZjYzM2MTQ0MzdlYjdkODA3YzYwMDJmMDE0
|
14
|
+
NDAyZjQ3NTdmYTM0NzYzNDgyNWFmYjUzZjE3NjM2Y2JiMmJmM2FmZTAwNjcw
|
15
|
+
MzgxOGVjZTRkMTBhOTg2MTkyYWY2ZDljNjlhNDU0ODdlZmY4ZDY=
|
data/CHANGELOG.md
CHANGED
@@ -36,7 +36,7 @@ module Fog
|
|
36
36
|
|
37
37
|
# Metadata
|
38
38
|
attribute :account_id, :aliases => 'accountId', :type => :integer
|
39
|
-
attribute :datacenter
|
39
|
+
attribute :datacenter, :aliases => 'datacenter', :type => :squash
|
40
40
|
attribute :single_tenant, :aliases => 'dedicatedAccountHostOnlyFlag'
|
41
41
|
attribute :global_identifier, :aliases => 'globalIdentifier'
|
42
42
|
attribute :hourly_billing_flag, :aliases => 'hourlyBillingFlag'
|
@@ -66,6 +66,15 @@ module Fog
|
|
66
66
|
attributes[:bare_metal] === 1 ? true : false
|
67
67
|
end
|
68
68
|
|
69
|
+
def datacenter=(name)
|
70
|
+
name = name['name'] if name.is_a?(Hash)
|
71
|
+
attributes[:datacenter] = { :name => name }
|
72
|
+
end
|
73
|
+
|
74
|
+
def datacenter
|
75
|
+
attributes[:datacenter][:name] unless attributes[:datacenter].nil?
|
76
|
+
end
|
77
|
+
|
69
78
|
def image_id=(uuid)
|
70
79
|
attributes[:image_id] = {:globalIdentifier => uuid}
|
71
80
|
end
|
@@ -241,7 +250,7 @@ module Fog
|
|
241
250
|
end
|
242
251
|
|
243
252
|
def validate_attributes
|
244
|
-
requires :name, :domain, :cpu, :ram
|
253
|
+
requires :name, :domain, :cpu, :ram, :datacenter
|
245
254
|
requires_one :os_code, :image_id
|
246
255
|
requires_one :image_id, :disk
|
247
256
|
bare_metal? and image_id and raise ArgumentError, "Bare Metal Cloud does not support booting from Image"
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
|
21
21
|
class Real
|
22
22
|
def get_bare_metal_server(identifier)
|
23
|
-
request(:hardware_server, identifier, :expected => [200, 404], :query => 'objectMask=mask[memory,provisionDate,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.passwords.password]')
|
23
|
+
request(:hardware_server, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,memory,provisionDate,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.passwords.password]')
|
24
24
|
end
|
25
25
|
end
|
26
26
|
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)
|
23
|
+
request(:account, :get_hardware, :query => 'objectMask=mask[datacenter,memory,processorCoreAmount,hardDrives,datacenter,hourlyBillingFlag,operatingSystem.passwords.password]')
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
|
21
21
|
class Real
|
22
22
|
def get_vm(identifier)
|
23
|
-
request(:virtual_guest, identifier, :expected => [200, 404], :query => 'objectMask=mask[blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.passwords.password]')
|
23
|
+
request(:virtual_guest, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.passwords.password]')
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
|
21
21
|
class Real
|
22
22
|
def get_vms
|
23
|
-
request(:account, :get_virtual_guests)
|
23
|
+
request(:account, :get_virtual_guests, :query => 'objectMask=mask[datacenter,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.passwords.password]')
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -13,7 +13,8 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
13
13
|
:flavor_id => 'm1.small',
|
14
14
|
:image_id => '23f7f05f-3657-4330-8772-329ed2e816bc',
|
15
15
|
:name => 'test-vm',
|
16
|
-
:domain => 'example.com'
|
16
|
+
:domain => 'example.com',
|
17
|
+
:datacenter => 'dal05'
|
17
18
|
}
|
18
19
|
|
19
20
|
bmc_opts = {
|
@@ -21,7 +22,8 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
21
22
|
:os_code => 'UBUNTU_LATEST',
|
22
23
|
:name => 'test-bmc',
|
23
24
|
:domain => 'bare-metal-server.com',
|
24
|
-
:bare_metal => true
|
25
|
+
:bare_metal => true,
|
26
|
+
:datecenter => 'dal05'
|
25
27
|
}
|
26
28
|
|
27
29
|
@vm = Fog::Compute[:softlayer].servers.new(vm_opts)
|