# Test code for the ACI modules # Copyright 2017, Jacob McGill 1 - '"rsp-subtree-class=fvRsBd" in epg_query_all.filter_string' - '"class/fvAEPg.json" in epg_query_all.url' - name: delete epg - check mode works aci_epg: &aci_epg_absent <<: *aci_epg_present state: absent check_mode: yes register: delete_epg_check_mode - name: delete epg - delete works aci_epg: <<: *aci_epg_absent register: delete_epg - name: delete epg - idempotency works aci_epg: <<: *aci_epg_absent register: delete_epg_idempotent - name: delete epg - cleanup extra epg aci_epg: <<: *aci_epg_absent epg: anstest2 - name: delete epg - missing param fails aci_epg: <<: *aci_epg_absent tenant: "{{ fakevar | default(omit) }}" ignore_errors: yes register: delete_epg_missing_param - name: query assertions assert: that: - delete_epg_check_mode.changed == true - delete_epg_check_mode.previous != [] - delete_epg.changed == true - delete_epg.previous == delete_epg_check_mode.previous - delete_epg_idempotent.changed == false - delete_epg_idempotent.previous == [] - delete_epg_missing_param.failed == true - 'delete_epg_missing_param.msg == "state is absent but all of the following are missing: tenant"' - name: cleanup bd aci_bd: <<: *aci_bd_present state: absent when: bd_present.previous == [] - name: cleanup ap aci_ap: <<: *aci_ap_present state: absent when: ap_present.previous == [] - name: cleanup tenant aci_tenant: <<: *aci_tenant_present state: absent when: tenant_present.previous == []