X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=test%2Ftools%2FRobot_Tool%2Flibraries%2FHostTracker.py;fp=test%2Ftools%2FRobot_Tool%2Flibraries%2FHostTracker.py;h=0000000000000000000000000000000000000000;hb=59e81c38620fa1b61e15771191e35771450b9499;hp=cb353a5023f2431c936beca821f7cab634a74d42;hpb=072f6e3a8d1bdf8f4c663843589c22d93ba07791;p=integration%2Ftest.git diff --git a/test/tools/Robot_Tool/libraries/HostTracker.py b/test/tools/Robot_Tool/libraries/HostTracker.py deleted file mode 100644 index cb353a5023..0000000000 --- a/test/tools/Robot_Tool/libraries/HostTracker.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -CSIT test tools. -Authors: Baohua Yang@IBM, Denghui Huang@IBM -Updated: 2013-11-06 -""" - -import sys - -sys.path.append('..') -from restlib import * # noqa -from testmodule import TestModule - -sys.path.remove('..') - - -class HostTracker(TestModule): - """ - Test for the host tracker.. - Start 2-layer tree topology network. e.g., in Mininet, run - 'sudo mn --controller=remote,ip=127.0.0.1 --mac --topo tree,2' - """ - - def __init__(self, restSubContext='/controller/nb/v2/hosttracker', user=DEFAULT_USER, password=DEFAULT_PWD, - container=DEFAULT_CONTAINER, contentType='json', prefix=DEFAULT_PREFIX): - super(self.__class__, self).__init__(restSubContext, user, password, container, contentType, prefix) - - def get_hosts(self): - """ - The name is suggested to match the NB API. - list all active hosts, should be done after using h1 ping h2 in mininet - """ - return super(self.__class__, self).get_entries(['hosts/active', 'hosts/inactive'], 'hostConfig') - - def add_host(self, name, body): - """ - Add a host. - """ - super(self.__class__, self).add_entry('address', name, body) - - def remove_host(self, name): - """ - Remove a host. - """ - super(self.__class__, self).remove_entry('address', name) - - def test_host_operations(self, name, body): - """ - Test host operations, like adding and removing. - >>> HostTracker().test_host_operations('10.0.1.4', - {'nodeType': 'OF', 'dataLayerAddress': '5e:bf:79:84:10:a6', 'vlan': '1', - 'nodeId': '00:00:00:00:00:00:00:03', 'nodeConnectorId': '9', - 'networkAddress': '10.0.1.4', 'staticHost': True, 'nodeConnectorType': 'OF'}) - True - """ - return super(self.__class__, self).test_add_remove_operations(['hosts/active', 'hosts/inactive'], 'address', - name, body, - 'hostConfig')