urls.go 695 B

1234567891011121314151617181920212223242526
  1. package l7policies
  2. import "devel.mephi.ru/iacherepanov/openstack-gophercloud"
  3. const (
  4. rootPath = "lbaas"
  5. resourcePath = "l7policies"
  6. rulePath = "rules"
  7. )
  8. func rootURL(c *gophercloud.ServiceClient) string {
  9. return c.ServiceURL(rootPath, resourcePath)
  10. }
  11. func resourceURL(c *gophercloud.ServiceClient, id string) string {
  12. return c.ServiceURL(rootPath, resourcePath, id)
  13. }
  14. func ruleRootURL(c *gophercloud.ServiceClient, policyID string) string {
  15. return c.ServiceURL(rootPath, resourcePath, policyID, rulePath)
  16. }
  17. func ruleResourceURL(c *gophercloud.ServiceClient, policyID string, ruleID string) string {
  18. return c.ServiceURL(rootPath, resourcePath, policyID, rulePath, ruleID)
  19. }