Skip to content

Conversation

@chidanandpujar
Copy link
Collaborator

ansible-test network-integration tests for junos_facts.

Logs:

root@masterhost:~/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device# ansible-test network-integration --python 3.12 --inventory /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/integration/inventory.networking
Running junos_facts integration test role

PLAY [junos] *******************************************************************

TASK [prepare_junos_tests : Run the prepare steps if requested] ****************
included: /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/prepare_junos_tests/tasks/prepare.yml for local_test

TASK [prepare_junos_tests : Debug task] ****************************************
ok: [local_test] => {
    "msg": "START prepare_junos_tests/main.yaml"
}

TASK [prepare_junos_tests : Wait for netconf server to come up] ****************
ok: [local_test -> localhost] => (item=local_test)

TASK [junos_facts : Invoke netconf tasks] **************************************
included: /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tasks/local.yml for local_test

TASK [junos_facts : Collect netconf test cases] ********************************
[WARNING]: Platform linux on host local_test is using the discovered Python
interpreter at /usr/local/bin/python3.12, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.18/reference_appendices/interpreter_discovery.html for more information.
ok: [local_test]

TASK [junos_facts : Set test_items] ********************************************
ok: [local_test]

TASK [junos_facts : Run test case (connection=local)] **************************
included: /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tests/local/facts.yml for local_test => (item=/root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tests/local/facts.yml)

TASK [junos_facts : TEST 1 - Gather Facts] *************************************
ok: [local_test]

TASK [junos_facts : Check TEST 1] **********************************************
ok: [local_test] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [junos_facts : TEST 2 - get facts in xml format] **************************
ok: [local_test]

TASK [junos_facts : Check TEST 2] **********************************************
ok: [local_test] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [junos_facts : Invoke netconf tasks] **************************************
included: /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tasks/pyez.yml for local_test

TASK [junos_facts : Collect netconf test cases] ********************************
ok: [local_test]

TASK [junos_facts : Set test_items] ********************************************
ok: [local_test]

TASK [junos_facts : Run test case (connection=juniper.device.pyez)] ************
included: /root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tests/pyez/facts.yml for local_test => (item=/root/ansible_integration_test/ansible-junos-stdlib/ansible_collections/juniper/device/tests/output/.tmp/integration/junos_facts-wuxp64_t-ÅÑŚÌβŁÈ/tests/integration/targets/junos_facts/tests/pyez/facts.yml)

TASK [junos_facts : TEST 1 - Gather Facts] *************************************
ok: [local_test]

TASK [junos_facts : Check TEST 1] **********************************************
ok: [local_test] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [junos_facts : TEST 2 - get facts in xml format] **************************
ok: [local_test]

TASK [junos_facts : Check TEST 2] **********************************************
ok: [local_test] => {
    "changed": false,
    "msg": "All assertions passed"
}

PLAY RECAP *********************************************************************
local_test                 : ok=19   changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

#
# NOTE: Automatic provisioning of network instances on EC2 requires an ansible-core-ci API key.
[junos]
local_test ansible_host=x.x.x.x ansible_connection=local ansible_network_os="junos" ansible_user=xyz ansible_ssh_pass=xyz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add PyEZ connection.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the ansible_connection=local

tags: netconf
ansible.builtin.wait_for:
host: "{{ hostvars[item].ansible_host }}"
port: 830
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you load "netconf ssh" as pre-check validation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not supported
fatal: [junos_test]: FAILED! => {"msg": "to use the 'ssh' connection type with passwords or pkcs11_provider, you must install the sshpass program"}

@dineshbaburam91 dineshbaburam91 merged commit 1ca5310 into Juniper:master Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants