github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/cce/v3/nodes/urls.go (about)

     1  package nodes
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  const (
     6  	rootPath     = "clusters"
     7  	resourcePath = "nodes"
     8  )
     9  
    10  func rootURL(c *golangsdk.ServiceClient, clusterid string) string {
    11  	return c.ServiceURL(rootPath, clusterid, resourcePath)
    12  }
    13  
    14  func resourceURL(c *golangsdk.ServiceClient, clusterid, nodeid string) string {
    15  	return c.ServiceURL(rootPath, clusterid, resourcePath, nodeid)
    16  }
    17  
    18  func getJobURL(c *golangsdk.ServiceClient, jobid string) string {
    19  	return c.ServiceURL("jobs", jobid)
    20  }
    21  
    22  func removeNodeURL(c *golangsdk.ServiceClient, clusterid string) string {
    23  	return c.ServiceURL(rootPath, clusterid, resourcePath, "operation/remove")
    24  }
    25  
    26  func addNodeURL(c *golangsdk.ServiceClient, clusterid string) string {
    27  	return c.ServiceURL(rootPath, clusterid, resourcePath, "add")
    28  }