|
|
|
Starts
Action : was.starts (Category : was, Name : starts, By : kikonf)
Complete Name : was.starts.by.kikonf Version : 5.0 License : Modified BSD License Purpose of the was category : Easy to customize. This category use in background the wsadmin command in jython mode (through AdminConfig, AdminControl and AdminTask), to drive WebSphere Application Server ® configuration. You can use it to manage the whole WebSphere ® architecture. Purpose of this starts plugin : Start one Server The following shows the main Source Code File for the Action : was.starts Toggle lines ## Copyright (c) 2008, Patrick Germain Placidoux ## All rights reserved. ## ## This file is part of Kikonf Public Software. ## ## Kikonf Public Software is released under the modified BSD License, ## which should accompany it or any part of it in the file "COPYING". ## If you do not have this file you can access the license ## through the WWW at http://www.kikonf.org/license/bsd/license.txt. ## ## Home: http://www.kikonf.org ## Contact: kikonf@gmx.com from actions.was.tools import * class Starts(wasAction): def run(self): self_funct='run' starts_node = self.getTop() starts_attrs = starts_node.getAttrs() scope_id, scope_attrs, scope=self.getScope(parent_node=starts_node, indent=self.getIndent()) #-- Retreives scope self.verbose(scope_attrs) indent=self.getIndent() + 3*' ' verbose('Node MBean retreiving.', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile()) na=AdminControl.queryNames('*:*,type=NodeAgent,node=' + scope_attrs['node']) if na=='':raise xception.kikonfActionSystemException(self, self_funct, 'The node:' + scope_attrs['node'] + ', do not seem to be started !\nAdvice: check the node exist and is started.') verbose('Node MBean invoking launchProcess', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile()) AdminControl.invoke(na, 'launchProcess', scope_attrs['server']) verbose('Aplication Server:' + scope_attrs['server'] + ' started on node:' + scope_attrs['node'] + '.', level=self.getVerbose(), ifLevel=2, indent=indent) def verbose(self, scope_attrs): scope=str(scope_attrs).replace("'", '')[1:-1] verbose('Application Server at scope:' + scope + '.', level=self.getVerbose(), ifLevel=2, indent=self.getIndent())
Trademarks :
|