- def test_06_xpdr_device_connected(self):
- url = ("{}/config/network-topology:"
- "network-topology/topology/topology-netconf/node/XPDRA"
- .format(self.restconf_baseurl))
- data = {"node": [{
- "node-id": "XPDRA",
- "netconf-node-topology:username": "admin",
- "netconf-node-topology:password": "admin",
- "netconf-node-topology:host": "127.0.0.1",
- "netconf-node-topology:port": "17831",
- "netconf-node-topology:tcp-only": "false",
- "netconf-node-topology:pass-through": {}}]}
- headers = {'content-type': 'application/json'}
- response = requests.request(
- "PUT", url, data=json.dumps(data), headers=headers,
- auth=('admin', 'admin'))
- self.assertEqual(response.status_code, requests.codes.created)
- time.sleep(20)
-
- def test_07_xpdr_device_connected(self):
- url = ("{}/operational/network-topology:"
- "network-topology/topology/topology-netconf/node/XPDRA"
- .format(self.restconf_baseurl))
- headers = {'content-type': 'application/json'}
- response = requests.request(
- "GET", url, headers=headers, auth=('admin', 'admin'))
+ def test_07_xpdr_device_connection(self):
+ response = test_utils.mount_device("XPDRA01", 'xpdra')
+ self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201)
+
+ def test_08_xpdr_device_connected(self):
+ url = "{}/operational/network-topology:network-topology/topology/topology-netconf/node/XPDRA01"
+ response = test_utils.get_request(url)