Update vfc-nfvo-lcm wf plan file path 83/15783/1
authorfujinhua <fu.jinhua@zte.com.cn>
Wed, 27 Sep 2017 05:16:29 +0000 (13:16 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Wed, 27 Sep 2017 05:16:29 +0000 (13:16 +0800)
Change-Id: I896917e5e0ec7099eaa66ec7c5b9948a7f024cf4
Issue-Id: VFC-463
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/workflows/auto_deploy.py

index 913d42b..c56e647 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 import logging
 import traceback
+import os
 
 from lcm.pub.database.models import WFPlanModel
 from lcm.pub.msapi import activiti
@@ -25,7 +26,8 @@ def deploy_workflow_on_startup():
         if WFPlanModel.objects.filter():
             logger.warn("Workflow is already deployed.")
             return
-        file_path = "TODO:"
+        base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+        file_path = os.path.join(base_path, "ns/data/nsinit.bpmn20.xml")
         deploy_info = activiti.deploy_workflow(file_path)
         WFPlanModel(
             deployed_id=deploy_info["deployedId"],