Library scope: | GLOBAL |
---|
Keywords used to create/modify flow objects. The object is defined in the corresponding FlowLib.py library and contains pertinent fields and methods (e.g., cookie and barrier fields, string formatted xml that can be used to push to controller). TODO: Remove hard dependency on controller HTTP "session".
Push flow through REST-API and verify in data-store
Configures a flow specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using POST method
Deploys a flow specified by given flow details (${node_id}, ${xmlroot}) using add-flow operation. ${xmlroot} is an xml object of parser xml flow details, usually created by Create Flow Variables For Suite From XML File keyword from this library.
Will modify the current xml representation of the ${flow} object to contain the given ${element} at the given ${xpath}. If the ${element} uses a value, that can be passed eith the ${element_val} which defaults to ${EMPTY} if not used. NOTE: since there are two default parameters to this keyword, if you have an ${xpath} to use, but no ${element_val} you will still need to pass ${EMPTY} when invoking so that ${xpath} will end up at the right location in the parameter list
Push group through REST-API and verify in data-store
Add table miss flows to switches.
Wrapper keyword that calls "Flow Presence In Config Store" and "Get Presence Failure Message" from this library to verify that the ${expvalue} flow is or is not found in the config store, depending on whether or not it was ${expected}
Checks if flow is properly existing or not existing in the config and operational datastores, based on the variables ${reqconfpres} and ${reqoperpres}
A GET on the /node=${node_id} inventory API is made and flow stats string is checked for existence.
Check if number of Operational Flows on member of given index is equal to ${flow_count}.
Check Linear topology.
Check if all hosts are deleted from inventory
Check no switch is in inventory
Check no switch is in topology
Check number of flows in the inventory.
Check number of groups in the inventory.
Check number of hosts in topology
Check number of links in the topolgy.
Wrapper keyword that calls "Flow Presence In Operational Store" and "Get Presence Failure Message" from this library to verify that the ${expvalue} flow is or is not found in the operational store, depending on whether or not it was ${expected}
Check all switches and stats in operational inventory
Check switches are in the topology.
Check table miss flows in switches.
Will clean out any existing flow actions in the given ${flow} object
Will clean out any existing flow matches in the given ${flow} object
Given the flow XML ${file}, it will create several suite wide variables
Calls FlowLib.Make_Inventory_Flow function and initializes and sanitizes the basic flow elements that can be given to flow:inventory
Used for creating an object that will use an XML format that can be given to flow:service.
Deletes a flow from configuration datastore specified by given flow details (${node_id}, ${table_id}, ${flow_body}) using DELETE method
Deletes a flow by using remove-flow opearation. ${xmlroot} is usually a variable created by Create Flow Variables For Suite From XML File keyword from this library.
Checks the config store for given flow. Returns True if present, otherwise returns False This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
Checks the operational store for given flow. Returns True if present, otherwise returns False This keyword assumes that the global/suite variables are available (${table_id}, ${flow_id} and ${switch_idx}
This verifies specific flow-id for particular table-id matching from the flow element
Utility keyword to help manipulate mesage strings that may be used later to PASS or FAIL with
Removes any flows considered "default". one such flow is to forward all traffic to the CONTROLLER with priority 0 at flow-table 0 If/When others are implemented this keyword can be updated to include those.
Remove flow and verify
Removes the element at the given ${element_xpath} within the given ${flow} object. The ${flow} object's xml representation will be updated to reflect this removal.
Remove group and verify
Embedded variables to make higher level keywords more readable. There are some cases where the python attribute uses an underscore, but a hyphen needs to be used. This seems inconsistent, and may need to be looked at from the openflow plugin perspective.
At this point, this library will remove the element ${property} from the xml representation of the flow and reset with the given value. It's not possible, yet, to have multiple elements with the same name. That will likely be needed in the future.
Will remove the instruction element first, then add the proper xml structure to implement the action as given in the arguments
Specific keyword for adding an ethernet match rules where the elements are given in key/value pairs inside the ${match_value_dict} argument. This keyword will also remove any existing ethernet-match elements from the flow before adding
Specific keyword for adding an ipv4 match rules where the elements are given in key/value pairs inside the ${match_value_dict} argument. This keyword will also remove any existing ipv4 match elements from the flow before adding
Will set the given id/value pair to the given to the element provided and make the proper changes to the ${flow} object also provided.
Updates a flow configuration by given flow details (${node_id}, ${table_id}, ${flow_body}) using PUT method
Updates a flow by using update-flow operation. ${xmlroot} is usually a variable created by Create Flow Variables For Suite From XML File keyword from this library.
Checking flow on switch is removed
Checking flow on switch