From 85396172240a2e834ebdfeb5a6ac24408a21affb Mon Sep 17 00:00:00 2001 From: Eduardo Pozo Date: Thu, 17 Oct 2024 12:39:20 +0200 Subject: [PATCH] Linting, sanity --- plugins/modules/aci_oob_epg_to_contract.py | 16 +++++++--------- .../aci_oob_epg_to_contract/tasks/main.yml | 2 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/plugins/modules/aci_oob_epg_to_contract.py b/plugins/modules/aci_oob_epg_to_contract.py index 092cea5ca..c8dcb0b7d 100644 --- a/plugins/modules/aci_oob_epg_to_contract.py +++ b/plugins/modules/aci_oob_epg_to_contract.py @@ -187,8 +187,8 @@ def main(): argument_spec = aci_argument_spec() argument_spec.update(aci_annotation_spec()) argument_spec.update( - epg=dict(type='str', required=True), - contract=dict(type='str'), + epg=dict(type="str", required=True), + contract=dict(type="str"), state=dict(type="str", default="present", choices=["absent", "present", "query"]), ) @@ -201,9 +201,9 @@ def main(): ], ) - epg = module.params['epg'] - contract = module.params['contract'] - state = module.params['state'] + epg = module.params["epg"] + contract = module.params["contract"] + state = module.params["state"] ctProv_mo = "uni/tn-mgmt/oobbrc-{0}".format(contract) @@ -238,10 +238,8 @@ def main(): aci.get_existing() if state == "present": - aci.payload( - aci_class="mgmtRsOoBProv", - class_config=dict(tnVzOOBBrCPName=contract) - ) + aci.payload(aci_class="mgmtRsOoBProv", class_config=dict(tnVzOOBBrCPName=contract)) + aci.get_diff(aci_class="mgmtRsOoBProv") aci.post_config() diff --git a/tests/integration/targets/aci_oob_epg_to_contract/tasks/main.yml b/tests/integration/targets/aci_oob_epg_to_contract/tasks/main.yml index ff01ef4a4..7f8ca2c14 100644 --- a/tests/integration/targets/aci_oob_epg_to_contract/tasks/main.yml +++ b/tests/integration/targets/aci_oob_epg_to_contract/tasks/main.yml @@ -118,8 +118,6 @@ - cm_query_contract == nm_query_contract - nm_query_contract.current.0.mgmtRsOoBProv.attributes.dn == 'uni/tn-mgmt/mgmtp-default/oob-default/rsooBProv-default' - nm_query_contract.current.0.mgmtRsOoBProv.attributes.tCl == 'vzOOBBrCP' - # - nm_query_contract.current.0.mgmtRsOoBProv.attributes.tDn == 'uni/tn-common/oobbrc-default' - # REMOVE CONTRACT - name: Remove provided contract to mgmt:OoB (check_mode)