ansible-aci icon indicating copy to clipboard operation
ansible-aci copied to clipboard

[minor_change] contract subject filter direction support

Open akinross opened this issue 3 years ago • 2 comments

fixes #303

discussion still needed for completion on the following topics:

  • api accepts all direction types, but GUI checkmark on subject does not

  • when combined all directions do show in GUI

  • when choice is made for "both" or a "combination of provider2consumer / consumer2provider" an additional api call will be required or restructure of code

  • direction not saved as part of object config of subject, which is also not something that can be requested. check would then be needed on the children objects of subject.

  • filter_existing in exit_json() used to manipulate the current/previous output. done in aci.py because another get_existing() is done for current status there. if done in aci_contract_subject_to_filter.py manipulation of current status was not possible when aci.exit_json() is called

akinross avatar Jul 04 '22 14:07 akinross

after discussion decided to reflect the GUI behaviour

akinross avatar Jul 05 '22 19:07 akinross

I am getting the following error when running the test cases:

TASK [aci_contract_subject_to_filter : create subject one-way] *****************
fatal: [cn-dmz-apic-m1-02-v42]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "annotation": "orchestrator:ansible",
            "apply_both_direction": "both",
            "certificate_name": null,
            "consumer_match": null,
            "contract": "contract1",
            "description": null,
            "direction": "one-way",
            "dscp": null,
            "dscp_consumer_to_provider": null,
            "dscp_provider_to_consumer": null,
            "host": "173.36.219.68",
            "name_alias": null,
            "output_level": "info",
            "output_path": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "port": null,
            "priority": null,
            "priority_consumer_to_provider": null,
            "priority_provider_to_consumer": null,
            "private_key": null,
            "provider_match": null,
            "reverse_filter": null,
            "state": "present",
            "subject": "subjectoneway",
            "tenant": "anstest",
            "timeout": 30,
            "use_proxy": true,
            "use_ssl": true,
            "username": "ansible_github_ci",
            "validate_certs": false
        }
    },
    "msg": "Unsupported parameters for (cisco.aci.aci_contract_subject) module: direction. Supported parameters include: apply_both_direction, use_proxy, private_key (cert_key), dscp (target), dscp_consumer_to_provider (target_consumer_to_provider), provider_match, output_level, output_path, timeout, priority_consumer_to_provider, description (descr), name_alias, priority_provider_to_consumer, annotation, certificate_name (cert_name), validate_certs, priority, contract (contract_name), dscp_provider_to_consumer (target_provider_to_consumer), reverse_filter, port, host (hostname), password, consumer_match, state, username (user), subject (contract_subject, name, subject_name), tenant (tenant_name), use_ssl."
}

lhercot avatar Oct 11 '22 00:10 lhercot