Skip to content

Commit 678b8c5

Browse files
committed
add: function to check if the machine pool contains a specific label
1 parent e76a32b commit 678b8c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

support/ocm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ func GetMachinePools(t Test, connection *ocmsdk.Connection) []*cmv1.MachinePool
7272
func MachinePoolId(machinePool *cmv1.MachinePool) string {
7373
return machinePool.ID()
7474
}
75+
76+
func MachinePoolHasLabelKey(machinePool *cmv1.MachinePool, key string) bool {
77+
labels := machinePool.Labels()
78+
_, exists := labels[key]
79+
return exists
80+
}

0 commit comments

Comments
 (0)