Printer FriendlyEmail Article Link

Spirent TestCenter-Automation: Which are the API's to subscribe open-flow results?

Environment/Versions
  • Spirent TestCenter
  • Open flow
Answer

There are three results associated with Open flow

  1. OpenflowControllerResults
  2. OpenflowControllerSwitchResults
  3. OpenflowControllerSwitchPortResults

We need to subscribe the open flow results before printing them. Below are the example to subscribe Open flow results

# Subscribe to results for result query openflow-0003-openflowcontrollerresults

    stc::subscribe -parent [lindex [stc::get system1 -children-Project] 0] \

        -resultParent " [lindex [stc::get system1 -children-Project] 0] " \

        -configType openflowcontrollerprotocolconfig \

        -resultType openflowcontrollerresults \

        -filterList "" \

        -viewAttributeList "openflowversion controllerstate switchupdatestate discoverystate connectedswitchcount definedflowcount activeflowcount txpacketoutcount rxpacketincount txflowmodaddcount txflowmoddeletecount txflowmodmodifycount rxflowmodifyerrors rxflowremovecount discoveredportcount txbarrierrequestcount rxbarrierreplycount barrierrequesttimeoutcount barrierremainingcount barrierresponsetime txrolerequestcount rxrolereplycount definedmetercount activemetercount txmetermodaddcount txmetermodmodifycount txmetermoddeletecount rxmetermoderrors " \

        -interval 1 -filenamePrefix "openflow-0003-openflowcontrollerresults"

 

# Subscribe to results for result query openflow-0004-openflowcontrollerswitchresults

    stc::subscribe -parent [lindex [stc::get system1 -children-Project] 0] \

        -resultParent " [lindex [stc::get system1 -children-Project] 0] " \

        -configType openflowcontrollerprotocolconfig \

        -resultType openflowcontrollerswitchresults \

        -filterList "" \

        -viewAttributeList "switchname dpid openflowversion switchstate switchip definedflowcount activeflowcount txpacketoutcount rxpacketincount txflowmodaddcount txflowmoddeletecount txflowmodmodifycount rxflowmodifyerrors rxflowremovecount txbarrierrequestcount rxbarrierreplycount barrierresponsetime flowupdateaddcount flowupdateaddtime flowupdateaddrate flowupdateaddsetuptime flowupdatemodifycount controllerrole generationid txrolerequestcount rxrolereplycount definedmetercount activemetercount txmetermodaddcount txmetermodmodifycount txmetermoddeletecount rxmetermoderrors " \

        -interval 1 -filenamePrefix "openflow-0004-openflowcontrollerswitchresults"

# Subscribe to results for result query openflow-0005-openflowcontrollerswitchportresults

    stc::subscribe -parent [lindex [stc::get system1 -children-Project] 0] \

        -resultParent " [lindex [stc::get system1 -children-Project] 0] " \

        -configType openflowcontrollerprotocolconfig \

        -resultType openflowcontrollerswitchportresults \

        -filterList "" \

        -viewAttributeList "switchname dpid portnum discoveredport " \

 

        -interval 1 -filenamePrefix "openflow-0005-openflowcontrollerswitchportresults"


Product : Automation,API,Spirent TestCenter