@@ -245,8 +245,8 @@ def __online_deploy_apps_and_libs(self, base_location):
245
245
self .__build_app_deploy_strategy (app_location , model_applications , existing_app_refs ,
246
246
stop_and_undeploy_app_list )
247
247
248
- # deployed_app_list is list of apps that has been deployed and stareted again
249
- # redeploy_app_list is list of apps that needs to be redeplyed
248
+ # deployed_app_list is list of apps that has been deployed and started again
249
+ # redeploy_app_list is list of apps that needs to be redeployed
250
250
deployed_app_list = []
251
251
redeploy_app_list = []
252
252
@@ -903,6 +903,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
903
903
src_path = dictionary_utils .get_element (lib_dict , SOURCE_PATH )
904
904
plan_file = dictionary_utils .get_element (lib_dict , PLAN_PATH )
905
905
targets = dictionary_utils .get_element (lib_dict , TARGET )
906
+ stage_mode = dictionary_utils .get_element (lib_dict , STAGE_MODE )
906
907
options = _get_deploy_options (model_libs , lib_name , library_module = 'true' )
907
908
for uses_path_tokens_attribute_name in uses_path_tokens_attribute_names :
908
909
if uses_path_tokens_attribute_name in lib_dict :
@@ -913,7 +914,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
913
914
location .add_name_token (token_name , lib_name )
914
915
resource_group_template_name , resource_group_name , partition_name = \
915
916
self .__get_mt_names_from_location (location )
916
- self .__deploy_app_online (lib_name , src_path , targets , plan = plan_file ,
917
+ self .__deploy_app_online (lib_name , src_path , targets , plan = plan_file , stage_mode = stage_mode ,
917
918
partition = partition_name , resource_group = resource_group_name ,
918
919
resource_group_template = resource_group_template_name , options = options )
919
920
location .remove_name_token (token_name )
@@ -930,6 +931,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
930
931
app_dict = model_apps [app_name ]
931
932
src_path = dictionary_utils .get_element (app_dict , SOURCE_PATH )
932
933
plan_file = dictionary_utils .get_element (app_dict , PLAN_PATH )
934
+ stage_mode = dictionary_utils .get_element (app_dict , STAGE_MODE )
933
935
targets = dictionary_utils .get_element (app_dict , TARGET )
934
936
options = _get_deploy_options (model_apps , app_name , library_module = 'false' )
935
937
@@ -945,7 +947,8 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
945
947
self .__get_mt_names_from_location (location )
946
948
947
949
new_app_name = self .__deploy_app_online (app_name , src_path , targets , plan = plan_file ,
948
- partition = partition_name , resource_group = resource_group_name ,
950
+ stage_mode = stage_mode , partition = partition_name ,
951
+ resource_group = resource_group_name ,
949
952
resource_group_template = resource_group_template_name ,
950
953
options = options )
951
954
location .remove_name_token (token_name )
@@ -973,7 +976,7 @@ def __get_mt_names_from_location(self, app_location):
973
976
dummy_location .pop_location ()
974
977
return resource_group_template_name , resource_group_name , partition_name
975
978
976
- def __deploy_app_online (self , application_name , source_path , targets , plan = None , partition = None ,
979
+ def __deploy_app_online (self , application_name , source_path , targets , stage_mode = None , plan = None , partition = None ,
977
980
resource_group = None , resource_group_template = None , options = None ):
978
981
"""
979
982
Deploy an application or shared library in online mode.
@@ -1039,6 +1042,8 @@ def __deploy_app_online(self, application_name, source_path, targets, plan=None,
1039
1042
kwargs ['resourceGroupTemplate' ] = str (resource_group_template )
1040
1043
if partition is not None :
1041
1044
kwargs ['partition' ] = str (partition )
1045
+ if stage_mode is not None :
1046
+ kwargs ['stageMode' ] = str (stage_mode )
1042
1047
if options is not None :
1043
1048
for key , value in options .iteritems ():
1044
1049
kwargs [key ] = value
0 commit comments