Bug 996596

Summary: [RFE] Make resource type schemata available in Heat API
Product: Red Hat OpenStack Reporter: Zane Bitter <zbitter>
Component: openstack-heatAssignee: Zane Bitter <zbitter>
Status: CLOSED ERRATA QA Contact: Angus Salkeld <asalkeld>
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: ajeain, hateya, mlopes, sbaker, sdake, sgordon, shardy, yeylon, zbitter
Target Milestone: Upstream M3Keywords: FutureFeature, OtherQA
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/heat/+spec/resource-properties-schema
Whiteboard:
Fixed In Version: openstack-heat-2013.2-0.8.b3.el6ost Doc Type: Enhancement
Doc Text:
Schema properties of each available resource type are now presented through the Orchestration API. Consequently, automated Orchestration clients are able to query the properties of a resource type.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:19:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1042645    
Bug Blocks: 975499    

Description Zane Bitter 2013-08-13 13:47:04 UTC
Add an API to Heat for getting the schema for any available resource type.

Comment 5 Ami Jeain 2013-10-28 11:40:05 UTC
QANAK'ing due to QE capacity

Comment 9 Angus Salkeld 2013-12-12 00:38:48 UTC
I can see the code is in rhos:
grep resource_types /usr/lib/python2.6/site-packages/heat/api/openstack/v1/__init__.py
            stack_mapper.connect("resource_types",
                                 "/resource_types",
                                 action="list_resource_types",
                                 "/resource_types/{type_name}",
                                 "/resource_types/{type_name}/template",


But there is no support for this feature in the client, so I didn't actually test it. :(

I have made an upstream bug for it: https://bugs.launchpad.net/python-heatclient/+bug/1260130

Comment 10 Angus Salkeld 2013-12-12 02:19:05 UTC
https://review.openstack.org/#/c/61624/

Comment 14 Angus Salkeld 2013-12-18 20:31:31 UTC
I verified using an upstream heat client against rhos:

$ heat resource-type-list
+------------------------------------------+
| resource_type                            |
+------------------------------------------+
| AWS::EC2::Instance                       |
| OS::Nova::Server                         |
| AWS::CloudFormation::Stack               |
...

$ heat resource-type-show AWS::EC2::VPC
{
  "attributes": {}, 
  "properties": {
    "CidrBlock": {
      "required": false, 
      "type": "string"
    }, 
    "Tags": {
      "required": false, 
      "type": "list", 
      "schema": {
        "*": {
          "required": false, 
          "type": "map", 
          "schema": {
            "Value": {
              "required": true, 
              "type": "string"
            }, 
            "Key": {
              "required": true, 
              "type": "string"
            }
          }
        }
      }
    }
  }, 
  "resource_type": "AWS::EC2::VPC"
}

Comment 16 errata-xmlrpc 2013-12-20 00:19:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html