// Get performs request to given service and deserializes json response to struct. // out should be pointer to resulting structure. Returns error if request or // deserialization failed. func Get(client *gophercloud.ServiceClient, request string, out interface{}) error { url := client.ServiceURL(request) var resp interface{} _, err := client.Get(url, &resp, nil) if err != nil { return fmt.Errorf("request failed: (%v)", err) } err = mapstructure.Decode(resp, out) if err != nil { return fmt.Errorf("decoding failed: (%v)", err) } return nil }
func getURL(c *gophercloud.ServiceClient, stackName, stackID, resourceName, eventID string) string { return c.ServiceURL("stacks", stackName, stackID, "resources", resourceName, "events", eventID) }
func insertURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL(rootPath, resourcePath, id, insertPath) }
func resourceURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL(secgrouppath, id) }
func resourceRuleURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL(rulepath, id) }
func listByServerURL(c *gophercloud.ServiceClient, serverID string) string { return c.ServiceURL("servers", serverID, secgrouppath) }
func validateURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("validate") }
func deleteURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL("share-networks", id) }
func createURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("types") }
func getExtraSpecsURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL("types", id, "extra_specs") }
func getDefaultURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("types", "default") }
func listAssignmentsURL(client *gophercloud.ServiceClient) string { return client.ServiceURL("role_assignments") }
func createURL(c *gophercloud.ServiceClient, container string) string { return c.ServiceURL(container) }
func listURL(c *gophercloud.ServiceClient, stackName, stackID string) string { return c.ServiceURL("stacks", stackName, stackID, "events") }
func findURL(c *gophercloud.ServiceClient, stackName string) string { return c.ServiceURL("stacks", stackName, "events") }
func listDetailURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("share-networks", "detail") }
func createURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("share-networks") }
func deleteURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL("types", id) }
func getURL(c *gophercloud.ServiceClient, stackName, stackID string) string { return c.ServiceURL("stacks", stackName, stackID, "template") }
func resourceURL(c *gophercloud.ServiceClient, serverID string) string { return c.ServiceURL("servers", serverID, resourcePath) }
func rootURL(c *gophercloud.ServiceClient) string { return c.ServiceURL(secgrouppath) }
func instancesURL(c *gophercloud.ServiceClient, configID string) string { return c.ServiceURL("configurations", configID, "instances") }
func rootRuleURL(c *gophercloud.ServiceClient) string { return c.ServiceURL(rulepath) }
func listDSParamsURL(c *gophercloud.ServiceClient, datastoreID, versionID string) string { return c.ServiceURL("datastores", datastoreID, "versions", versionID, "parameters") }
func serverActionURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL("servers", id, "action") }
func getGlobalParamURL(c *gophercloud.ServiceClient, versionID, paramID string) string { return c.ServiceURL("datastores", "versions", versionID, "parameters", paramID) }
func rootURL(c *gophercloud.ServiceClient) string { return c.ServiceURL(rootPath, resourcePath) }
func baseURL(c *gophercloud.ServiceClient) string { return c.ServiceURL("configurations") }
func removeURL(c *gophercloud.ServiceClient, id string) string { return c.ServiceURL(rootPath, resourcePath, id, removePath) }
func resourceURL(c *gophercloud.ServiceClient, configID string) string { return c.ServiceURL("configurations", configID) }