<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
The Quantum resource types have just landed in Heat master. I think
they are ready now for some Quantum developers to write some
templates to build some common scenarios.<br>
<br>
The aim was to define resource types which mapped as closely as
possible to the REST calls, which has made for a fairly clean
implementation.<br>
<br>
The following types have been defined:<br>
OS::Quantum::FloatingIP<br>
OS::Quantum::FloatingIPAssociation<br>
OS::Quantum::Net<br>
OS::Quantum::Port<br>
OS::Quantum::Router<br>
OS::Quantum::RouterInterface<br>
OS::Quantum::RouterGateway<br>
OS::Quantum::Subnet<br>
<br>
Here are some example templates with them in use:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template">https://raw.github.com/heat-api/heat/master/templates/Quantum.template</a><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template">https://raw.github.com/heat-api/heat/master/templates/Quantum_floating.template</a><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template">https://raw.github.com/heat-api/heat/master/templates/WordPress_Single_Instance_With_Quantum.template</a><br>
<br>
Heat resource types have a strict validated Properties schema
however some Quantum resources allow arbitrary key/value pairs for
configuration. This is made possible with the unvalidated
value_specs property, eg:<br>
"external_network": {<br>
"Type": "OS::Quantum::Net",<br>
"Properties": {<br>
"value_specs": {<br>
"router:external", true<br>
}<br>
}<br>
},<br>
<br>
Because Heat templates always execute in the context of a tenant,
Quantum resources can only be created in the user's tenant and
cannot be flagged as shared.<br>
<br>
If you are running devstack with Quantum and Heat enabled you should
be able to do the following:<br>
cd ../heat<br>
<br>
bin/heat-cfn create Quantum
--template-file=templates/Quantum.template<br>
bin/heat-cfn describe Quantum<br>
<br>
bin/heat-cfn create Quantum_floating
--template-file=templates/Quantum_floating.template --parameters="\<br>
external_network=`quantum net-list -F id -- --name=nova | awk
"NR==4" | cut -d' ' -f2`;\<br>
internal_network=`quantum net-list -F id -- --name=private | awk
"NR==4" | cut -d' ' -f2`;\<br>
internal_subnet=`quantum subnet-list -F id -- --cidr=10.0.0.0/24 |
awk "NR==4" | cut -d' ' -f2`"<br>
<br>
bin/heat-cfn create Quantum_instance
--template-file=templates/WordPress_Single_Instance_With_Quantum.template--parameters="InstanceType=m1.large;DBUsername=wp;DBPassword=verybadpassword;KeyName=heat_key;LinuxDistribution=F17"<br>
<br>
If you want a hand on IRC then you can join #heat or ping stevebake.<br>
<br>
cheers<br>
<br>
</body>
</html>