Skip to content

Commit

Permalink
[Ignore] Fixed based on PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
samiib authored and lhercot committed Feb 28, 2024
1 parent 0ac0017 commit 1bd88f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions plugins/modules/aci_cloud_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@
aws_availability_zone:
description:
- The cloud zone which is attached to the given cloud context profile.
- Only used when it is an AWS cloud apic.
- Only used when it is an AWS Cloud APIC.
type: str
aliases: [availability_zone, av_zone, zone]
vnet_gateway:
description:
- Determine if a vNet Gateway Router will be deployed or not.
- Only used when it is an Azure cloud apic.
- Only used when it is an Azure Cloud APIC.
type: bool
default: false
azure_region:
description:
- The Azure cloud region to attach this subnet to.
- Only used when it is an Azure cloud apic.
- Only used when it is an Azure Cloud APIC.
type: str
aliases: [az_region]
state:
Expand Down Expand Up @@ -273,6 +273,7 @@ def main():
["state", "absent", ["tenant", "cloud_context_profile", "cidr", "address"]],
["state", "present", ["tenant", "cloud_context_profile", "cidr", "address"]],
],
mutually_exclusive=[("aws_availability_zone", "azure_region")],
)

name = module.params.get("name")
Expand All @@ -288,9 +289,6 @@ def main():
azure_region = module.params.get("azure_region")
child_configs = []

if aws_availability_zone and azure_region:
module.fail_json(msg="Configuring both an AWS availability zone and an Azure region is invalid.")

aci = ACIModule(module)
aci.construct_url(
root_class=dict(aci_class="fvTenant", aci_rn="tn-{0}".format(tenant), target_filter='eq(fvTenant.name, "{0}")'.format(tenant), module_object=tenant),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/aci_cloud_subnet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
- nm_add_subnet_again.previous.0.cloudSubnet.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1/cidr-[10.50.0.0/16]/subnet-[10.50.0.1]"
- nm_add_subnet_again.previous.0.cloudSubnet.attributes.annotation == "orchestrator:ansible"
- nm_add_subnet_again.previous.0.cloudSubnet.attributes.scope == "private"
- nm_invalid_subnet_zone.msg == "Configuring both an AWS availability zone and an Azure region is invalid."
- nm_invalid_subnet_zone.msg == "parameters are mutually exclusive{{":"}} aws_availability_zone|azure_region"

- name: Verify create tasks for Azure
ansible.builtin.assert:
Expand Down

0 comments on commit 1bd88f0

Please sign in to comment.