Currently for each driver has following code 1) Create a fixed Network. 2) Create a fixed subnet in the network created at step 1. 3) Create a router 4) Attach subnet(created at step2) to router(created at step 3) A new resource is created for above tasks in network.yaml file. New resource does the above tasks and output the fixed network ID and fixed subnet id, which is used by other parts of the heat template. Change-Id: Ib347ce5c54c6566300a43e05b277bf80351a2256 Closes-Bug: #1606912changes/58/347858/29
parent
5ede934aaf
commit
10e85ee6ce
@ -0,0 +1,60 @@
|
||||
heat_template_version: 2014-10-16
|
||||
|
||||
description: >
|
||||
Creates network resources for the cluster. allocate a network and
|
||||
router for our server.
|
||||
|
||||
parameters:
|
||||
|
||||
fixed_network_cidr:
|
||||
type: string
|
||||
description: network range for fixed ip network
|
||||
|
||||
fixed_network_name:
|
||||
type: string
|
||||
description: fixed network name
|
||||
default: ""
|
||||
|
||||
dns_nameserver:
|
||||
type: string
|
||||
description: address of a dns nameserver reachable in your environment
|
||||
|
||||
external_network:
|
||||
type: string
|
||||
description: uuid/name of a network to use for floating ip addresses
|
||||
|
||||
resources:
|
||||
fixed_network:
|
||||
type: OS::Neutron::Net
|
||||
properties:
|
||||
name: {get_param: fixed_network_name}
|
||||
|
||||
fixed_subnet:
|
||||
type: OS::Neutron::Subnet
|
||||
properties:
|
||||
cidr: {get_param: fixed_network_cidr}
|
||||
network: {get_resource: fixed_network}
|
||||
dns_nameservers:
|
||||
- {get_param: dns_nameserver}
|
||||
|
||||
extrouter:
|
||||
type: OS::Neutron::Router
|
||||
properties:
|
||||
external_gateway_info:
|
||||
network: {get_param: external_network}
|
||||
|
||||
extrouter_inside:
|
||||
type: OS::Neutron::RouterInterface
|
||||
properties:
|
||||
router_id: {get_resource: extrouter}
|
||||
subnet: {get_resource: fixed_subnet}
|
||||
|
||||
outputs:
|
||||
fixed_network:
|
||||
description: >
|
||||
Created fixed network ID
|
||||
value: {get_resource: fixed_network}
|
||||
fixed_subnet:
|
||||
description: >
|
||||
Created fixed subnet ID
|
||||
value: {get_resource: fixed_subnet}
|
Loading…
Reference in new issue