PCE modification in order to prepare flexgrid
[transportpce.git] / tests / transportpce_tests / common / test_utils.py
index 34238bcc52a3edcc3927d80061d1841fd487a6c7..fc8a4f69cec71e514d4df31e7d3ae6ceb9438bcf 100644 (file)
@@ -51,6 +51,7 @@ URL_SERVICE_PATH = "{}/operations/transportpce-device-renderer:service-path"
 URL_OTN_SERVICE_PATH = "{}/operations/transportpce-device-renderer:otn-service-path"
 URL_CREATE_OTS_OMS = "{}/operations/transportpce-device-renderer:create-ots-oms"
 URL_PATH_COMPUTATION_REQUEST = "{}/operations/transportpce-pce:path-computation-request"
+URL_FULL_PORTMAPPING = "{}/config/transportpce-portmapping:network"
 
 TYPE_APPLICATION_JSON = {'Content-Type': 'application/json', 'Accept': 'application/json'}
 TYPE_APPLICATION_XML = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
@@ -194,6 +195,13 @@ def rawput_request(url, data):
         headers=TYPE_APPLICATION_JSON,
         auth=(ODL_LOGIN, ODL_PWD))
 
+def rawpost_request(url, data):
+    return requests.request(
+        "POST", url.format(RESTCONF_BASE_URL),
+        data=data,
+        headers=TYPE_APPLICATION_JSON,
+        auth=(ODL_LOGIN, ODL_PWD))
+
 
 def delete_request(url):
     return requests.request(