From b19576cb6d7cebb420808679488d29760192fa0c Mon Sep 17 00:00:00 2001 From: Arthur Chaloin Date: Fri, 6 Dec 2019 21:15:50 +0100 Subject: [PATCH] feat(endpoints): add expand volume route --- endpoints.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/endpoints.go b/endpoints.go index b105a44..5ecc1a2 100644 --- a/endpoints.go +++ b/endpoints.go @@ -39,6 +39,11 @@ func (client *Client) UnmapVolume(name, host string) (*Response, *ResponseStatus return client.Request(fmt.Sprintf("/unmap/volume/host/\"%s\"/\"%s\"", host, name)) } +// ExpandVolume : extend a volume if there is enough space on the vdisk +func (client *Client) ExpandVolume(name, size string) (*Response, *ResponseStatus, error) { + return client.Request(fmt.Sprintf("/expand/volume/size/\"%s\"/\"%s\"", size, name)) +} + // DeleteVolume : deletes a volume func (client *Client) DeleteVolume(name string) (*Response, *ResponseStatus, error) { return client.Request(fmt.Sprintf("/delete/volumes/\"%s\"", name))