Make the heat template work with nova-network

The current template assumes that neutron is used, this patch updates it
to work with both nova-net and neutron.

Change-Id: I98a1b9956be62e07f0b931d956a8f546248addfe
Closes-Bug: #1308359
This commit is contained in:
Gauvain Pocentek 2014-04-16 09:44:25 +02:00
parent 8be5f98ff7
commit bd717859ac
2 changed files with 3 additions and 14 deletions

View File

@ -9,9 +9,6 @@ parameters:
NetID:
type: string
description: Network ID for the server
SubNetID:
type: string
description: Subnet ID for the server
resources:
server1:
@ -21,14 +18,7 @@ resources:
image: { get_param: ImageID }
flavor: "m1.tiny"
networks:
- port: { get_resource: server1_port }
server1_port:
type: OS::Neutron::Port
properties:
network_id: { get_param: NetID }
fixed_ips:
- subnet_id: { get_param: SubNetID }
- network: { get_param: NetID }
outputs:
server1_private_ip:

View File

@ -23,10 +23,9 @@
<para>Use the <command>heat stack-create</command> command to create a stack
from this template:</para>
<screen><prompt>$</prompt> <userinput>NET_ID=$(neutron net-list | awk '/ demo-net / { print $2 }')</userinput>
<prompt>$</prompt> <userinput>SUBNET_ID=$(neutron subnet-list | awk '/ demo-subnet / { print $2 }')</userinput>
<screen><prompt>$</prompt> <userinput>NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')</userinput>
<prompt>$</prompt> <userinput>heat stack-create -f test-stack.yml \
-P "ImageID=cirros-0.3.2-x86_64;NetID=$NET_ID;SubNetID=$SUBNET_ID" testStack</userinput>
-P "ImageID=cirros-0.3.2-x86_64;NetID=$NET_ID" testStack</userinput>
<computeroutput>+--------------------------------------+------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+--------------------+----------------------+