@@ -259,7 +259,7 @@ def is_restart_required(self):
259259
260260 def cancel_edit (self ):
261261 """
262- Cancel current edit session
262+ Cancel current edit session and discard all unsaved changes
263263 """
264264 self .__load_global ('cancelEdit' )('y' )
265265
@@ -375,6 +375,10 @@ def set_server_groups(self, server, server_groups, timeout):
375375 """
376376 Targets the list of server groups to the managed server.
377377
378+ WARNING: The online version of setServerGroups() does change out of the edit MBean
379+ tree when complete. However, since we don't know the mode at this level, leave
380+ it up to the caller to determine if moving back to the edit() tree is needed.
381+
378382 :param server: the name of the managed server
379383 :param server_groups: the list of template-defined server groups to target to the server
380384 :param timeout: the timeout for the setServerGroups command
@@ -384,7 +388,10 @@ def set_server_groups(self, server, server_groups, timeout):
384388 self .__logger .entering (server_groups , server , timeout , class_name = self .__class_name , method_name = _method_name )
385389
386390 try :
387- self .__load_global ('setServerGroups' )(server , server_groups , timeout )
391+ # In the WDT context, we never need online setServerGroups to acquire its own edit lock.
392+ # As such, always pass true for skipEdit.
393+ #
394+ self .__load_global ('setServerGroups' )(serverName = server , serverGroups = server_groups , timeout = timeout , skipEdit = True )
388395 except (self .__load_global ('WLSTException' ), offlineWLSTException ), e :
389396 pwe = exception_helper .create_exception (self .__exception_type , 'WLSDPLY-00023' , server_groups , server ,
390397 _format_exception (e ), error = e )
0 commit comments