openstack/rackspace get resource type schema op and unit test
diff --git a/openstack/orchestration/v1/stackresources/requests.go b/openstack/orchestration/v1/stackresources/requests.go
index cc2e09a..9ef8424 100644
--- a/openstack/orchestration/v1/stackresources/requests.go
+++ b/openstack/orchestration/v1/stackresources/requests.go
@@ -102,3 +102,16 @@
return pagination.NewPager(client, url, createPageFn)
}
+
+// Schema retreives the schema for the given resource type.
+func Schema(c *gophercloud.ServiceClient, resourceType string) SchemaResult {
+ var res SchemaResult
+
+ // Send request to API
+ _, res.Err = perigee.Request("GET", schemaURL(c, resourceType), perigee.Options{
+ MoreHeaders: c.AuthenticatedHeaders(),
+ Results: &res.Body,
+ OkCodes: []int{200},
+ })
+ return res
+}