Merge pull request #11764 from ansible/filter_hopcontrol_from_associatemodal

filter out both hop and control nodes instead of just one or the other
This commit is contained in:
Tiago Góes 2022-02-17 14:48:59 -03:00 committed by GitHub
commit 1ed0b70601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ function InstanceList() {
async (instancesToAssociate) => {
await Promise.all(
instancesToAssociate
.filter((i) => i.node_type !== 'control')
.filter((i) => i.node_type !== 'control' || i.node_type !== 'hop')
.map((instance) =>
InstanceGroupsAPI.associateInstance(instanceGroupId, instance.id)
)
@ -155,8 +155,7 @@ function InstanceList() {
InstancesAPI.read(
mergeParams(params, {
...{ not__rampart_groups__id: instanceGroupId },
...{ not__node_type: 'control' },
...{ not__node_type: 'hop' },
...{ not__node_type: ['hop', 'control'] },
})
),
[instanceGroupId]