Library scope: | GLOBAL |
---|
Perform complex operations on netconf.
Copyright (c) 2015,2017 Cisco Systems, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
This library encapsulates a bunch of somewhat complex and commonly used netconf operations into reusable keywords to make writing netconf test suites easier.
TODO: RemoteBash.robot contains logic which could be reused here.
Check that the specified device has no Netconf connectors nor associated data.
Check that the specified device is accessible from Netconf.
Operation for making sure the device is really deconfigured.
Check that there are no instances of the specified device in the Netconf topology.
Query netstat on remote machine whether testtool device with the specified number has its port open and fail if not.
Operation for configuring the device.
Operation for configuring the device in the Netconf subsystem and connecting to it.
Tell Netconf about the specified device so it can add it into its configuration.
Count all instances of the specified device in the Netconf topology (usually 0 or 1).
Operation for deconfiguring the device.
Operation for deconfiguring the device from Netconf.
Sets the config for using SSE (Server Side Events) to false. Note that this keyword only changes the config. A controller restart is needed for the config to to take effect.
Sets the config for using SSE (Server Side Events) to true. Note that this keyword only changes the config. A controller restart is needed for the config to to take effect.
Install and run testtool.
Internal keyword for Install_And_Start_TestTool This deploys the additional schemas if any and returns a command line argument to be added to the testtool commandline to tell it to load them. While this code could be integrated into its only user, I considered the resulting code to be too unreadable as the actions are quite different in the two possibilities (additional schemas present versus no additional schemas present), therefore a separate keyword is used.
Internal keyword for Install_And_Start_TestTool This deploys the optional custom rpc file. Drop out of the keyword, returning no command line argument when there is no rpc file to deploy.
Tell Netconf to deconfigure the specified device
Setup the environment for the other keywords of this Resource to work properly.
Arrange to collect tool's output into a log file. Will use specific ${schemas} unless argument resolves to 'none', which signifies that there are no additional schemas to be deployed. If so the directory for the additional schemas is deleted on the remote machine and the additional schemas argument is left out.
Stop testtool and download its log.
Operation for waiting until the device is connected.
Wait for the device to become connected. It is more readable to use this keyword in a test case than to put the whole WUKS below into it.
Wait until all netconf connectors for the device with the given name disappear. Call of Remove_Device_From_Netconf returns before netconf gets around deleting the device's connector. To ensure the device is really gone from netconf, use this keyword to make sure all connectors disappear. If a call to Remove_Device_From_Netconf is not made before using this keyword, the wait will fail. Using this keyword is more readable than putting the WUKS below into a test case.