apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.05k stars 1.1k forks source link

Have ipaddress parameter for disassociateIpAddress api call #8125

Closed kiranchavala closed 11 months ago

kiranchavala commented 12 months ago

ISSUE TYPE

COMPONENT NAME

Component: API

CLOUDSTACK VERSION

Cloudstack version 4.18

SUMMARY

Have ipaddress parameter for disassociateIpAddress api call

Currently the associateIpAddress api call has "ipaddress" as a parameter

https://cloudstack.apache.org/api/apidocs-4.18/apis/associateIpAddress.html

End user can easily specify ip address which is easy to remember

Example

CMK > associate ipaddress ipaddress=10.0.52.18 zoneid=12d4e4f1-3a41-4ac2-9d70-283bd94904bf networkid=a1eea361-8438-4255-9f5f-13b80271ca51
{
  "ipaddress": {
    "account": "admin",
    "allocated": "2023-10-20T10:57:02+0000",
    "associatednetworkid": "a1eea361-8438-4255-9f5f-13b80271ca51",
    "associatednetworkname": "test",
    "domain": "ROOT",
    "domainid": "d38dcb64-6f0e-11ee-858b-1e009e000121",
    "fordisplay": true,
    "forvirtualnetwork": true,
    "hasannotations": false,
    "hasrules": false,
    "id": "2bfe1a94-6dc0-4719-b773-2d0918dc7a8e",
    "ipaddress": "10.0.52.18",
    "isportable": false,
    "issourcenat": false,
    "isstaticnat": false,
    "issystem": false,
    "networkid": "62bb362c-fe78-4868-94f6-e1c0ad1970a4",
    "physicalnetworkid": "05478365-35b6-4874-8954-7a4d3b26fd30",
    "state": "Allocated",
    "tags": [],
    "vlanid": "f40acef9-8764-4936-8637-dd59317032a4",
    "vlanname": "vlan://51",
    "zoneid": "12d4e4f1-3a41-4ac2-9d70-283bd94904bf",
    "zonename": "ref-trl-5856-k-M7-kiran-chavala"
  }
}

While for the disassociate ipaddress end user has to give the uuid of the e ip address

CMK > disassociate ipaddress id=2bfe1a94-6dc0-4719-b773-2d0918dc7a8e
{
  "success": true
}

It would be nice if ipaddress parameter is also present for the disassociate ipaddress api call

DaanHoogland commented 12 months ago

Good enhancement request. Let's extend to quarantine calls; see https://github.com/apache/cloudstack/pull/7378#pullrequestreview-1689879838

BryanMLima commented 11 months ago

Good enhancement request. Let's extend to quarantine calls; see #7378 (review)

The enhancement was added to the PR #7378.