Ejemplo n.º 1
0
 def check():
     os_name, version, release = platform.linux_distribution()
     if os_distribution(os_name) == "redhat" and re.match(r"^[5|6|7]", version):
         logger.debug("os version %s-%s-%s" % (os_name, version, release))
     elif os_distribution(os_name) == "suse" and version.startswith("11"):
         logger.debug("os version %s-%s-%s" % (os_name, version, release))
     else:
         raise Exception("os version %s-%s-%s not supported!" % (os_name, version, release))
Ejemplo n.º 2
0
 def check():
     os_name, version, release = platform.linux_distribution()
     if os_distribution(os_name) == "redhat" and re.match(r"^[5|6|7]", version):
         logger.debug("os version %s-%s-%s" % (os_name, version, release))
     elif os_distribution(os_name) == "suse" and version.startswith("11"):
         logger.debug("os version %s-%s-%s" % (os_name, version, release))
     else:
         raise Exception("os version %s-%s-%s not supported!" % (os_name, version, release))
Ejemplo n.º 3
0
 def extract_postgres(self):
     logger.debug("Extract postgres database to %s", self.release_path)
     os_name, version, release = platform.linux_distribution()
     if os_distribution(os_name) == "redhat"  and version.startswith("5"):
         self.executor.extract_postgres("postgres-redhat5.5-9.2.4.tar.gz")
     elif os_distribution(os_name) == "redhat"  and version.startswith("6"):
         self.executor.extract_postgres("postgres-redhat6.2-9.2.4.tar.gz")
     elif os_distribution(os_name)  == "suse" and version == "11":
         self.executor.extract_postgres("postgres-suse11-9.2.4.tar.gz")
     else:
         raise Exception("postgres not installed, no version match the operation system")