SUMMARY
I tried to gather lab information from my CML2 environment, but the following error occurred, preventing me from doing so.
(snip)
File \"/xxx/venv/lib/python3.9/site-packages/httpx/_models.py\", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://100.64.17.16/api/v0/labs/085f1bc7-a471-4326-b0cf-3e90de055f4f/nodes/a96abfcf-061c-484e-b308-1f61d830488d/layer3_addresses'
Can't get L3 addresses of an external_connector.
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}
I created the lab structure shown below.
[ext-conn-0] -- G0/0[iosvl2-0]
The configuration for ext-conn-0 is the system bridge.
COMPONENT NAME
ANSIBLE AND LIBRARIES VERSION
% pip list | grep -e virl -e ansible
ansible-core 2.14.14
virl2_client 2.7.0
COLLECTION VERSION
latest
OS/ENVIRONMENT
CML2.7
CONFIGURATION
% ansible-config dump --only-changed
CONFIG_FILE() = None
STEPS TO REPRODUCE
I created the playbook and run it.
---
- name: Example
hosts: localhost
gather_facts: false
vars:
cml_host: 100.64.17.16
cml_username: admin
cml_password: secret
cml_lab: Example
ansible_python_interpreter: /<PATH>/venv/bin/python
tasks:
- name: Example
cisco.cml.cml_lab_facts:
host: "{{ cml_host }}"
user: "{{ cml_username }}"
password: "{{ cml_password }}"
validate_certs: false
lab: "{{ cml_lab }}"
register: results
- debug: msg="{{ results }}"
EXPECTED RESULTS
I expected to gather the lab information.
ACTUAL RESULTS
The following error occurred:
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://100.64.17.16/api/v0/labs/085f1bc7-a471-4326-b0cf-3e90de055f4f/nodes/a96abfcf-061c-484e-b308-1f61d830488d/layer3_addresses'
Can't get L3 addresses of an external_connector.
When ext-conn-0 does not exist, the module works correctly.
SUMMARY
I tried to gather lab information from my CML2 environment, but the following error occurred, preventing me from doing so.
I created the lab structure shown below.
The configuration for
ext-conn-0is the system bridge.COMPONENT NAME
ANSIBLE AND LIBRARIES VERSION
COLLECTION VERSION
latest
OS/ENVIRONMENT
CML2.7
CONFIGURATION
STEPS TO REPRODUCE
I created the playbook and run it.
EXPECTED RESULTS
I expected to gather the lab information.
ACTUAL RESULTS
The following error occurred:
When
ext-conn-0does not exist, the module works correctly.