Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish IOL test #2352

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 37 additions & 28 deletions tests/10-basic-cisco_iol/01-iol.robot
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ Write configuration to NVRAM on router1
Should Contain ${output} [OK]

Log IP addresses for router1
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq '.nodes.router1."mgmt-ipv4-address"'
Log ${ipv4_addr}
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq '.nodes.router1."mgmt-ipv4-address"'
Log \n--> LOG: IPv4 addr - ${ipv4_addr} console=True
Should Be Equal As Integers ${rc} 0
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq '.nodes.router1."mgmt-ipv6-address"'
Log ${ipv6_addr}
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq '.nodes.router1."mgmt-ipv6-address"'
Log \n--> LOG: IPv6 addr - ${ipv6_addr} console=True

Write configuration to NVRAM on switch
${rc} ${output} = Run And Return Rc And Output
Expand All @@ -77,38 +77,42 @@ Write configuration to NVRAM on switch
Should Contain ${output} [OK]

Log IP addresses for switch
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq '.nodes.switch."mgmt-ipv4-address"'
Log ${ipv4_addr}
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq '.nodes.switch."mgmt-ipv4-address"'
Log \n--> LOG: IPv4 addr - ${ipv4_addr} console=True
Should Be Equal As Integers ${rc} 0
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq '.nodes.switch."mgmt-ipv6-address"'
Log ${ipv6_addr}
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq '.nodes.switch."mgmt-ipv6-address"'
Log \n--> LOG: IPv6 addr - ${ipv6_addr} console=True

Destroy ${lab-name} lab
Log ${CURDIR}
${rc} ${output} = Run And Return Rc And Output
... sudo -E ${CLAB_BIN} --runtime ${runtime} destroy -t ${CURDIR}/${lab-file-name}
Log ${output}
Log ${CURDIR}
${rc} ${output} = Run And Return Rc And Output
... sudo -E ${CLAB_BIN} --runtime ${runtime} destroy -t ${CURDIR}/${lab-file-name}
Log ${output}
Should Be Equal As Integers ${rc} 0

Re-deploy ${lab-name} lab
Log ${CURDIR}
${rc} ${output} = Run And Return Rc And Output
... sudo -E ${CLAB_BIN} --runtime ${runtime} deploy -t ${CURDIR}/${lab-file-name}
Log ${output}
Log ${CURDIR}
${rc} ${output} = Run And Return Rc And Output
... sudo -E ${CLAB_BIN} --runtime ${runtime} deploy -t ${CURDIR}/${lab-file-name}
Log ${output}
Should Be Equal As Integers ${rc} 0

Wait 60s for nodes to boot
Sleep 60s

Verify connectivity via new management addresses on router1
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq -r '.nodes.router1."mgmt-ipv4-address"'
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq -r '.nodes.router1."mgmt-ipv4-address"'
Should Be Equal As Integers ${rc} 0
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq -r '.nodes.router1."mgmt-ipv6-address"'
Log \n--> LOG: IPv4 addr - ${ipv4_addr} console=True

${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq -r '.nodes.router1."mgmt-ipv6-address"'
Should Be Equal As Integers ${rc} 0
Log \n--> LOG: IPv6 addr - ${ipv6_addr} console=True

${rc} ${output} = Run And Return Rc And Output
... sshpass -p "admin" ssh -o "IdentitiesOnly=yes" admin@clab-${lab-name}-router1 "sh run interface Ethernet0/0"
Log ${output}
Expand All @@ -117,19 +121,24 @@ Verify connectivity via new management addresses on router1
Should Contain ${output} ${ipv6_addr.upper()}

Verify connectivity via new management addresses on switch
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq -r '.nodes.switch."mgmt-ipv4-address"'
${rc} ${ipv4_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq -r '.nodes.switch."mgmt-ipv4-address"'
Should Be Equal As Integers ${rc} 0
${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat ${CURDIR}/clab-${lab-name}/topology-data.json | jq -r '.nodes.switch."mgmt-ipv6-address"'
Log \n--> LOG: IPv4 addr - ${ipv4_addr} console=True

${rc} ${ipv6_addr} = Run And Return Rc And Output
... cat clab-${lab-name}/topology-data.json | jq -r '.nodes.switch."mgmt-ipv6-address"'
Should Be Equal As Integers ${rc} 0
Log \n--> LOG: IPv6 addr - ${ipv6_addr} console=True

${rc} ${output} = Run And Return Rc And Output
... sshpass -p "admin" ssh -o "IdentitiesOnly=yes" admin@clab-${lab-name}-switch "sh run interface Ethernet0/0"
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} ${ipv4_addr.upper()}
Should Contain ${output} ${ipv6_addr.upper()}


*** Keywords ***
Cleanup
Run sudo -E ${CLAB_BIN} --runtime ${runtime} destroy -t ${CURDIR}/${lab-file-name} --cleanup
Loading