Execute Command /usr/local/vtn/bin/vtn_start
Execute Command /usr/local/vtn/bin/unc_dmctl status
Execute Command /usr/local/vtn/sbin/db_setup
+ Execute Command sed -i 's/odcdrv_ping_interval = 30/odcdrv_ping_interval = 10/g' /usr/local/vtn/modules/odcdriver.conf
+ Execute Command sed -i 's/physical_attributes_read_interval = 40/physical_attributes_read_interval = 15/g' /usr/local/vtn/modules/vtndrvintf.conf
Execute Command /usr/local/vtn/bin/vtn_start
Execute Command /usr/local/vtn/bin/unc_dmctl status
+ Execute Command /usr/local/vtn/bin/drvodc_control loglevel trace
+ Execute Command /usr/local/vtn/bin/lgcnw_control loglevel trace
Execute Command exit
Stop SuiteVtnCo
Add a Controller
[Arguments] ${ctrlname} ${ctrlip}
[Documentation] Create a controller
- ${controllerinfo} Create Dictionary controller_id=${ctrlname} type=odc ipaddr=${CONTROLLER} version=1.0 auditstatus=enable
+ ${controllerinfo} Create Dictionary controller_id=${ctrlname} type=odc ipaddr=${CONTROLLER} version=1.0
${controllercreate} Create Dictionary controller=${controllerinfo}
${controllercreate_json}= json.dumps ${controllercreate}
${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${CTRLS_CREATE} data=${controllercreate_json}
Update Controller
[Arguments] ${ctrlname} ${ctrlip} ${desc}
[Documentation] Update controller
- ${controllerinfo} Create Dictionary description=${desc} ipaddr=${ctrlip} version=1.0 auditstatus=enable
+ ${controllerinfo} Create Dictionary description=${desc} ipaddr=${ctrlip} version=1.0
${controllerupdate} Create Dictionary controller=${controllerinfo}
${controllerupdate_json}= json.dumps ${controllerupdate}
${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json data=${controllerupdate_json}
Should Be Equal As Strings ${resp.status_code} 204
+Audit Controller
+ [Arguments] ${ctrlname}
+ [Documentation] Trigger Manual Audit
+ ${auditinfo} Create Dictionary force=false real-network_audit=false
+ ${auditupdate} Create Dictionary audit=${auditinfo}
+ ${auditupdate_json}= json.dumps ${auditupdate}
+ ${resp} RequestsLibrary.Put session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json data=${auditupdate_json}
+ Should Be Equal As Strings ${resp.status_code} 204
+
Check Controller Status
[Arguments] ${ctrlname} ${stat}
[Documentation] Get controller status
${vbrifinfo} Create Dictionary if_name=${vbrifname} description=${ifdescription}
${vbrifcreate} Create Dictionary interface=${vbrifinfo}
${vbrifcreate_json}= json.dumps ${vbrifcreate}
- ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate_json}
+ : For ${i} IN RANGE 1 5
+ \ ${resp} RequestsLibrary.Post session ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE} data=${vbrifcreate_json}
+ \ Exit For Loop If '${resp.status_code}' == '${retcode}'
Should Be Equal As Strings ${resp.status_code} ${retcode}
Define Portmap for VBRIF
Test Ping
[Arguments] ${host1} ${host2}
[Documentation] Ping hosts to check connectivity
- Write ${host1} ping -c 10 ${host2}
+ Write ${host1} ping -c 4 ${host2}
${result} Read Until mininet>
Should Contain ${result} 64 bytes
Verify Switch
[Arguments] ${ctrlname} ${switch_id}
[Documentation] Get switch
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
+ ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
${contents} To JSON ${resp.content}
${switchblock} Get From Dictionary ${contents} switch
${status} Get From Dictionary ${switchblock} switch_id
Verify SwitchPort
[Arguments] ${ctrlname} ${switch_id}
[Documentation] Get switch
- ${resp} Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
+ ${resp} RequestsLibrary.Get session ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
Should Be Equal As Strings ${resp.status_code} 200
[Documentation] Add a Controller
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ # Ping starts after 12sec of completing audit and controller status become "UP"
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Add a Vtn Tenant1
[Documentation] Create Vtn Tenant1
- [Tags] exclude
Add a VTN Tenant1 VTN_TEST
Create VBR in VTN Tenant1
[Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] exclude
Create VBR in VTN Tenant1 Vbridge1 odc_test
Create VBRIF in VBRIDGE Vbridge1 Interface1
[Documentation] Create an interface to Vbridge1
- [Tags] exclude
Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1 201
Create VBRIF in VBRIDGE Vbridge1 Interface2
[Documentation] Create an interface to Vbridge1
- [Tags] exclude
Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2 201
Define Portmap for Interface1
[Documentation] Map Interface1 to a logical port
- [Tags] exclude
Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:openflow:3-s3-eth1
Define Portmap for Interface2
[Documentation] Map Interface2 to a logical port
- [Tags] exclude
Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:openflow:2-s2-eth1
Test Ping for Configuration1
[Documentation] ping between hosts in mininet
- [Tags] exclude
- Wait Until Keyword Succeeds 30s 10s Test Ping h1 h3
+ Wait Until Keyword Succeeds 10s 2s Test Ping h1 h3
Delete a VTN Tenant1
[Documentation] Delete Vtn Tenant1
- [Tags] exclude
Delete a VTN Tenant1
Delete a Controller odc1
[Documentation] Add a Controller odc1
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Verify switch1
[Documentation] Get switch1
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:1
+ Verify Switch odc_test openflow:1
Verify switch2
[Documentation] Get switch2
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:2
+ Verify Switch odc_test openflow:2
Verify switch3
[Documentation] Get switch3
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:3
+ Verify Switch odc_test openflow:3
Verify switchPort switch1
[Documentation] Get switchport/switch1
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:1
+ Verify SwitchPort odc_test openflow:1
Verify switchPort switch2
[Documentation] Get switchport/switch2
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:2
+ Verify SwitchPort odc_test openflow:2
Verify switchPort switch3
[Documentation] Get switchport/switch3
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:3
+ Verify SwitchPort odc_test openflow:3
Delete a Controller
[Documentation] Delete Controller odc1
[Documentation] Add a Controller
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Add a Vtn Tenant1
[Documentation] Create Vtn Tenant1
- [Tags] exclude
Add a VTN Tenant1 VTN_TEST
Create VBR in VTN Tenant1
[Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] exclude
Create VBR in VTN Tenant1 Vbridge1 odc_test
Update controller ip invalid
Verify the Controller State is down
[Documentation] Check Controller status
[Tags] exclude
- Wait Until Keyword Succeeds 40s 5s Check Controller Status odc_test down
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test down
Create VBRIF in VBRIDGE Vbridge1 Interface1
[Documentation] Create an interface to Vbridge1
[Tags] exclude
Update Controller odc_test ${CONTROLLER} valid_IP
-Verify the Controller State is up
+Verify the Controller State is in waiting_audit
[Documentation] Check Controller status
[Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller manually
+ [Documentation] Trigger update audit
+ [Tags] exclude
+ Audit Controller odc_test
Define Portmap for Interface1
[Documentation] Map Interface1 to a logical port
Test Ping for Configuration1
[Documentation] ping between hosts in mininet
[Tags] exclude
- Wait Until Keyword Succeeds 30s 10s Test Ping h1 h2
+ Wait Until Keyword Succeeds 10s 2s Test Ping h1 h2
Delete a VTN Tenant1
[Documentation] Delete Vtn Tenant1
- [Tags] exclude
Delete a VTN Tenant1
Delete a Controller odc1
[Documentation] Add a Controller
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Add a Vtn Tenant1
[Documentation] Create Vtn Tenant1
- [Tags] exclude
Add a VTN Tenant1 VTN_TEST
Create VBR in VTN Tenant1
[Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] exclude
Create VBR in VTN Tenant1 Vbridge1 odc_test
Create VBRIF in VBRIDGE Vbridge1 Interface1
[Documentation] Create an interface to Vbridge1
- [Tags] exclude
Create VBRIF in VBR Tenant1 Vbridge1 Interface1 Interface1 201
Create VBRIF in VBRIDGE Vbridge1 Interface2
[Documentation] Create an interface to Vbridge1
- [Tags] exclude
Create VBRIF in VBR Tenant1 Vbridge1 Interface2 Interface2 201
Define Portmap for Interface1
[Documentation] Map Interface1 to a logical port
- [Tags] exclude
Define Portmap for VBRIF Tenant1 Vbridge1 Interface1 PP-OF:openflow:3-s3-eth1
Define Portmap for Interface2
[Documentation] Map Interface2 to a logical port
- [Tags] exclude
Define Portmap for VBRIF Tenant1 Vbridge1 Interface2 PP-OF:openflow:2-s2-eth1
Test Ping for Configuration1
[Documentation] ping between hosts in mininet
- [Tags] exclude
- Wait Until Keyword Succeeds 30s 10s Test Ping h1 h3
+ Wait Until Keyword Succeeds 10s 2s Test Ping h1 h3
Delete a VTN Tenant1
[Documentation] Delete Vtn Tenant1
- [Tags] exclude
Delete a VTN Tenant1
Delete a Controller odc1
[Documentation] Add a Controller odc1
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Verify switch1
[Documentation] Get switch1
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:1
+ Verify Switch odc_test openflow:1
Verify switch2
[Documentation] Get switch2
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:2
+ Verify Switch odc_test openflow:2
Verify switch3
[Documentation] Get switch3
[Tags] exclude
- Wait Until Keyword Succeeds 30s 2s Verify Switch odc_test openflow:3
+ Verify Switch odc_test openflow:3
Verify switchPort switch1
[Documentation] Get switchport/switch1
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:1
+ Verify SwitchPort odc_test openflow:1
Verify switchPort switch2
[Documentation] Get switchport/switch2
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:2
+ Verify SwitchPort odc_test openflow:2
Verify switchPort switch3
[Documentation] Get switchport/switch3
- [Tags] exclude
- Wait Until Keyword Succeeds 16s 2s Verify SwitchPort odc_test openflow:3
+ Verify SwitchPort odc_test openflow:3
Delete a Controller
[Documentation] Delete Controller odc1
[Documentation] Add a Controller
Add a Controller odc_test ${CONTROLLER}
-Verify the Controller Status is up
+Verify the Controller Status is waiting_audit
[Documentation] Check Controller status
- [Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller
+ [Documentation] Trigger update audit
+ Audit Controller odc_test
Add a Vtn Tenant1
[Documentation] Create Vtn Tenant1
- [Tags] exclude
Add a VTN Tenant1 VTN_TEST
Create VBR in VTN Tenant1
[Documentation] Create a VBR in Tenant1 as Vbridge1
- [Tags] exclude
Create VBR in VTN Tenant1 Vbridge1 odc_test
Update controller ip invalid
Verify the Controller State is down
[Documentation] Check Controller status
[Tags] exclude
- Wait Until Keyword Succeeds 40s 5s Check Controller Status odc_test down
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test down
Create VBRIF in VBRIDGE Vbridge1 Interface1
[Documentation] Create an interface to Vbridge1
[Tags] exclude
Update Controller odc_test ${CONTROLLER} valid_IP
-Verify the Controller State is up
+Verify the Controller State is in waiting_audit
[Documentation] Check Controller status
[Tags] exclude
- Wait Until Keyword Succeeds 32s 2s Check Controller Status odc_test up
+ Wait Until Keyword Succeeds 12s 2s Check Controller Status odc_test waiting_audit
+
+Audit a controller manually
+ [Documentation] Trigger update audit
+ [Tags] exclude
+ Audit Controller odc_test
Define Portmap for Interface1
[Documentation] Map Interface1 to a logical port
Test Ping for Configuration1
[Documentation] ping between hosts in mininet
[Tags] exclude
- Wait Until Keyword Succeeds 30s 10s Test Ping h1 h2
+ Wait Until Keyword Succeeds 10s 2s Test Ping h1 h2
Delete a VTN Tenant1
[Documentation] Delete Vtn Tenant1
- [Tags] exclude
Delete a VTN Tenant1
Delete a Controller odc1