-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice.yaml
68 lines (60 loc) · 2.19 KB
/
service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/4.4/types.yaml
- plugin:cloudify-opencontrail-plugin?version=2.14.7
inputs:
provisioning_deployment_name:
type: string
description: Name of provisioning deployment name to use (using provisioning.yaml)
default: opencontrail-provisioning
network_policy_name:
type: string
default: network_policy
description: network policy name to create
dsl_definitions:
api_configs: &api_configs
- user: { get_secret: opencontrail_user }
password: { get_secret: opencontrail_password }
tenant: { get_secret: opencontrail_tenant }
ip: { get_secret: opencontrail_ip }
port: { get_secret: opencontrail_port }
domain: { get_secret: opencontrail_domain }
node_templates:
left_network:
type: cloudify.nodes.opencontrail.VirtualNetwork
properties:
api_configs: *api_configs
name: { get_capability: [ {get_input: provisioning_deployment_name}, left_network_name ] }
use_existing_resource: true
right_network:
type: cloudify.nodes.opencontrail.VirtualNetwork
properties:
api_configs: *api_configs
name: { get_capability: [ {get_input: provisioning_deployment_name}, right_network_name ] }
use_existing_resource: true
network_policy:
type: cloudify.nodes.opencontrail.NetworkPolicy
properties:
api_configs: *api_configs
name: { get_input: network_policy_name }
policy_rule_list:
- direction: "<>"
protocol: "any"
src_addresses:
- virtual_network: { get_attribute: [left_network, fq_name] }
src_ports:
- end_port: -1
start_port: -1
dst_addresses:
- virtual_network: { get_attribute: [right_network, fq_name] }
dst_ports:
- end_port: -1
start_port: -1
action_list:
simple_action: "pass"
ethertype: "IPv4"
relationships:
- type: cloudify.relationships.opencontrail.attatch_network_policy_to_network
target: left_network
- type: cloudify.relationships.opencontrail.attatch_network_policy_to_network
target: right_network