Exemplo n.º 1
0
    def _getAllPackages(self):
        logging.debug('Check required packages ...')
        for pack in REQ_PACK:
            self.res, self.message = deployUtil.getPackageInfo("REQ", pack,
                                                               'status')
            self._xmlOutput('REQ PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.req_pack.append(pack)

        for p in self.req_pack:
            logging.debug('>>> %s should be installed', p)
        logging.debug('Check VDS packages ...')
        for pack in VDS_PACK:
            self.res, self.message = deployUtil.getPackageInfo("VDS", pack,
                                                               'status')
            self._xmlOutput('VDS PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.vds_pack.append(pack)

        for p in self.vds_pack:
            logging.debug('>>> %s should be installed', p)
        logging.debug('Check development packages ...')
        for pack in DEVEL_PACK:
            self.res, self.message = deployUtil.getPackageInfo("DEVEL", pack,
                                                               'status')
            self._xmlOutput('DEVEL PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.devel_pack.append(pack)

        for p in self.devel_pack:
            logging.debug('>>> %s should be installed', p)
Exemplo n.º 2
0
    def _getAllPackages(self):
        logging.debug('Check required packages ...')
        for pack in REQ_PACK:
            self.res, self.message = deployUtil.getPackageInfo(
                "REQ", pack, 'status')
            self._xmlOutput('REQ PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.req_pack.append(pack)

        for p in self.req_pack:
            logging.debug('>>> %s should be installed', p)
        logging.debug('Check VDS packages ...')
        for pack in VDS_PACK:
            self.res, self.message = deployUtil.getPackageInfo(
                "VDS", pack, 'status')
            self._xmlOutput('VDS PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.vds_pack.append(pack)

        for p in self.vds_pack:
            logging.debug('>>> %s should be installed', p)
        logging.debug('Check development packages ...')
        for pack in DEVEL_PACK:
            self.res, self.message = deployUtil.getPackageInfo(
                "DEVEL", pack, 'status')
            self._xmlOutput('DEVEL PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                self.devel_pack.append(pack)

        for p in self.devel_pack:
            logging.debug('>>> %s should be installed', p)
Exemplo n.º 3
0
 def _avoidPKGConflict(self):
     for pack in CONFL_PACK:
         self.res, self.message = deployUtil.getPackageInfo("CONFL", pack, "status")
         res = self.res  # Reverse display status
         if res == "WARN":
             res = "OK"
         self._xmlOutput("CONFLICTING PACKAGES", res, "result", pack, self.message)
         if self.res == "OK":
             self.confl_pack.append(pack)
             logging.debug(">>> Conflicting package %s installed", pack)
Exemplo n.º 4
0
 def _delPKG(self):
     for pack in DEL_PACK:
         self.res, self.message = deployUtil.getPackageInfo("DEL", pack, "status")
         res = self.res  # Reverse display status
         if res == "WARN":
             res = "OK"
         else:  # PKG needs to be deleted....
             self.del_pack.append(pack)
             logging.debug(">>> Obsolete package %s installed", pack)
             res = "WARN"
         self._xmlOutput("OBSOLETE PACKAGES", res, "result", pack, self.message)
Exemplo n.º 5
0
 def _avoidPKGConflict(self):
     for pack in CONFL_PACK:
         self.res, self.message = deployUtil.getPackageInfo(
             "CONFL", pack, 'status')
         res = self.res  # Reverse display status
         if res == "WARN":
             res = "OK"
         self._xmlOutput('CONFLICTING PACKAGES', res, "result", pack,
                         self.message)
         if self.res == "OK":
             self.confl_pack.append(pack)
             logging.debug('>>> Conflicting package %s installed', pack)
Exemplo n.º 6
0
 def _delPKG(self):
     for pack in DEL_PACK:
         self.res, self.message = deployUtil.getPackageInfo(
             "DEL", pack, 'status')
         res = self.res  # Reverse display status
         if res == "WARN":
             res = "OK"
         else:  # PKG needs to be deleted....
             self.del_pack.append(pack)
             logging.debug('>>> Obsolete package %s installed', pack)
             res = "WARN"
         self._xmlOutput('OBSOLETE PACKAGES', res, "result", pack,
                         self.message)
Exemplo n.º 7
0
    def installGlusterPackages(self):
        packages = []
        updates = []
        for pack in GLUSTER_PACK:
            self.res, self.message = deployUtil.getPackageInfo("GLUSTER", pack, "status")
            self._xmlOutput("GLUSTER PACKAGES", self.res, "result", pack, self.message)
            if self.res == "WARN":
                packages.append(pack)
            else:
                updates.append(pack)

        self.rc = 0
        logging.debug("Install GLUSTER packages ... %s", packages.__repr__())
        while not self.rc and packages:
            self.rc = self._installPackage(packages.pop(), "GLUSTER")

        if not self.rc and updates:
            logging.debug("Update GLUSTER packages ...  %s", updates.__repr__())
        while not self.rc and updates:
            self.rc = self._installPackage(updates.pop(), "GLUSTER", 1)
        return self.rc
Exemplo n.º 8
0
    def installGlusterPackages(self):
        packages = []
        updates = []
        for pack in GLUSTER_PACK:
            self.res, self.message = deployUtil.getPackageInfo(
                "GLUSTER", pack, 'status')
            self._xmlOutput('GLUSTER PACKAGES', self.res, "result", pack,
                            self.message)
            if self.res == "WARN":
                packages.append(pack)
            else:
                updates.append(pack)

        self.rc = 0
        logging.debug('Install GLUSTER packages ... %s', packages.__repr__())
        while (not self.rc and packages):
            self.rc = self._installPackage(packages.pop(), "GLUSTER")

        if not self.rc and updates:
            logging.debug('Update GLUSTER packages ...  %s',
                          updates.__repr__())
        while (not self.rc and updates):
            self.rc = self._installPackage(updates.pop(), "GLUSTER", 1)
        return self.rc