Skip to content

Commit

Permalink
Example template for network policy attach resource with sequence
Browse files Browse the repository at this point in the history
 1. add example template for both default sequence and user defined sequence
 2. Update the parameter file

Change-Id: Ie99d5c395ce9815066f33fb42056e654e70c1377
Closes-bug: #1507501
(cherry picked from commit b9a803b)
  • Loading branch information
bailkeri committed Nov 13, 2015
1 parent 9213019 commit 551f352
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrail_heat/env/network_policy_existing_network.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ parameters:
action: pass
private_net_1_name: 'default-domain:admin:contrail_net1'
private_net_2_name: 'default-domain:admin:contrail_net2'
major: 100
minor: 100
13 changes: 13 additions & 0 deletions contrail_heat/template/network_policy_existing_network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: >
HOT template to create a network policy for applying
service between two VNs created before.
Attach the network policy to two virtual networks
For the first network policy is attached at position specified by major/minor
number
For the second network, network policy is attached as the first policy with
default major, minor number i.e. 0,0
parameters:
policy_name:
Expand Down Expand Up @@ -33,6 +37,12 @@ parameters:
private_net_2_name:
type: string
description: Name of private network to be created
major:
type: number
description: Define the position where policy needs to be inserted
minor:
type: number
description: Define the position where policy needs to be inserted

resources:
private_policy:
Expand All @@ -56,6 +66,9 @@ resources:
properties:
network: { get_param: private_net_1_name }
policy: { get_attr: [private_policy, fq_name] }
sequence:
major: { get_param: major }
minor: { get_param: minor }

private_policy_attach_net2:
type: OS::Contrail::AttachPolicy
Expand Down

0 comments on commit 551f352

Please sign in to comment.