November 23, 2017

NetScalers Backups

Example to take Netscalers backups, the script will list all the Netscalers in the account
and will look for an specific Netscaler in order to take a backup

Important manual pages
import SoftLayer

# Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'

# The name of the netscaler you wish take the backup
netscalerName = "SLADC208473-1"

# Declare the API client and creating the services that we need
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']
networkApplicationDeliveryControllerService = client['SoftLayer_Network_Application_Delivery_Controller']

    # Getting all the netscalers devices in our account
    netscalers = accountService.getApplicationDeliveryControllers()
    # Looking for the nextsaler we whish to take the backup
    for netscaler in netscalers:
        if netscaler['name'] == netscalerName:
            # Taking the back up in our netscaler
            result = networkApplicationDeliveryControllerService.saveCurrentConfiguration("This is the note for my backup", id=netscaler['id'])
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to backup the Netscaler faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


We would love to hear it
Open an issue