Ejemplo n.º 1
0
    def __init__(self,host):
      from com.ibm.staf import STAFHandle
      from com.ibm.staf import STAFResult

      __handle = STAFHandle("varHandle")
      __cmd = 'Version'
      __res = __handle.submit2(host, "MISC", __cmd)      
      self.version=__res.result

      self.name='STAF'

      __cmd = 'GET SYSTEM VAR STAF/Config/STAFRoot'
      __res = __handle.submit2(host, "VAR", __cmd)
      self.root=__res.result
Ejemplo n.º 2
0
        def __init__(self, host):
            from com.ibm.staf import STAFHandle
            from com.ibm.staf import STAFResult

            __handle = STAFHandle("varHandle")
            __cmd = 'Version'
            __res = __handle.submit2(host, "MISC", __cmd)
            self.version = __res.result

            self.name = 'STAF'

            __cmd = 'GET SYSTEM VAR STAF/Config/STAFRoot'
            __res = __handle.submit2(host, "VAR", __cmd)
            self.root = __res.result
Ejemplo n.º 3
0
        def __init__(self, host, name='HTTP'):
            from com.ibm.staf import STAFHandle
            from com.ibm.staf import STAFResult

            if hasattr(staf_service, '__init__'):
                staf_service.__init__(self, host, name)

            __handle = STAFHandle("varHandle")
            __res = __handle.submit2(host, "HTTP", "Version")
            self.version = __res.result
Ejemplo n.º 4
0
    def __init__(self,host,name='HTTP'):
      from com.ibm.staf import STAFHandle
      from com.ibm.staf import STAFResult

      if hasattr(staf_service, '__init__'):
        staf_service.__init__(self,host,name)

      __handle = STAFHandle("varHandle")
      __res = __handle.submit2(host, "HTTP", "Version")
      self.version=__res.result
Ejemplo n.º 5
0
        def __init__(self, host, name='EMAIL'):
            from com.ibm.staf import STAFHandle
            from com.ibm.staf import STAFResult
            from com.ibm.staf import STAFMarshallingContext

            if hasattr(staf_service, '__init__'):
                staf_service.__init__(self, host, name)

            __handle = STAFHandle("varHandle")
            __cmd = 'Version'
            __res = __handle.submit2(host, "EMAIL", __cmd)
            self.version = __res.result
            self.recipients = 'TODO: get from config.py'

            __res = __handle.submit2(host, "EMAIL", "LIST SETTINGS")
            __context = STAFMarshallingContext.unmarshall(__res.result)
            __entryMap = __context.getRootObject()

            self.server = __entryMap['mailServer']
            self.port = __entryMap['port']
Ejemplo n.º 6
0
        def __init__(self, host, name='EVENTMANAGER'):
            from com.ibm.staf import STAFHandle
            from com.ibm.staf import STAFResult

            if hasattr(staf_service, '__init__'):
                staf_service.__init__(self, host, name)

            __handle = STAFHandle("varHandle")
            __cmd = 'Version'
            __res = __handle.submit2(host, "EVENTMANAGER", __cmd)
            self.version = __res.result
Ejemplo n.º 7
0
    def __init__(self,host,name='EMAIL'):
      from com.ibm.staf import STAFHandle
      from com.ibm.staf import STAFResult
      from com.ibm.staf import STAFMarshallingContext

      if hasattr(staf_service, '__init__'):
        staf_service.__init__(self,host,name)

      __handle = STAFHandle("varHandle")
      __cmd = 'Version'
      __res = __handle.submit2(host, "EMAIL", __cmd)      
      self.version=__res.result
      self.recipients= 'TODO: get from config.py'

      __res = __handle.submit2(host, "EMAIL", "LIST SETTINGS")
      __context = STAFMarshallingContext.unmarshall(__res.result)
      __entryMap = __context.getRootObject()

      self.server=__entryMap['mailServer']
      self.port=__entryMap['port']
Ejemplo n.º 8
0
    def __init__(self,host,name='EVENTMANAGER'):
      from com.ibm.staf import STAFHandle
      from com.ibm.staf import STAFResult

      if hasattr(staf_service, '__init__'):
        staf_service.__init__(self,host,name)

      __handle = STAFHandle("varHandle")
      __cmd = 'Version'
      __res = __handle.submit2(host, "EVENTMANAGER", __cmd)      
      self.version=__res.result
Ejemplo n.º 9
0
def is_windows_platform(host):
    from java.lang import Boolean
    from com.ibm.staf import STAFHandle
    from com.ibm.staf import STAFResult

    handle = STAFHandle("varHandle")
    res = handle.submit2(host, "VAR", "GET SYSTEM VAR STAF/Config/OS/Name")

    winLower = res.result.lower()
    winNdx = winLower.find("win")
    if winNdx != -1:
        return res.result[winNdx:]
    else:
        return Boolean.FALSE
Ejemplo n.º 10
0
def is_windows_platform(host):
    from java.lang import Boolean
    from com.ibm.staf import STAFHandle
    from com.ibm.staf import STAFResult

    handle = STAFHandle("varHandle") 
    res = handle.submit2(host, "VAR", "GET SYSTEM VAR STAF/Config/OS/Name")

    winLower = res.result.lower()
    winNdx = winLower.find("win")
    if winNdx != -1:
      return res.result[winNdx:]
    else:
      return Boolean.FALSE