github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/css/v1/snapshots/urls.go (about) 1 package snapshots 2 3 import "github.com/huaweicloud/golangsdk" 4 5 // policyURL used to set or query the snapshot policy 6 func policyURL(c *golangsdk.ServiceClient, clusterId string) string { 7 return c.ServiceURL("clusters", clusterId, "index_snapshot/policy") 8 } 9 10 // enableURL used to automatically perform basic configurations for a cluster snapshot 11 func enableURL(c *golangsdk.ServiceClient, clusterId string) string { 12 return c.ServiceURL("clusters", clusterId, "index_snapshot/auto_setting") 13 } 14 15 // disableURL used to disable the snapshot function 16 func disableURL(c *golangsdk.ServiceClient, clusterId string) string { 17 return c.ServiceURL("clusters", clusterId, "index_snapshots") 18 } 19 20 // settingURL used to modify the basic configurations of a cluster snapshot, 21 // including the OBS bucket and IAM agency. 22 func settingURL(c *golangsdk.ServiceClient, clusterId string) string { 23 return c.ServiceURL("clusters", clusterId, "index_snapshot/setting") 24 } 25 26 // createURL used to manually create a snapshot 27 func createURL(c *golangsdk.ServiceClient, clusterId string) string { 28 return c.ServiceURL("clusters", clusterId, "index_snapshot") 29 } 30 31 // listURL used to query all snapshots of a cluster 32 func listURL(c *golangsdk.ServiceClient, clusterId string) string { 33 return c.ServiceURL("clusters", clusterId, "index_snapshots") 34 } 35 36 // restoreURL used to manually restore a snapshot 37 func restoreURL(c *golangsdk.ServiceClient, clusterId, snapId string) string { 38 return c.ServiceURL("clusters", clusterId, "index_snapshot", snapId, "restore") 39 } 40 41 // deleteURL used to delete a snapshot 42 func deleteURL(c *golangsdk.ServiceClient, clusterId, snapId string) string { 43 return c.ServiceURL("clusters", clusterId, "index_snapshot", snapId) 44 }