IBM-Cloud / bluemix-go

Go library for accessing the Bluemix API
Apache License 2.0
37 stars 89 forks source link

How to delete a worker node using Container V2 API? #437

Open dvasilen opened 8 months ago

dvasilen commented 8 months ago

I do not see a Container V2 API to Delete a worker node.

Compare:

Container1

//Workers ...
type Workers interface {
    List(clusterName string, target ClusterTargetHeader) ([]Worker, error)
    ListByWorkerPool(clusterIDOrName, workerPoolIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
    Get(clusterName string, target ClusterTargetHeader) (Worker, error)
    Add(clusterName string, params WorkerParam, target ClusterTargetHeader) error
    Delete(clusterName string, workerD string, target ClusterTargetHeader) error
    Update(clusterName string, workerID string, params WorkerUpdateParam, target ClusterTargetHeader) error
}

Container2

//Workers ...
type Workers interface {
    ListByWorkerPool(clusterIDOrName, workerPoolIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
    ListWorkers(clusterIDOrName string, showDeleted bool, target ClusterTargetHeader) ([]Worker, error)
    Get(clusterIDOrName, workerID string, target ClusterTargetHeader) (Worker, error)
    ReplaceWokerNode(clusterIDOrName, workerID string, target ClusterTargetHeader) (string, error)
    ListStorageAttachemnts(clusterIDOrName, workerID string, target ClusterTargetHeader) (VoulemeAttachments, error)
    GetStorageAttachment(clusterIDOrName, workerID, volumeAttachmentID string, target ClusterTargetHeader) (VoulemeAttachment, error)
    CreateStorageAttachment(payload VolumeRequest, target ClusterTargetHeader) (VoulemeAttachment, error)
    DeleteStorageAttachment(payload VolumeRequest, target ClusterTargetHeader) (string, error)
}

The Swagger also does not seem to have that https://containers.cloud.ibm.com/global/swagger-global-api/#/ The Cloud Web UI allows you to delete the worker node. What API call does it use for VPC/Gen2?