Skip to content

Commit 94caac7

Browse files
committed
Avoid duplicate port attachment. Fix #25
Signed-off-by: Bharat Kunwar <brtknr@bath.edu>
1 parent e2b5758 commit 94caac7

14 files changed

+61
-194
lines changed

files/resources/cluster-group.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ resources:
141141
config_drive: { get_param: cluster_config_drive }
142142
group_node_ports: { get_attr: [port_group, networks] }
143143
group_node_ips: { get_attr: [port_group, primary_ip] }
144+
group_node_internal_ips: { get_attr: [port_group, internal_ip] }
144145
node_idx: "%index%"
145146

146147
outputs:

files/resources/instance-multi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ parameters:
3737
group_node_ips:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_internal_ips:
41+
type: json
42+
label: List of internal IPs for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -116,5 +119,6 @@ outputs:
116119
value:
117120
name: {get_param: name}
118121
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
122+
internal_ip: {get_param: [group_node_internal_ips, {get_param: node_idx}]}
119123
id: {get_resource: instance}
120124
ports_gt_1: {equals: [ports_gt_1_yaql, True]}

files/resources/instance-w-volume.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ parameters:
3737
group_node_ips:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_internal_ips:
41+
type: json
42+
label: List of internal IPs for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -116,4 +119,5 @@ outputs:
116119
value:
117120
name: {get_param: name}
118121
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
122+
internal_ip: {get_param: [group_node_internal_ips, {get_param: node_idx}]}
119123
id: {get_resource: instance}

files/resources/instance.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ parameters:
3737
group_node_ips:
3838
type: json
3939
label: List of primary IPs for all nodes in this group
40+
group_node_internal_ips:
41+
type: json
42+
label: List of internal IPs for all nodes in this group
4043
node_idx:
4144
type: number
4245
label: Resource group index of this node
@@ -67,4 +70,5 @@ outputs:
6770
value:
6871
name: {get_param: name}
6972
ip: {get_param: [group_node_ips, {get_param: node_idx}]}
73+
internal_ip: {get_param: [group_node_internal_ips, {get_param: node_idx}]}
7074
id: {get_resource: instance}

files/resources/nodenet-1.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ outputs:
5252
value:
5353
- port: { get_resource: port }
5454

55+
internal_ip:
56+
description: The IP assigned on the named cluster networks
57+
value:
58+
- { get_attr: [ port, fixed_ips, 0, ip_address ] }
59+
5560
primary_ip:
56-
description: ID of the IP assigned on the named cluster network
61+
description: The primary IP of the instance
5762
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }

files/resources/nodenet-2-w-fip-sriov.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ outputs:
7979
- port: { get_resource: port1 }
8080
- port: { get_resource: port2 }
8181

82+
internal_ip:
83+
description: The IP assigned on the named cluster networks
84+
value:
85+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
86+
- { get_attr: [ port2, fixed_ips, 0, ip_address ] }
87+
8288
primary_ip:
8389
description: The primary IP of the instance
8490
value: { get_attr: [ floating_ip, floating_ip_address ] }

files/resources/nodenet-2-w-fip.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,27 @@ resources:
6060
type: OS::Neutron::FloatingIPAssociation
6161
properties:
6262
floatingip_id: { get_resource: floating_ip }
63-
port_id: { get_resource: port }
63+
port_id: { get_resource: port1 }
6464

6565
outputs:
6666
OS::stack_id:
6767
description: The network list
6868
value:
69-
- port: { get_resource: port }
69+
- port1: { get_resource: port1 }
70+
- port2: { get_resource: port2 }
7071

7172
networks:
7273
description: The network list
7374
value:
74-
- port: { get_resource: port }
75+
- port: { get_resource: port1 }
76+
- port: { get_resource: port2 }
7577

76-
internal_ip1:
77-
description: ID of the IP assigned on the first named cluster network
78-
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }
79-
80-
internal_ip2:
81-
description: ID of the IP assigned on the second cluster network
82-
value: { get_attr: [ port, fixed_ips, 1, ip_address ] }
78+
internal_ip:
79+
description: The IP assigned on the named cluster networks
80+
value:
81+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
82+
- { get_attr: [ port2, fixed_ips, 0, ip_address ] }
8383

8484
primary_ip:
85-
description: ID of the Neutron floating IP
85+
description: The primary IP of the instance
8686
value: { get_attr: [ floating_ip, floating_ip_address ] }

files/resources/nodenet-2.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ outputs:
7878
- port: { get_resource: port1 }
7979
- port: { get_resource: port2 }
8080

81+
internal_ip:
82+
description: The IP assigned on the named cluster networks
83+
value:
84+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
85+
- { get_attr: [ port2, fixed_ips, 0, ip_address ] }
86+
8187
primary_ip:
82-
description: ID of the IP assigned on the named cluster network
88+
description: The primary IP of the instance
8389
value: { get_attr: [ port1, fixed_ips, 0, ip_address ] }

files/resources/nodenet-3.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ outputs:
8383
- port: { get_resource: port2 }
8484
- port: { get_resource: port3 }
8585

86+
internal_ip:
87+
description: The IP assigned on the named cluster networks
88+
value:
89+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
90+
- { get_attr: [ port2, fixed_ips, 0, ip_address ] }
91+
- { get_attr: [ port3, fixed_ips, 0, ip_address ] }
92+
8693
primary_ip:
87-
description: ID of the IP assigned on the named cluster network
94+
description: The primary IP of the instance
8895
value: { get_attr: [ port1, fixed_ips, 0, ip_address ] }

files/resources/nodenet-w-fip.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ outputs:
6565
- port: { get_resource: port }
6666

6767
internal_ip:
68-
description: ID of the IP assigned on the named cluster network
69-
value: { get_attr: [ port, fixed_ips, 0, ip_address ] }
68+
description: The IP assigned on the named cluster networks
69+
value:
70+
- { get_attr: [ port, fixed_ips, 0, ip_address ] }
7071

7172
primary_ip:
72-
description: ID of the Neutron floating IP
73+
description: The primary IP of the instance
7374
value: { get_attr: [ floating_ip, floating_ip_address ] }

0 commit comments

Comments
 (0)