@@ -1063,7 +1063,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
1063
1063
if not model_helper .is_delete_name (lib_name ):
1064
1064
lib_dict = model_libs [lib_name ]
1065
1065
src_path = dictionary_utils .get_element (lib_dict , SOURCE_PATH )
1066
- plan_file = dictionary_utils . get_element (lib_dict , PLAN_PATH )
1066
+ plan_file = self . __get_plan_file_path (lib_dict )
1067
1067
targets = dictionary_utils .get_element (lib_dict , TARGET )
1068
1068
stage_mode = dictionary_utils .get_element (lib_dict , STAGE_MODE )
1069
1069
options , sub_module_targets = _get_deploy_options (model_libs , lib_name , library_module = 'true' ,
@@ -1106,7 +1106,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
1106
1106
if not model_helper .is_delete_name (app_name ):
1107
1107
app_dict = model_apps [app_name ]
1108
1108
src_path = dictionary_utils .get_element (app_dict , SOURCE_PATH )
1109
- plan_file = dictionary_utils . get_element (app_dict , PLAN_PATH )
1109
+ plan_file = self . __get_plan_file_path (app_dict )
1110
1110
stage_mode = dictionary_utils .get_element (app_dict , STAGE_MODE )
1111
1111
targets = dictionary_utils .get_element (app_dict , TARGET )
1112
1112
options , sub_module_targets = _get_deploy_options (model_apps , app_name , library_module = 'false' ,
@@ -1135,6 +1135,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
1135
1135
self .__substitute_appmodule_token (path , module_type )
1136
1136
1137
1137
def _get_source_path_for_deploy_application (self , app_dict , app_name , src_path , uses_path_tokens_attribute_names ):
1138
+ path = None
1138
1139
for uses_path_tokens_attribute_name in uses_path_tokens_attribute_names :
1139
1140
if uses_path_tokens_attribute_name in app_dict :
1140
1141
path = app_dict [uses_path_tokens_attribute_name ]
@@ -1148,6 +1149,18 @@ def _get_source_path_for_deploy_application(self, app_dict, app_name, src_path,
1148
1149
src_path = self .path_helper .local_join (self .upload_temporary_dir , src_path )
1149
1150
return path , src_path
1150
1151
1152
+ def __get_plan_file_path (self , deployment_dict ):
1153
+ _method_name = '__get_plan_file_path'
1154
+ self .logger .entering (class_name = self ._class_name , method_name = _method_name )
1155
+
1156
+ plan_dir = dictionary_utils .get_element (deployment_dict , PLAN_DIR )
1157
+ plan_file = dictionary_utils .get_element (deployment_dict , PLAN_PATH )
1158
+ if self .path_helper .is_relative_local_path (plan_file ) and not string_utils .is_empty (plan_dir ):
1159
+ plan_file = self .path_helper .local_join (plan_dir , plan_file )
1160
+
1161
+ self .logger .exiting (class_name = self ._class_name , method_name = _method_name , result = plan_file )
1162
+ return plan_file
1163
+
1151
1164
def __get_mt_names_from_location (self , app_location ):
1152
1165
dummy_location = LocationContext ()
1153
1166
token_name = self .aliases .get_name_token (dummy_location )
0 commit comments