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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGQ0NDhiNGE1NjdjZmVjNWNhY2UxMTRkZjBiZWFhNjYwYTU2MTBlMA==
4
+ M2M4MGM2NTNkMTQ2M2UwZGUxZDU1MjBmZjJiZTIxY2ZkNzU3MWEyYg==
5
5
  data.tar.gz: !binary |-
6
- NTljMjJlMmQ3N2JlYmY3ZTM4YmZiMmQwM2I4MTUyMjgxZjc4OGY0NA==
6
+ MjEwY2EzZmE4YTEwOTYyOTEyNTVjNDY0ODVhM2ExN2VkZGY1NTQzMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTBiMzQ1NDM5M2EzZWE5Y2U0ZDEzNmYzYjMxNDQ3MDExNzkzNTAzZjc0ZmY5
10
- YWY4NTdjZmMxMjc3ODc1ZTE0ODVmMmM2MjkzNjk5ZWU2MzJlOTJiMjU3ZDEx
11
- MjIyNjYyYWU5ZmUzMTVlNzNkZDkzNWY5NjJiNTQ2ZWFkMTNkZTA=
9
+ ZDRkN2ZmZmE1YWFmNGZmYWY5Yzk1ZjZlOTVkNWQ4MTVmMzkyNzYyOWJkYWY1
10
+ NzMxMzFkYzU1YTc5Y2IwMzM1M2YzZDhiMDc1YjU5NWY1ZjU1ZmEzNGQ5MTg3
11
+ MTYyYjlmMmEwY2Q4ZjY5NTM1MGUyZDliZDM0ZTJiZWNiOWE2NDU=
12
12
  data.tar.gz: !binary |-
13
- YmI1NTgzZjI4ZjAyMWMyNTI1OTQwOTZkZDBjNjAwNWE2YmI3ZTI5NjIwOGUx
14
- NDdmZGJmNjM1OWIzMmIxMzllMDBlZjkyNDM4MWNjMDhmOTg5Yjk5YTlkZjZk
15
- M2I2NDY1M2YyZmNkMDhhZjI5ZmY1MmRmNDg4MGQxZTA0MDMzZGY=
13
+ N2NmN2YyNjUyZjUyZjhjNzBlNDZjYzM2MTQ0MzdlYjdkODA3YzYwMDJmMDE0
14
+ NDAyZjQ3NTdmYTM0NzYzNDgyNWFmYjUzZjE3NjM2Y2JiMmJmM2FmZTAwNjcw
15
+ MzgxOGVjZTRkMTBhOTg2MTkyYWY2ZDljNjlhNDU0ODdlZmY4ZDY=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.1 2014-06-10
2
+
3
+ * Fix Compute model after breaking change to SLAPI. :datecenter is no longer optional.
1
4
  ## 0.1.0 2014-06-10
2
5
 
3
6
  * Add missing get method to Fog::DNS::Softlayer::Record.
@@ -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
@@ -6,6 +6,6 @@
6
6
  #
7
7
  module Fog
8
8
  module Softlayer
9
- VERSION = "0.1.0"
9
+ VERSION = "0.1.1"
10
10
  end
11
11
  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)
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Eldridge