Skip to content

Update global ip assign/unassign to use new API #1612

@allmightyspiff

Description

@allmightyspiff

SoftLayer_Network_Subnet_IpAddress_Global::route (and unroute) is the old API

$ slcli -v  globalip assign 12345 192.168.1.1
Calling: SoftLayer_Network_Subnet_IpAddress_Global::route(id=12345, mask='', filter='None', args=('192.168.1.1',), limit=None, offset=None))
SoftLayerAPIError(404): Unable to find object with id of '12345'.

Need to change this to use https://sldn.softlayer.com/reference/services/SoftLayer_Network_Subnet/route/ instead.
This will require using the Network_Subnet id for the Global IP

$ slcli --format=json call-api SoftLayer_Network_Subnet_IpAddress_Global getObject --id=163542 --mask="mask[id,ipAddress[id,subnet[id,cidr,gateway,subnetType]]]"
{
    "id": 163542,
    "ipAddress": {
        "id": 13082486,
        "subnet": {
            "cidr": 32,
            "gateway": "",
            "id": 524326
        }
    }
}

I'm not sure offhand about the exact syntax for the new Route command, but the docs are pretty verbose on it, so hopefully that will help.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions