cle_clock
Home > wikikonf >  was/actions/by kikonf > stopc







Stopc

print

Action : was.stopc   (Category : was, Name : stopc, By : kikonf)
Complete Name : was.stopc.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 stopc plugin : Stop one Cluster

The following shows the main Source Code File for the Action : was.stopc

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 Stopc(wasAction):
    
    def run(self):
        self_funct='run'
        startc_node = self.getTop()        
        startc_attrs = startc_node.getAttrs()    
        scope_id, scope_attrs, scope=self.getScope(parent_node=startc_node, indent=self.getIndent()) #-- Retreives scope
        self.verbose(scope_attrs['cluster'])
        indent=self.getIndent() + 3*' '     

        verbose('Cluster MBean retreiving.', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile())
        cl=AdminControl.completeObjectName('cell=' + self.getCell() + ',type=Cluster,name=' + scope_attrs['cluster'] + ',*')

        verbose('Cluster MBean invoking stop.', level=self.getVerbose(), ifLevel=4, indent=indent, logFile=self.getLogFile())
        AdminControl.invoke(cl, 'stop')
        verbose('Cluster:' + scope_attrs['cluster'] + ' stopped.', level=self.getVerbose(), ifLevel=2, indent=indent)
        
    def verbose(self, name):
        verbose('Cluster:' + name + '.', level=self.getVerbose(), ifLevel=2, indent=self.getIndent())
							
(Source: <KIKONF_INSTALLATION_DIR>/plugins/actions/was/stopc/by/kikonf/stopc.py)


  • Line 1 to 3 say something , say something , say something
  • Line 10 to 17 say something , say something , say something , say something , say something
  • Line 20 to 25 say something



Trademarks :
  • "IBM", "WebSphere", "WebSphere Aplication Server", "WAS" are registred trademarks of International Business Machines Corporation.
  • "Java" and "JVM" are a registred trademarks of Oracle and/or its affiliates.
  • Other names may be trademarks of their respective owners.

Copyright © 2011 - Patrick Placidoux, Hélène Malamoud