X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=blobdiff_plain;f=multivimbroker%2Fmultivimbroker%2Fpub%2Futils%2Frestcall.py;h=c7386dc64f81ce267222152b3643846e78abafab;hp=70708244e97a0b4f960a558dff52a270e8be8181;hb=0a542045a647da97f24b22ef41e422edac30ed9f;hpb=f1f52b3ccf0ab78007a98947211b4fcdfd54b5e6 diff --git a/multivimbroker/multivimbroker/pub/utils/restcall.py b/multivimbroker/multivimbroker/pub/utils/restcall.py index 7070824..c7386dc 100644 --- a/multivimbroker/multivimbroker/pub/utils/restcall.py +++ b/multivimbroker/multivimbroker/pub/utils/restcall.py @@ -26,6 +26,7 @@ from multivimbroker.pub.config.config import AAI_SCHEMA_VERSION from multivimbroker.pub.config.config import AAI_SERVICE_URL from multivimbroker.pub.config.config import AAI_USERNAME from multivimbroker.pub.config.config import AAI_PASSWORD +from multivimbroker.pub.config.config import MSB_SERVICE_PROTOCOL from multivimbroker.pub.config.config import MSB_SERVICE_IP, MSB_SERVICE_PORT rest_no_auth, rest_oneway_auth, rest_bothway_auth = 0, 1, 2 @@ -130,13 +131,15 @@ def call_req(base_url, user, passwd, auth_type, resource, method, def req_by_msb(resource, method, content='', headers=None): - base_url = "http://%s:%s/" % (MSB_SERVICE_IP, MSB_SERVICE_PORT) + base_url = "%s://%s:%s/" % ( + MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT) return call_req(base_url, "", "", rest_no_auth, resource, method, content, headers) def req_by_msb_multipart(resource, method, content, headers=None): - base_url = "http://%s:%s/" % (MSB_SERVICE_IP, MSB_SERVICE_PORT) + base_url = "%s://%s:%s/" % ( + MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT) return call_multipart_req(base_url, "", "", rest_no_auth, resource, method, content, headers)