Skip to content

Commit e1aeed4

Browse files
committed
Better support for 2-port instances
- When creating 2-port instances, check for security groups on each net. - Add NodeNet2WithFIP to the nodenet library.
1 parent 7b88103 commit e1aeed4

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

files/environments/nodenet-library.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resource_registry:
55
Cluster::NodeNet1WithFIP: ../resources/nodenet-w-fip.yaml
66
Cluster::NodeNet1WithPreallocatedFIP: ../resources/nodenet-w-prealloc-fip.yaml
77
Cluster::NodeNet2: ../resources/nodenet-2.yaml
8+
Cluster::NodeNet2WithFIP: ../resources/nodenet-2-w-fip.yaml
89
Cluster::NodeNet3: ../resources/nodenet-3.yaml
910
Cluster::NodeNet2WithFIPSRIOV: ../resources/nodenet-2-w-fip-sriov.yaml
1011
Cluster::NodeNet3WithFIPSRIOV: ../resources/nodenet-3-w-fip-sriov.yaml

files/resources/cluster-group.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ parameters:
4444
- "Cluster::NodeNet1WithFIP"
4545
- "Cluster::NodeNet1WithPreallocatedFIP"
4646
- "Cluster::NodeNet2"
47+
- "Cluster::NodeNet2WithFIP"
48+
- "Cluster::NodeNet2WithFIPSRIOV"
4749
- "Cluster::NodeNet3"
50+
- "Cluster::NodeNet3WithFIPSRIOV"
4851
group_idx:
4952
type: number
5053
label: Cluster group index

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ parameters:
2222
default: []
2323

2424
conditions:
25-
security_groups_set:
25+
security_groups_port1:
2626
yaql:
2727
expression: $.data.cluster_net.containsKey('security_groups')
2828
data:
2929
cluster_net: { get_param: [ cluster_net, 0 ] }
3030

31+
security_groups_port2:
32+
yaql:
33+
expression: $.data.cluster_net.containsKey('security_groups')
34+
data:
35+
cluster_net: { get_param: [ cluster_net, 1 ] }
36+
3137
resources:
3238

3339
port1:
@@ -36,7 +42,7 @@ resources:
3642
network: { get_param: [ cluster_net, 0, net ] }
3743
security_groups:
3844
if:
39-
- security_groups_set
45+
- security_groups_port1
4046
- { get_param: [ cluster_net, 0, security_groups ] }
4147
- []
4248
fixed_ips:
@@ -47,7 +53,10 @@ resources:
4753
properties:
4854
network: { get_param: [ cluster_net, 1, net ] }
4955
security_groups:
50-
- []
56+
if:
57+
- security_groups_port2
58+
- { get_param: [ cluster_net, 1, security_groups ] }
59+
- []
5160
fixed_ips:
5261
- subnet_id: { get_param: [ cluster_net, 1, subnet ] }
5362

files/resources/nodenet-2.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,18 @@ parameters:
2525
default: []
2626

2727
conditions:
28-
security_groups_set:
28+
security_groups_port1:
2929
yaql:
3030
expression: $.data.cluster_net.containsKey('security_groups')
3131
data:
3232
cluster_net: { get_param: [ cluster_net, 0 ] }
3333

34+
security_groups_port2:
35+
yaql:
36+
expression: $.data.cluster_net.containsKey('security_groups')
37+
data:
38+
cluster_net: { get_param: [ cluster_net, 1 ] }
39+
3440
resources:
3541

3642
port1:
@@ -39,7 +45,7 @@ resources:
3945
network: { get_param: [ cluster_net, 0, net ] }
4046
security_groups:
4147
if:
42-
- security_groups_set
48+
- security_groups_port1
4349
- { get_param: [ cluster_net, 0, security_groups ] }
4450
- []
4551
fixed_ips:
@@ -51,7 +57,7 @@ resources:
5157
network: { get_param: [ cluster_net, 1, net ] }
5258
security_groups:
5359
if:
54-
- security_groups_set
60+
- security_groups_port2
5561
- { get_param: [ cluster_net, 1, security_groups ] }
5662
- []
5763
fixed_ips:

0 commit comments

Comments
 (0)