import SoftLayer
import json
client = SoftLayer.create_client_from_env()
network_pod_service = client['Network_Pod']
try:
response = network_pod_service.getAllObjects()
print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to list the response for the package: \nfaultCode= %s, \n \nfaultString= %s"
% (e.faultCode, e.faultString))
import SoftLayer
import json
client = SoftLayer.create_client_from_env()
network_pod_service = client['Network_Pod']
# Filter by datacenter name
objectFilter={"datacenterName":{"operation": "ams01"}}
try:
response = network_pod_service.getAllObjects(filter=objectFilter)
print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to list the response for the package: \nfaultCode= %s, \n \nfaultString= %s"
% (e.faultCode, e.faultString))
import SoftLayer
import json
client = SoftLayer.create_client_from_env()
network_pod_service = client['Network_Pod']
# name = datacenter name . pod name
name = "ams01.pod01"
try:
response = network_pod_service.getCapabilities(id=name)
print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to list the response for the package: \nfaultCode= %s, \n \nfaultString= %s"
% (e.faultCode, e.faultString))
import SoftLayer
import json
client = SoftLayer.create_client_from_env()
network_pod_service = client['Network_Pod']
# name = datacenter name . pod name
name = "ams01.pod01"
try:
response = network_pod_service.getObject(id=name)
print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to list the response for the package: \nfaultCode= %s, \n \nfaultString= %s"
% (e.faultCode, e.faultString))
import SoftLayer
import json
client = SoftLayer.create_client_from_env()
network_pod_service = client['Network_Pod']
try:
response = network_pod_service.listCapabilities()
print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
print("Unable to list the response for the package: \nfaultCode= %s, \n \nfaultString= %s"
% (e.faultCode, e.faultString))
Output Example
[
"SUPPORTS_CUSTOMER_DEFINED_NETWORK",
"SUPPORTS_MULTI_VLAN_DEDICATED_FIREWALL",
"SUPPORTS_SECURITY_GROUP"
]