Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soap transport #1626

Merged
merged 9 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SoftLayer/fixtures/SoftLayer_Account.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@
"virtualizationPlatform": 0,
"requiredUser": "[email protected]"
}
}
}
]

getActiveVirtualLicenses = [{
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/fixtures/SoftLayer_Billing_Order.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
],
'orderApprovalDate': '2019-09-15T13:13:13-06:00',
'orderTotalAmount': '0'
}]
}]

getObject = {
'accountId': 1234,
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/fixtures/SoftLayer_Network_Storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
}

refreshDuplicate = {
'dependentDuplicate': 1
'dependentDuplicate': 1
}

convertCloneDependentToIndependent = {
Expand Down
14 changes: 7 additions & 7 deletions SoftLayer/fixtures/SoftLayer_Network_Vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
'vlanNumber': 4444,
'firewallInterfaces': None,
'billingItem': {
'allowCancellationFlag': 1,
'categoryCode': 'network_vlan',
'description': 'Private Network Vlan',
'id': 235689,
'notes': 'test cli',
'orderItemId': 147258,
}
'allowCancellationFlag': 1,
'categoryCode': 'network_vlan',
'description': 'Private Network Vlan',
'id': 235689,
'notes': 'test cli',
'orderItemId': 147258,
}
}

editObject = True
Expand Down
4 changes: 2 additions & 2 deletions SoftLayer/fixtures/SoftLayer_Product_Package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@
"recurringFee": "0",
"setupFee": "0",
"sort": 10,
}]
}]
}, {
"description": "Public Network Vlan",
"id": 1071,
Expand Down Expand Up @@ -2168,6 +2168,6 @@
"recurringFee": "0",
"setupFee": "0",
"sort": 10,
}]
}]
}
]
52 changes: 26 additions & 26 deletions SoftLayer/fixtures/SoftLayer_Software_AccountLicense.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
getAllObjects = [{
"capacity": "4",
"key": "ABCDE-6CJ8L-J8R9H-000R0-CDR70",
"units": "CPU",
"billingItem": {
"allowCancellationFlag": 1,
"categoryCode": "software_license",
"createDate": "2018-10-22T11:16:48-06:00",
"cycleStartDate": "2021-06-03T23:11:22-06:00",
"description": "vCenter Server Appliance 6.0",
"id": 123654789,
"lastBillDate": "2021-06-03T23:11:22-06:00",
"modifyDate": "2021-06-03T23:11:22-06:00",
"nextBillDate": "2021-07-03T23:00:00-06:00",
"orderItemId": 385054741,
"recurringMonths": 1,
"serviceProviderId": 1,
},
"softwareDescription": {
"id": 1529,
"longDescription": "VMware vCenter 6.0",
"manufacturer": "VMware",
"name": "vCenter",
"version": "6.0",
"requiredUser": "[email protected]"
}
"capacity": "4",
"key": "ABCDE-6CJ8L-J8R9H-000R0-CDR70",
"units": "CPU",
"billingItem": {
"allowCancellationFlag": 1,
"categoryCode": "software_license",
"createDate": "2018-10-22T11:16:48-06:00",
"cycleStartDate": "2021-06-03T23:11:22-06:00",
"description": "vCenter Server Appliance 6.0",
"id": 123654789,
"lastBillDate": "2021-06-03T23:11:22-06:00",
"modifyDate": "2021-06-03T23:11:22-06:00",
"nextBillDate": "2021-07-03T23:00:00-06:00",
"orderItemId": 385054741,
"recurringMonths": 1,
"serviceProviderId": 1,
},
"softwareDescription": {
"id": 1529,
"longDescription": "VMware vCenter 6.0",
"manufacturer": "VMware",
"name": "vCenter",
"version": "6.0",
"requiredUser": "[email protected]"
}
},
{
"capacity": "1",
"key": "CBERT-4RL92-K8999-031K4-AJF5J",
Expand All @@ -48,4 +48,4 @@
"name": "Virtual SAN Advanced Tier III",
"version": "6.2",
}
}]
}]
2 changes: 1 addition & 1 deletion SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
'item': {'description': '2 GB'},
'hourlyRecurringFee': '.06',
'recurringFee': '42'
},
},
'template': {'maxMemory': 2048}
},
{
Expand Down
11 changes: 11 additions & 0 deletions SoftLayer/fixtures/soap/SoftLayer_Account_getObject.soap
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<SOAP-ENV:Body>
<ns1:getObjectResponse>
<getObjectReturn xsi:type="ns1:SoftLayer_Account">
<companyName xsi:type="xsd:string">SoftLayer Internal - Development Community</companyName>
<id xsi:type="xsd:int">307608</id>
</getObjectReturn>
</ns1:getObjectResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
19 changes: 19 additions & 0 deletions SoftLayer/fixtures/soap/SoftLayer_Account_getVirtualGuests.soap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<SOAP-ENV:Header>
<ns1:totalItems>
<amount>1</amount>
</ns1:totalItems>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getVirtualGuestsResponse>
<getVirtualGuestsReturn SOAP-ENC:arrayType="ns1:SoftLayer_Virtual_Guest[1]" xsi:type="ns1:SoftLayer_Virtual_GuestArray">
<item xsi:type="ns1:SoftLayer_Virtual_Guest">
<domain xsi:type="xsd:string">cgallo.com</domain>
<hostname xsi:type="xsd:string">KVM-Test</hostname>
<id xsi:type="xsd:int">121401696</id>
</item>
</getVirtualGuestsReturn>
</ns1:getVirtualGuestsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
12 changes: 12 additions & 0 deletions SoftLayer/fixtures/soap/SoftLayer_Virtual_Guest_getObject.soap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<SOAP-ENV:Body>
<ns1:getObjectResponse>
<getObjectReturn xsi:type="ns1:SoftLayer_Virtual_Guest">
<domain xsi:type="xsd:string">ibm.com</domain>
<hostname xsi:type="xsd:string">KVM-Test</hostname>
<id xsi:type="xsd:int">121401696</id>
</getObjectReturn>
</ns1:getObjectResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
47 changes: 47 additions & 0 deletions SoftLayer/fixtures/soap/test_objectFilter.soap
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<SOAP-ENV:Header>
<ns1:totalItems>
<amount>109</amount>
</ns1:totalItems>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getAllObjectsResponse>
<getAllObjectsReturn SOAP-ENC:arrayType="ns1:SoftLayer_Product_Package[5]" xsi:type="ns1:SoftLayer_Product_PackageArray">
<item xsi:type="ns1:SoftLayer_Product_Package">
<id xsi:type="xsd:int">56</id>
<keyName xsi:type="xsd:string">2U_QUAD_PROCESSOR_MULTI_CORE_NEHALEM_EX</keyName>
<name xsi:type="xsd:string">Quad Processor Multi Core Nehalem EX</name>
<type id="ref1" xsi:type="ns1:SoftLayer_Product_Package_Type">
<id xsi:type="xsd:int">2</id>
<keyName xsi:type="xsd:string">BARE_METAL_CPU</keyName>
</type>
</item>
<item xsi:type="ns1:SoftLayer_Product_Package">
<id xsi:type="xsd:int">126</id>
<keyName xsi:type="xsd:string">SINGLE_XEON_1200_SANDY_BRIDGE_HASWELL</keyName>
<name xsi:type="xsd:string">Single Xeon 1200 Series (Sandy Bridge / Haswell)</name>
<type href="#ref1"/>
</item>
<item xsi:type="ns1:SoftLayer_Product_Package">
<id xsi:type="xsd:int">142</id>
<keyName xsi:type="xsd:string">SINGLE_XEON_2000_SANDY_BRIDGE</keyName>
<name xsi:type="xsd:string">Single Xeon 2000 Series (Sandy Bridge)</name>
<type href="#ref1"/>
</item>
<item xsi:type="ns1:SoftLayer_Product_Package">
<id xsi:type="xsd:int">143</id>
<keyName xsi:type="xsd:string">DUAL_XEON_2000_SANDY_BRIDGE</keyName>
<name xsi:type="xsd:string">Dual Xeon 2000 Series (Sandy Bridge)</name>
<type href="#ref1"/>
</item>
<item xsi:type="ns1:SoftLayer_Product_Package">
<id xsi:type="xsd:int">144</id>
<keyName xsi:type="xsd:string">3U_GPU</keyName>
<name xsi:type="xsd:string">Specialty Server: GPU</name>
<type href="#ref1"/>
</item>
</getAllObjectsReturn>
</ns1:getAllObjectsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2 changes: 2 additions & 0 deletions SoftLayer/fixtures/soap/test_objectMask.soap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getObjectResponse><getObjectReturn xsi:type="ns1:SoftLayer_Account"><companyName xsi:type="xsd:string">SoftLayer Internal - Development Community</companyName><id xsi:type="xsd:int">307608</id></getObjectReturn></ns1:getObjectResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
4 changes: 2 additions & 2 deletions SoftLayer/managers/vs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,8 @@ def upgrade(self, instance_id, cpus=None, memory=None, nic_speed=None, public=Tr
category = {'categories': [{
'categoryCode': 'guest_disk' + str(disk_number),
'complexType': "SoftLayer_Product_Item_Category"}],
'complexType': 'SoftLayer_Product_Item_Price',
'id': price_id}
'complexType': 'SoftLayer_Product_Item_Price',
'id': price_id}

prices.append(category)
order['prices'] = prices
Expand Down
Loading