@@ -245,8 +245,8 @@ def __online_deploy_apps_and_libs(self, base_location):
245245 self .__build_app_deploy_strategy (app_location , model_applications , existing_app_refs ,
246246 stop_and_undeploy_app_list )
247247
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
250250 deployed_app_list = []
251251 redeploy_app_list = []
252252
@@ -903,6 +903,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
903903 src_path = dictionary_utils .get_element (lib_dict , SOURCE_PATH )
904904 plan_file = dictionary_utils .get_element (lib_dict , PLAN_PATH )
905905 targets = dictionary_utils .get_element (lib_dict , TARGET )
906+ stage_mode = dictionary_utils .get_element (lib_dict , STAGE_MODE )
906907 options = _get_deploy_options (model_libs , lib_name , library_module = 'true' )
907908 for uses_path_tokens_attribute_name in uses_path_tokens_attribute_names :
908909 if uses_path_tokens_attribute_name in lib_dict :
@@ -913,7 +914,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
913914 location .add_name_token (token_name , lib_name )
914915 resource_group_template_name , resource_group_name , partition_name = \
915916 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 ,
917918 partition = partition_name , resource_group = resource_group_name ,
918919 resource_group_template = resource_group_template_name , options = options )
919920 location .remove_name_token (token_name )
@@ -930,6 +931,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
930931 app_dict = model_apps [app_name ]
931932 src_path = dictionary_utils .get_element (app_dict , SOURCE_PATH )
932933 plan_file = dictionary_utils .get_element (app_dict , PLAN_PATH )
934+ stage_mode = dictionary_utils .get_element (app_dict , STAGE_MODE )
933935 targets = dictionary_utils .get_element (app_dict , TARGET )
934936 options = _get_deploy_options (model_apps , app_name , library_module = 'false' )
935937
@@ -945,7 +947,8 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
945947 self .__get_mt_names_from_location (location )
946948
947949 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 ,
949952 resource_group_template = resource_group_template_name ,
950953 options = options )
951954 location .remove_name_token (token_name )
@@ -973,7 +976,7 @@ def __get_mt_names_from_location(self, app_location):
973976 dummy_location .pop_location ()
974977 return resource_group_template_name , resource_group_name , partition_name
975978
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 ,
977980 resource_group = None , resource_group_template = None , options = None ):
978981 """
979982 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,
10391042 kwargs ['resourceGroupTemplate' ] = str (resource_group_template )
10401043 if partition is not None :
10411044 kwargs ['partition' ] = str (partition )
1045+ if stage_mode is not None :
1046+ kwargs ['stageMode' ] = str (stage_mode )
10421047 if options is not None :
10431048 for key , value in options .iteritems ():
10441049 kwargs [key ] = value
0 commit comments