vnflcm upgrade from python2 to python3 34/90934/1
authorhongyuzhao <zhao.hongyu@zte.com.cn>
Fri, 5 Jul 2019 09:30:11 +0000 (17:30 +0800)
committerhongyuzhao <zhao.hongyu@zte.com.cn>
Fri, 5 Jul 2019 09:34:22 +0000 (17:34 +0800)
Change-Id: Iac483f3047f56af4b77ce0a111de329309d12ae9
Issue-ID: VFC-1429
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
lcm/docker/docker-env-conf.sh
lcm/lcm/pub/utils/notificationsutil.py
lcm/lcm/pub/vimapi/adaptor.py

index 5b32f3e..8eb40c0 100755 (executable)
@@ -4,7 +4,7 @@ install_sf(){
 
     apk --no-cache update
     apk --no-cache add bash curl gcc wget mysql-client openssl-dev
-    apk --no-cache add libffi-dev musl-dev py3-virtualenv
+    apk --no-cache add python3-dev libffi-dev musl-dev py3-virtualenv
 
     # get binary zip from nexus - vfc-nfvo-catalog
     wget -q -O vfc-gvnfm-vnflcm-lcm.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnflcm.lcm&a=vfc-gvnfm-vnflcm-lcm&v=${pkg_version}-SNAPSHOT&e=zip" && \
index 0bb4043..2eb820f 100644 (file)
@@ -65,7 +65,7 @@ class NotificationsUtil(object):
                 try:
                     self.post_notification(callbackUri, auth_info, notification)
                 except Exception as e:
-                    logger.error("Failed to post notification: %s", e.message)
+                    logger.error("Failed to post notification: %s", e.args[0])
 
     def post_notification(self, callbackUri, auth_info, notification):
         params = auth_info.get("paramsBasic", {})
index 45cae34..55f6d16 100644 (file)
@@ -160,7 +160,7 @@ def delete_vim_res(data, do_notify):
                     res_del_fun(res["vim_id"], res["tenant_id"], res["res_id"])
             except VimException as e:
                 logger.error("Failed to delete %s(%s)", res_type, res["res_id"])
-                logger.error("%s:%s", e.http_code, e.message)
+                logger.error("%s:%s", e.http_code, e.args[0])
             do_notify(res_type, res["res_id"])