Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created October 10, 2014 03:26
Show Gist options
  • Save underscorephil/f05f4f87290ecd7a1a97 to your computer and use it in GitHub Desktop.
Save underscorephil/f05f4f87290ecd7a1a97 to your computer and use it in GitHub Desktop.
import SoftLayer.API
from pprint import pprint as pp
api_username = ''
api_key = ''
client = SoftLayer.Client(
username=api_username,
api_key=api_key,
)
ip_address = '192.155.223.148'
object_mask = "mask[id,virtualLicenses.billingItem.id]"
ip_address = client['Network_Subnet_IpAddress'].findByIpv4Address(
ip_address, mask=object_mask)
result = client['Billing_Item'].cancelItem(
id=ip_address['virtualLicenses'][0]['billingItem']['id'])
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment