@@ -50,15 +50,15 @@ def test_create(self):
5050 item_mock = self .set_mock ('SoftLayer_Product_Package' , 'getItems' )
5151 item_mock .return_value = SoftLayer_Product_Package .getItems_RESERVED_CAPACITY
5252 self .manager .create (
53- name = 'TEST' , datacenter = 'dal13' , backend_router_id = 1 , capacity = 'B1_1X2_1_YEAR_TERM' , quantity = 5 )
53+ name = 'TEST' , backend_router_id = 1 , flavor = 'B1_1X2_1_YEAR_TERM' , instances = 5 )
5454
5555 expected_args = {
5656 'orderContainers' : [
5757 {
5858 'backendRouterId' : 1 ,
5959 'name' : 'TEST' ,
6060 'packageId' : 1059 ,
61- 'location' : 1854895 ,
61+ 'location' : 0 ,
6262 'quantity' : 5 ,
6363 'useHourlyPricing' : True ,
6464 'complexType' : 'SoftLayer_Container_Product_Order_Virtual_ReservedCapacity' ,
@@ -69,34 +69,32 @@ def test_create(self):
6969 }
7070
7171 self .assert_called_with ('SoftLayer_Product_Package' , 'getAllObjects' )
72- self .assert_called_with ('SoftLayer_Location' , 'getDatacenters' )
7372 self .assert_called_with ('SoftLayer_Product_Package' , 'getItems' , identifier = 1059 )
7473 self .assert_called_with ('SoftLayer_Product_Order' , 'placeOrder' , args = (expected_args ,))
7574
7675 def test_create_test (self ):
7776 item_mock = self .set_mock ('SoftLayer_Product_Package' , 'getItems' )
7877 item_mock .return_value = SoftLayer_Product_Package .getItems_RESERVED_CAPACITY
7978 self .manager .create (
80- name = 'TEST' , datacenter = 'dal13' , backend_router_id = 1 , capacity = 'B1_1X2_1_YEAR_TERM' , quantity = 5 , test = True )
79+ name = 'TEST' , backend_router_id = 1 , flavor = 'B1_1X2_1_YEAR_TERM' , instances = 5 , test = True )
8180
8281 expected_args = {
8382 'orderContainers' : [
8483 {
8584 'backendRouterId' : 1 ,
8685 'name' : 'TEST' ,
8786 'packageId' : 1059 ,
88- 'location' : 1854895 ,
87+ 'location' : 0 ,
8988 'quantity' : 5 ,
9089 'useHourlyPricing' : True ,
9190 'complexType' : 'SoftLayer_Container_Product_Order_Virtual_ReservedCapacity' ,
92- 'prices' : [{'id' : 217561 }
93- ]
91+ 'prices' : [{'id' : 217561 }],
92+
9493 }
9594 ]
9695 }
9796
9897 self .assert_called_with ('SoftLayer_Product_Package' , 'getAllObjects' )
99- self .assert_called_with ('SoftLayer_Location' , 'getDatacenters' )
10098 self .assert_called_with ('SoftLayer_Product_Package' , 'getItems' , identifier = 1059 )
10199 self .assert_called_with ('SoftLayer_Product_Order' , 'verifyOrder' , args = (expected_args ,))
102100
@@ -131,14 +129,9 @@ def test_create_guest(self):
131129 'flavorKeyName' : 'B1_1X2X25'
132130 },
133131 'operatingSystemReferenceCode' : 'UBUNTU_LATEST_64' ,
134- 'datacenter' : {
135- 'name' : 'dal13'
136- },
137- 'sshKeys' : [
138- {
139- 'id' : 1234
140- }
141- ]
132+ 'datacenter' : {'name' : 'dal13' },
133+ 'sshKeys' : [{'id' : 1234 }],
134+ 'localDiskFlag' : False
142135 }
143136
144137 self .assert_called_with ('SoftLayer_Virtual_ReservedCapacityGroup' , 'getObject' , mask = mock .ANY )
0 commit comments