예제 #1
0
 def delete(self):
     LOGGER.info("Deleting cluster: " + str(self.name))
     pushd('/Clusters')
     try:
         delete(self.name, "Cluster")
         popd()
     except Exception, e:
         LOGGER.severe("Unable to delete cluster: " + str(self.name))
         popd()
         raise e
예제 #2
0
 def delete(self):
     LOGGER.info("Deleting JDBCSystemResource: " + str(self.name))
     pushd('/')
     try:
         delete(self.name, "JDBCSystemResource")
         popd()
     except Exception, e:
         LOGGER.severe("Unable to delete JDBCSystemResource: " +
                       str(self.name))
         popd()
         raise e
예제 #3
0
 def delete(self):
     LOGGER.info("Deleting machine: " + str(self.name))
     pushd("/")
     try:
         removeReferencesToBean(getMBean(self.mbeanLocation))
         destroyMachine(getMBean(self.mbeanLocation))
         popd()
     except:
         LOGGER.severe("Unable to delete machine: " + str(self.name))
         popd()
         raise
     LOGGER.info("Deleted machine: " + str(self.name))
예제 #4
0
 def delete(self):
     LOGGER.info("Deleting server: " + str(self.name))
     pushd("/Servers")
     try:
         pushd(self.mbeanLocation)
         setCluster(None)
         setMachine(None)
         removeReferencesToBean(getMBean(self.mbeanLocation))
         popd()
         delete(self.name, "Server")
     except Exception, e:
         LOGGER.severe("Unable to delete server: " + str(self.name))
         popd()
         raise e
예제 #5
0
def catalogueTree(catalogueEntry):
    try:
        origDir = catalogueEntry.dir
        theContents = catalogueEntry.dirContents
        for dirEntry in catalogueEntry.dirContents:
            pushd(dirEntry)
            newDir = pwd()
            if (catalogueEntry.dir == newDir):
                # dir has not moved - no other indicator!!
                popd()
                continue
            else:
                newDirContents = lsChildMap()
                newEntry = CatalogueEntry(dirEntry, newDir, newDirContents)
                catalogueEntry.branches[dirEntry] = newEntry
                catalogueTree(newEntry)
                entryDir = pwd()
                popd()
                exitDir = pwd()
    except Exception, e:
        LOGGER.severe("Caught Exception in cataloguing : " + str(e))
        raise e
예제 #6
0
    def removeAsTarget(self):
        LOGGER.fine("Entering entities.PbWlstEntities.Server.removeTarget")

        pushd('/Deployments')

        deployments = lsmap()

        for deployment in deployments:
            print deployment
            pushd(deployment)
            pushd("Targets")

            targets = lsmap()
            newTargets = []
            rePoint = False

            for target in targets:
                print("Target='" + target + "'")

                if target != self.name:
                    # find the type:
                    pushd(target)
                    type = get("Type")
                    newTargets.append(
                        ObjectName("com.bea:Name=" + target + ",Type=" + type))
                    popd()
                else:
                    rePoint = True

            popd()
            print("New Targets: " + str(jarray.array(newTargets, ObjectName)))
            if rePoint:
                print("Repointing targets: " +
                      str(jarray.array(newTargets, ObjectName)))
                set('Targets', jarray.array(newTargets, ObjectName))
            popd()
        popd()
        LOGGER.fine("Exiting entities.PbWlstEntities.Server.removeTarget")
예제 #7
0
def catalogue(dir):
    pushd(dir)
    dirContents = lsmap()
    pwd = pwd()
    catalogueEntry = catalogueTree(CatalogueEntry("/", pwd, dirContents))
    return catalogueEntry