November 23, 2017
Get the firewalls in the account.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'

vsiIp = ""

client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']

objectMask = "mask[firewallNetworkComponents,networkVlanFirewall,dedicatedFirewallFlag,firewallGuestNetworkComponents,firewallInterfaces,firewallRules,highAvailabilityFirewallFlag]"

    vlans = accountService.getNetworkVlans(mask=objectMask)
    firewalls = []
    for vlan in vlans:
        if vlan['dedicatedFirewallFlag'] == 1 or vlan['highAvailabilityFirewallFlag'] or len(vlan['firewallGuestNetworkComponents']) > 0 or len(vlan['firewallInterfaces']) > 0 or len(vlan['firewallNetworkComponents']):
    print(json.dumps(firewalls, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to get the firewalls. faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue