ETSI SOL001 v2.5.1 model types not deployed in upgrade
[sdc.git] / catalog-be / src / main / resources / scripts / sdcBePy / common / sdcBeProxy.py
index 0c71a38..ecd0726 100755 (executable)
@@ -5,7 +5,6 @@ import pycurl
 
 from sdcBePy.common.helpers import check_arguments_not_none
 
-
 def get_url(ip, port, protocol):
     return "%s://%s:%s" % (protocol, ip, port)
 
@@ -55,6 +54,9 @@ class SdcBeProxy:
     def get_normatives(self):
         return self.con.get("/sdc2/rest/v1/screen", with_buffer=True)
 
+    def get_model_list(self):
+        return self.con.get("/sdc2/rest/v1/catalog/model", with_buffer=True)
+
     def post_file(self, path, multi_part_form_data, buffer=None):
         return self.con.post_file(path, multi_part_form_data, buffer)
 
@@ -67,8 +69,7 @@ class SdcBeProxy:
         self.con.buffer.seek(0)
 
         response = value.decode(self.CHARTSET).split(self.BODY_SEPARATOR)
-        return response[1] if len(response) == 2 else response[0]
-
+        return response[len(response) - 1] if len(response) > 1 else response[0]
 
 class CurlConnector:
     CONTENT_TYPE_HEADER = "Content-Type: application/json"