This is very cool stuff Steve, and something I've been looking forward to for a long time. Thanks for the great work on this.<div><br></div><div>Dan<br><div><br></div><div><br><br><div class="gmail_quote">On Tue, Nov 6, 2012 at 2:59 PM, Steve Baker <span dir="ltr"><<a href="mailto:sbaker@redhat.com" target="_blank">sbaker@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
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>
<a href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template" target="_blank">https://raw.github.com/heat-api/heat/master/templates/Quantum.template</a><br>
<a href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template" target="_blank">https://raw.github.com/heat-api/heat/master/templates/Quantum_floating.template</a><br>
<a href="https://raw.github.com/heat-api/heat/master/templates/Quantum.template" target="_blank">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=<a href="http://10.0.0.0/24" target="_blank">10.0.0.0/24</a> |
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>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Dan Wendlandt <div>Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a><br><div>twitter: danwendlandt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~<br></div></div><br>
</div></div>