Not able to cancel vlan using softlayer api

180 views Asked by At

I have cancelled portable subnets using billing_svc.cancelItem(billingItemId) sl api call. Verified cancellation sl ticket is opened for cancellation. But still seeing the portable subnet in SL portal, it doesn't provide the option to cancel it.

while trying to cancel vlan using billingItem, getting the below error:

SoftLayerAPIError(SoftLayer_Exception_Public): This cancellation could not be processed please contact support. Unable to cancel VLAN. Reasons: 1 non-primary subnets still on the VLAN.

1

There are 1 answers

0
Pedro David Fuentes Antezana On BEST ANSWER

The error states that a non-primary subnet is still on the VLAN. In order to fix this you need to run the cancelItem method using the non-primary Subnet billing item id.

The result of this is that the subnet will be without its billing item and then you need to wait until a job process starts the reclaim process of all billing items (it should run once a day, or usually within 24 hours).

Finally, the VLAN should be without the referred subnet and the cancelItem method should be successfully run using the VLAN billing id.

This would be the request to retrieve the VLAN and its non-primary subnet billing item id

https://$username:[email protected]/rest/v3/SoftLayer_Network_Vlan/$networkVlanId/getObject.json?objectMask=mask[billingItem[id],secondarySubnets[billingItem[id]]]
Method: GET

Then use the Subnet billing item id to cancel it with the next request:

https://$username:[email protected]/rest/v3/SoftLayer_Billing_Item/$subnetBillingItemId/cancelItem.json
Method: DELETE
Body:
{
                "parameters": [
                                true
                ]
}