Search code examples
ibm-cloud-infrastructure

How to get a status of a transaction for globalip assign/unassign


I use this api to assgin/unassign a ip address to/from a router. SoftLayer_Network_Subnet_IpAddress_Global.Route()/Unroute()

both methods return this datatype: SoftLayer_Provisioning_Version1_Transaction

When the transaction is succeed, what status will it be changed to? Are there other properties need to be checked besides the status to ensure it is completed and succeed?


Solution

  • It will be changed to transactionStatusId: 4 or to its name = COMPLETE.

    You can use this method to get the active transactions for your globalip http://sldn.softlayer.com/reference/services/SoftLayer_Network_Subnet_IpAddress_Global/getActiveTransaction

    also you could add the following mask to see the current status of the transaction: mask[transactionStatus]

    if the data returned by the method above is empty your transaction is complete.

    Regards