X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fsdnc%2Fsrc%2Fmain%2Fscripts%2FinstallCerts.py;h=2aaa20276c32b2eb831d4857c157a4f4101b3aa0;hb=2e6aaffaaa0b39f3dadfcbe1e659199bc3c59df6;hp=220cafd1259245ae49deadbc220f8d469e68fe53;hpb=946d17b0acab6b36600b6517a2ca0dd263851ff9;p=sdnc%2Foam.git diff --git a/installation/sdnc/src/main/scripts/installCerts.py b/installation/sdnc/src/main/scripts/installCerts.py index 220cafd1..2aaa2027 100644 --- a/installation/sdnc/src/main/scripts/installCerts.py +++ b/installation/sdnc/src/main/scripts/installCerts.py @@ -52,7 +52,6 @@ zipFileList = [] username = os.environ['ODL_ADMIN_USERNAME'] password = os.environ['ODL_ADMIN_PASSWORD'] -newpassword = os.environ.get('ODL_ADMIN_NEWPASSWORD') TIMEOUT=1000 INTERVAL=30 timePassed=0 @@ -340,29 +339,6 @@ def process_jks_files(count): logging.error("UnExpected Error while processing JKS files at {0}, Caused by: {1}".format(Path, e)) writeCertInstallStatus("NOTOK") -def replaceAdminPassword(username, password, newpassword): - if newpassword is None: - logging.info('Not to replace password for user %s', username) - else: - logging.info('Replace password for user %s', username) - try: - jsondata = '{\"password\": \"{newpassword}\"}'.format(newpassword=newpassword) - url = '/auth/v1/users/{username}@sdn'.format(username=username) - loggin.info("Url %s data $s", url, jsondata) - conn = http.client.HTTPConnection("localhost",odl_port) - req = conn.request("PUT", url, jsondata, headers=headers) - res = conn.getresponse() - res.read() - httpStatus = res.status - if httpStatus == 200: - logging.debug("New password provided successfully for user %s", username) - else: - logging.debug("Password change was not possible. Problem code was: %d", httpStatus) - except: - logging.error("Cannot execute REST call to set password.") - writeCertInstallStatus("NOTOK") - - def readCertProperties(): ''' This function searches for manually copied zip file @@ -373,7 +349,6 @@ def readCertProperties(): connected = makeHealthcheckCall(headers, timePassed) logging.info('Connected status: %s', connected) if connected: - replaceAdminPassword(username, password, newpassword) count = 0 if os.path.isfile(Path + "/certs.properties"): with open(Path + "/certs.properties", "r") as f: