-
Notifications
You must be signed in to change notification settings - Fork 2
/
infrastructure_endpoint-blueprint.yaml
147 lines (127 loc) · 5.14 KB
/
infrastructure_endpoint-blueprint.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/4.4/types.yaml
- plugin:cloudify-utilities-plugin
- imports/types.yaml
inputs:
docker_api_ip:
type: string
docker_api_port:
type: string
docker_api_version:
type: string
ovs_container_name:
type: string
ovs_main_bridge_name:
type: string
ovs_endpoint_bridge_name:
type: string
ovs_endpoint_bridge_from_main_bridge_interface_name:
type: string
ovs_endpoint_bridge_to_main_bridge_interface_name:
type: string
ovs_flows_default_table:
type: string
ovs_flows_default_priority:
type: string
node_templates:
ovs_endpoint_bridge:
type: cloudify.nodes.docker.ovs.Bridge
properties:
hosts:
- { get_input: docker_api_ip }
port: { get_input: docker_api_port }
api_version: { get_input: docker_api_version }
name: { get_input: ovs_endpoint_bridge_name }
container_name: { get_input: ovs_container_name }
ovs_endpoint_bridge_from_main_bridge_openflow_interface:
type: cloudify.nodes.docker.ovs.bridge.PatchInterface
properties:
hosts:
- { get_input: docker_api_ip }
port: { get_input: docker_api_port }
api_version: { get_input: docker_api_version }
container_name: { get_input: ovs_container_name }
bridge_name: { get_input: ovs_endpoint_bridge_name }
name:
concat:
- { get_input: ovs_endpoint_bridge_from_main_bridge_interface_name }
- '_endpoint'
peer_bridge_name: { get_input: ovs_main_bridge_name }
peer_interface_name:
concat:
- { get_input: ovs_endpoint_bridge_from_main_bridge_interface_name }
- '_main'
relationships:
- type: cloudify.relationships.connected_to
target: ovs_endpoint_bridge
ovs_endpoint_bridge_to_main_bridge_openflow_interface:
type: cloudify.nodes.docker.ovs.bridge.PatchInterface
properties:
hosts:
- { get_input: docker_api_ip }
port: { get_input: docker_api_port }
api_version: { get_input: docker_api_version }
container_name: { get_input: ovs_container_name }
bridge_name: { get_input: ovs_endpoint_bridge_name }
name:
concat:
- { get_input: ovs_endpoint_bridge_to_main_bridge_interface_name }
- '_endpoint'
peer_bridge_name: { get_input: ovs_main_bridge_name }
peer_interface_name:
concat:
- { get_input: ovs_endpoint_bridge_to_main_bridge_interface_name }
- '_main'
relationships:
- type: cloudify.relationships.connected_to
target: ovs_endpoint_bridge
ovs_endpoint_host_to_server_flow:
type: cloudify.nodes.docker.ovs.bridge.PermanentFlow
properties:
hosts:
- { get_input: docker_api_ip }
port: { get_input: docker_api_port }
api_version: { get_input: docker_api_version }
container_name: { get_input: ovs_container_name }
bridge_name: { get_input: ovs_endpoint_bridge_name }
table: { get_input: ovs_flows_default_table }
priority: { get_input: ovs_flows_default_priority }
in_port: { get_attribute: [ovs_endpoint_bridge_from_main_bridge_openflow_interface, id] }
out_port: { get_attribute: [ovs_endpoint_bridge_to_main_bridge_openflow_interface, id] }
relationships:
- type: cloudify.relationships.contained_in
target: ovs_endpoint_bridge
- type: cloudify.relationships.depends_on
target: ovs_endpoint_bridge_from_main_bridge_openflow_interface
- type: cloudify.relationships.depends_on
target: ovs_endpoint_bridge_to_main_bridge_openflow_interface
ovs_endpoint_server_to_host_flow:
type: cloudify.nodes.docker.ovs.bridge.PermanentFlow
properties:
hosts:
- { get_input: docker_api_ip }
port: { get_input: docker_api_port }
api_version: { get_input: docker_api_version }
container_name: { get_input: ovs_container_name }
bridge_name: { get_input: ovs_endpoint_bridge_name }
table: { get_input: ovs_flows_default_table }
priority: { get_input: ovs_flows_default_priority }
in_port: { get_attribute: [ovs_endpoint_bridge_to_main_bridge_openflow_interface, id] }
out_port: { get_attribute: [ovs_endpoint_bridge_from_main_bridge_openflow_interface, id] }
relationships:
- type: cloudify.relationships.contained_in
target: ovs_endpoint_bridge
- type: cloudify.relationships.depends_on
target: ovs_endpoint_bridge_from_main_bridge_openflow_interface
- type: cloudify.relationships.depends_on
target: ovs_endpoint_bridge_to_main_bridge_openflow_interface
outputs:
endpoint_bridge_from_main_bridge_ofport:
value: { get_attribute: [ovs_endpoint_bridge_from_main_bridge_openflow_interface, id] }
endpoint_bridge_to_main_bridge_ofport:
value: { get_attribute: [ovs_endpoint_bridge_to_main_bridge_openflow_interface, id] }
main_bridge_to_endpoint_bridge_ofport:
value: { get_attribute: [ovs_endpoint_bridge_from_main_bridge_openflow_interface, peer_id] }
main_bridge_from_endpoint_bridge_ofport:
value: { get_attribute: [ovs_endpoint_bridge_to_main_bridge_openflow_interface, peer_id] }