github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/mrs/v2/jobs/urls.go (about)

     1  package jobs
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/huaweicloud/golangsdk"
     7  )
     8  
     9  func buildRootPath(clusterId string) string {
    10  	return fmt.Sprintf("clusters/%s/job-executions", clusterId)
    11  }
    12  
    13  func rootURL(c *golangsdk.ServiceClient, clusterId string) string {
    14  	return c.ServiceURL(buildRootPath(clusterId))
    15  }
    16  
    17  func resourceURL(c *golangsdk.ServiceClient, clusterId, jobId string) string {
    18  	return c.ServiceURL(buildRootPath(clusterId), jobId)
    19  }
    20  
    21  func deleteURL(c *golangsdk.ServiceClient, clusterId string) string {
    22  	return c.ServiceURL(buildRootPath(clusterId), "batch-delete")
    23  }