Skip to content

Commit 80d7a41

Browse files
Merge branch 'master' into textualize
2 parents b5802ee + 4d7c618 commit 80d7a41

38 files changed

+2081
-1609
lines changed

SoftLayer/CLI/autoscale/create.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# :license: MIT, see LICENSE for more details.
33

44
import click
5-
from SoftLayer import utils
65

76
import SoftLayer
87
from SoftLayer.CLI import environment
@@ -67,11 +66,11 @@ def cli(env, **args):
6766
]
6867
policy_template = {
6968
'name': args['policy_name'],
70-
'policies': scale_actions
69+
'scaleActions': scale_actions
7170

7271
}
7372
policies = []
74-
73+
policies.append(policy_template)
7574
block = []
7675
number_disk = 0
7776
for guest_disk in args['disk']:
@@ -113,7 +112,7 @@ def cli(env, **args):
113112
'balancedTerminationFlag': False,
114113
'virtualGuestMemberTemplate': virt_template,
115114
'virtualGuestMemberCount': 0,
116-
'policies': policies.append(utils.clean_dict(policy_template)),
115+
'policies': policies,
117116
'terminationPolicyId': args['termination_policy']
118117
}
119118

SoftLayer/CLI/loadbal/order.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ def order(env, **args):
4141
"""Creates a LB. Protocols supported are TCP, HTTP, and HTTPS."""
4242

4343
mgr = SoftLayer.LoadBalancerManager(env.client)
44+
network = SoftLayer.NetworkManager(env.client)
45+
46+
datacenter = network.get_datacenter(datacenter=args.get('datacenter'))
47+
if datacenter:
48+
location = {'id': datacenter[0]['id']}
49+
else:
50+
raise exceptions.CLIHalt('Datacenter {} was not found'.format(datacenter))
4451

45-
location = args.get('datacenter')
4652
name = args.get('name')
4753
description = args.get('label', None)
4854

SoftLayer/fixtures/SoftLayer_Account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@
11731173
"virtualizationPlatform": 0,
11741174
"requiredUser": "administrator@vsphere.local"
11751175
}
1176-
}
1176+
}
11771177
]
11781178

11791179
getActiveVirtualLicenses = [{

SoftLayer/fixtures/SoftLayer_Billing_Order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
],
4545
'orderApprovalDate': '2019-09-15T13:13:13-06:00',
4646
'orderTotalAmount': '0'
47-
}]
47+
}]
4848

4949
getObject = {
5050
'accountId': 1234,

SoftLayer/fixtures/SoftLayer_Network_Storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
}
238238

239239
refreshDuplicate = {
240-
'dependentDuplicate': 1
240+
'dependentDuplicate': 1
241241
}
242242

243243
convertCloneDependentToIndependent = {

SoftLayer/fixtures/SoftLayer_Network_Vlan.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
'vlanNumber': 4444,
88
'firewallInterfaces': None,
99
'billingItem': {
10-
'allowCancellationFlag': 1,
11-
'categoryCode': 'network_vlan',
12-
'description': 'Private Network Vlan',
13-
'id': 235689,
14-
'notes': 'test cli',
15-
'orderItemId': 147258,
16-
}
10+
'allowCancellationFlag': 1,
11+
'categoryCode': 'network_vlan',
12+
'description': 'Private Network Vlan',
13+
'id': 235689,
14+
'notes': 'test cli',
15+
'orderItemId': 147258,
16+
}
1717
}
1818

1919
editObject = True

SoftLayer/fixtures/SoftLayer_Product_Package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@
21372137
"recurringFee": "0",
21382138
"setupFee": "0",
21392139
"sort": 10,
2140-
}]
2140+
}]
21412141
}, {
21422142
"description": "Public Network Vlan",
21432143
"id": 1071,
@@ -2168,6 +2168,6 @@
21682168
"recurringFee": "0",
21692169
"setupFee": "0",
21702170
"sort": 10,
2171-
}]
2171+
}]
21722172
}
21732173
]
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
getAllObjects = [{
2-
"capacity": "4",
3-
"key": "ABCDE-6CJ8L-J8R9H-000R0-CDR70",
4-
"units": "CPU",
5-
"billingItem": {
6-
"allowCancellationFlag": 1,
7-
"categoryCode": "software_license",
8-
"createDate": "2018-10-22T11:16:48-06:00",
9-
"cycleStartDate": "2021-06-03T23:11:22-06:00",
10-
"description": "vCenter Server Appliance 6.0",
11-
"id": 123654789,
12-
"lastBillDate": "2021-06-03T23:11:22-06:00",
13-
"modifyDate": "2021-06-03T23:11:22-06:00",
14-
"nextBillDate": "2021-07-03T23:00:00-06:00",
15-
"orderItemId": 385054741,
16-
"recurringMonths": 1,
17-
"serviceProviderId": 1,
18-
},
19-
"softwareDescription": {
20-
"id": 1529,
21-
"longDescription": "VMware vCenter 6.0",
22-
"manufacturer": "VMware",
23-
"name": "vCenter",
24-
"version": "6.0",
25-
"requiredUser": "administrator@vsphere.local"
26-
}
2+
"capacity": "4",
3+
"key": "ABCDE-6CJ8L-J8R9H-000R0-CDR70",
4+
"units": "CPU",
5+
"billingItem": {
6+
"allowCancellationFlag": 1,
7+
"categoryCode": "software_license",
8+
"createDate": "2018-10-22T11:16:48-06:00",
9+
"cycleStartDate": "2021-06-03T23:11:22-06:00",
10+
"description": "vCenter Server Appliance 6.0",
11+
"id": 123654789,
12+
"lastBillDate": "2021-06-03T23:11:22-06:00",
13+
"modifyDate": "2021-06-03T23:11:22-06:00",
14+
"nextBillDate": "2021-07-03T23:00:00-06:00",
15+
"orderItemId": 385054741,
16+
"recurringMonths": 1,
17+
"serviceProviderId": 1,
2718
},
19+
"softwareDescription": {
20+
"id": 1529,
21+
"longDescription": "VMware vCenter 6.0",
22+
"manufacturer": "VMware",
23+
"name": "vCenter",
24+
"version": "6.0",
25+
"requiredUser": "administrator@vsphere.local"
26+
}
27+
},
2828
{
2929
"capacity": "1",
3030
"key": "CBERT-4RL92-K8999-031K4-AJF5J",
@@ -48,4 +48,4 @@
4848
"name": "Virtual SAN Advanced Tier III",
4949
"version": "6.2",
5050
}
51-
}]
51+
}]

SoftLayer/fixtures/SoftLayer_Virtual_Guest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
'item': {'description': '2 GB'},
318318
'hourlyRecurringFee': '.06',
319319
'recurringFee': '42'
320-
},
320+
},
321321
'template': {'maxMemory': 2048}
322322
},
323323
{
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<SOAP-ENV:Body>
4+
<ns1:getObjectResponse>
5+
<getObjectReturn xsi:type="ns1:SoftLayer_Account">
6+
<companyName xsi:type="xsd:string">SoftLayer Internal - Development Community</companyName>
7+
<id xsi:type="xsd:int">307608</id>
8+
</getObjectReturn>
9+
</ns1:getObjectResponse>
10+
</SOAP-ENV:Body>
11+
</SOAP-ENV:Envelope>

0 commit comments

Comments
 (0)