-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Adding sample templates - creating virtual-network in a differ…
…ent project - creating virtual-network with two subnets" into R3.0
- Loading branch information
Showing
4 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
contrail_heat/new_envs/virtual_network_in_different_project.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
parameters: | ||
private_net_1_name: contrail_net1 | ||
private_net_1_prefix: 10.1.1.0 | ||
private_net_1_prefix_len: 24 | ||
allow_transit: True | ||
forwarding_mode: l2_l3 | ||
route_target_1: "target:55:12345" | ||
route_target_2: "target:66:23456" | ||
project_fqdn: "default-domain:demo" |
10 changes: 10 additions & 0 deletions
10
contrail_heat/new_envs/virtual_network_with_two_subnet.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
parameters: | ||
private_net_1_name: contrail_net1 | ||
private_net_1_prefix: 10.1.1.0 | ||
private_net_1_prefix_len: 24 | ||
private_net_2_prefix: 20.2.2.0 | ||
private_net_2_prefix_len: 24 | ||
allow_transit: True | ||
forwarding_mode: l2_l3 | ||
route_target_1: "target:55:12345" | ||
route_target_2: "target:66:23456" |
66 changes: 66 additions & 0 deletions
66
contrail_heat/new_templates/virtual_network_in_different_project.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
heat_template_version: 2015-04-30 | ||
|
||
description: > | ||
HOT template to creates a virtual network with one subnet each. | ||
set allow-transit, forwarding_mode and route-targets | ||
parameters: | ||
private_net_1_name: | ||
type: string | ||
description: Name of private network to be created | ||
private_net_1_prefix: | ||
type: string | ||
description: Private network address prefix | ||
private_net_1_prefix_len: | ||
type: string | ||
description: Private network address prefix len | ||
allow_transit: | ||
type: boolean | ||
description: Private network allow transit | ||
forwarding_mode: | ||
type: string | ||
description: Private network forwarding_mode | ||
route_target_1: | ||
type: string | ||
description: Private network route-target | ||
route_target_2: | ||
type: string | ||
description: Private network route-target | ||
project_fqdn: | ||
type: string | ||
description: Project where we create the virtual-network | ||
|
||
resources: | ||
template_NetworkIpam_1: | ||
type: OS::Contrail::NetworkIpam | ||
properties: | ||
name: { get_param: private_net_1_name } | ||
|
||
template_VirtualNetwork_1: | ||
type: OS::Contrail::VirtualNetwork | ||
depends_on: [ template_NetworkIpam_1 ] | ||
properties: | ||
name: { get_param: private_net_1_name } | ||
virtual_network_properties: | ||
{ | ||
virtual_network_properties_allow_transit: { get_param: allow_transit }, | ||
virtual_network_properties_forwarding_mode: { get_param: forwarding_mode }, | ||
} | ||
route_target_list: | ||
{ | ||
route_target_list_route_target: [{ get_param: route_target_1 }, { get_param: route_target_2 }], | ||
} | ||
network_ipam_refs: [{ get_resource: template_NetworkIpam_1 }] | ||
network_ipam_refs_data: | ||
[{ | ||
network_ipam_refs_data_ipam_subnets: | ||
[{ | ||
network_ipam_refs_data_ipam_subnets_subnet: | ||
{ | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: { get_param: private_net_1_prefix }, | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: { get_param: private_net_1_prefix_len }, | ||
}, | ||
}] | ||
}] | ||
project: { get_param: project_fqdn } | ||
|
74 changes: 74 additions & 0 deletions
74
contrail_heat/new_templates/virtual_network_with_two_subnet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
heat_template_version: 2015-04-30 | ||
|
||
description: > | ||
HOT template to creates a virtual network with one subnet each. | ||
set allow-transit, forwarding_mode and route-targets | ||
parameters: | ||
private_net_1_name: | ||
type: string | ||
description: Name of private network to be created | ||
private_net_1_prefix: | ||
type: string | ||
description: Private network address prefix | ||
private_net_1_prefix_len: | ||
type: string | ||
description: Private network address prefix len | ||
private_net_2_prefix: | ||
type: string | ||
description: Private network address prefix | ||
private_net_2_prefix_len: | ||
type: string | ||
description: Private network address prefix len | ||
allow_transit: | ||
type: boolean | ||
description: Private network allow transit | ||
forwarding_mode: | ||
type: string | ||
description: Private network forwarding_mode | ||
route_target_1: | ||
type: string | ||
description: Private network route-target | ||
route_target_2: | ||
type: string | ||
description: Private network route-target | ||
|
||
resources: | ||
template_NetworkIpam_1: | ||
type: OS::Contrail::NetworkIpam | ||
properties: | ||
name: { get_param: private_net_1_name } | ||
|
||
template_VirtualNetwork_1: | ||
type: OS::Contrail::VirtualNetwork | ||
depends_on: [ template_NetworkIpam_1 ] | ||
properties: | ||
name: { get_param: private_net_1_name } | ||
virtual_network_properties: | ||
{ | ||
virtual_network_properties_allow_transit: { get_param: allow_transit }, | ||
virtual_network_properties_forwarding_mode: { get_param: forwarding_mode }, | ||
} | ||
route_target_list: | ||
{ | ||
route_target_list_route_target: [{ get_param: route_target_1 }, { get_param: route_target_2 }], | ||
} | ||
network_ipam_refs: [{ get_resource: template_NetworkIpam_1 }] | ||
network_ipam_refs_data: | ||
[{ | ||
network_ipam_refs_data_ipam_subnets: | ||
[{ | ||
network_ipam_refs_data_ipam_subnets_subnet: | ||
{ | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: { get_param: private_net_1_prefix }, | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: { get_param: private_net_1_prefix_len }, | ||
}, | ||
}, | ||
{ | ||
network_ipam_refs_data_ipam_subnets_subnet: | ||
{ | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix: { get_param: private_net_2_prefix }, | ||
network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len: { get_param: private_net_2_prefix_len }, | ||
}, | ||
}] | ||
}] |