def test_02_rdm_device_connected(self): response = test_utils.get_netconf_oper_request("ROADM-D1") self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertEqual( res['node'][0]['netconf-node-topology:connection-status'], 'connected') time.sleep(10)
def test_02_connect_SPDR_SC1(self): response = test_utils.mount_device("SPDR-SC1", ('spdrc', self.NODE_VERSION)) self.assertEqual(response.status_code, requests.codes.created, test_utils.CODE_SHOULD_BE_201) time.sleep(10) response = test_utils.get_netconf_oper_request("SPDR-SC1") self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertEqual( res['node'][0]['netconf-node-topology:connection-status'], 'connected')
def test_20_rdm_device_disconnected(self): response = test_utils.get_netconf_oper_request("ROADMA01") self.assertEqual(response.status_code, requests.codes.conflict) res = response.json() self.assertIn( { "error-type": "application", "error-tag": "data-missing", "error-message": "Request could not be completed because the relevant data model content does not exist" }, res['errors']['error'])