Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created August 27, 2013 21:46
Show Gist options
  • Select an option

  • Save underscorephil/6359589 to your computer and use it in GitHub Desktop.

Select an option

Save underscorephil/6359589 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)
object_mask = "mask.firewallInterfaces.firewallContextAccessControlLists"
vlans = client['Account'].getNetworkVlans(mask=object_mask)
vlans_with_acls = []
for vlan in vlans:
if not vlan['firewallInterfaces']:
continue
else:
vlans_with_acls.append(vlan)
pp(vlans_with_acls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment