Re: [test-API 14/14] Rename 'env.cfg' as 'global.cfg'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/19/2012 10:25 AM, Osier Yang wrote:
It's not only about environment actually, many default settings are
defined in it.
---
  env.cfg =>  global.cfg                              |    0
  repos/domain/install_image.py                      |    2 +-
  repos/domain/install_linux_cdrom.py                |    2 +-
  repos/domain/install_linux_check.py                |    2 +-
  repos/domain/install_linux_net.py                  |    4 ++--
  repos/domain/install_windows_cdrom.py              |    6 +++---
  .../multiple_thread_block_on_domain_create.py      |    2 +-
  src/env_parser.py                                  |    2 +-
  src/exception.py                                   |    2 +-
  src/generator.py                                   |    2 +-
  src/parser.py                                      |    4 ++--
  11 files changed, 14 insertions(+), 14 deletions(-)
  rename env.cfg =>  global.cfg (100%)

diff --git a/env.cfg b/global.cfg
similarity index 100%
rename from env.cfg
rename to global.cfg
diff --git a/repos/domain/install_image.py b/repos/domain/install_image.py
index be36b03..e94ebc7 100644
--- a/repos/domain/install_image.py
+++ b/repos/domain/install_image.py
@@ -60,7 +60,7 @@ def install_image(params):
      logger.info("the path of directory of disk images located on is %s" %
                   imgfullpath)

-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      logger.info("the environment file is %s" % envfile)

      envparser = env_parser.Envparser(envfile)
diff --git a/repos/domain/install_linux_cdrom.py b/repos/domain/install_linux_cdrom.py
index ee3c397..1d5fb28 100644
--- a/repos/domain/install_linux_cdrom.py
+++ b/repos/domain/install_linux_cdrom.py
@@ -223,7 +223,7 @@ def install_linux_cdrom(params):
          logger.info("creating disk images file is successful.")

      logger.info("get system environment information")
-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      logger.info("the environment file is %s" % envfile)

      envparser = env_parser.Envparser(envfile)
diff --git a/repos/domain/install_linux_check.py b/repos/domain/install_linux_check.py
index 303ab7f..74b8819 100644
--- a/repos/domain/install_linux_check.py
+++ b/repos/domain/install_linux_check.py
@@ -148,7 +148,7 @@ def install_linux_check(params):
      # Check app works fine in guest, such as: wget
      logger.info("check point5: check app works fine in guest, such as: wget")
      logger.info("get system environment information")
-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      logger.info("the environment file is %s" % envfile)

      envparser = env_parser.Envparser(envfile)
diff --git a/repos/domain/install_linux_net.py b/repos/domain/install_linux_net.py
index 105c0ea..a47bcea 100644
--- a/repos/domain/install_linux_net.py
+++ b/repos/domain/install_linux_net.py
@@ -188,13 +188,13 @@ def install_linux_net(params):


      logger.info("get system environment information")
-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      logger.info("the environment file is %s" % envfile)

      envparser = env_parser.Envparser(envfile)

      # Get http, ftp or nfs url based on guest os, arch
-    # and installation method from env.cfg
+    # and installation method from global.cfg

      if installmethod == 'http':
          ks = envparser.get_value("guest", guestos + "_" + guestarch +
diff --git a/repos/domain/install_windows_cdrom.py b/repos/domain/install_windows_cdrom.py
index 825aa29..402fa25 100644
--- a/repos/domain/install_windows_cdrom.py
+++ b/repos/domain/install_windows_cdrom.py
@@ -256,10 +256,10 @@ def install_windows_cdrom(params):
          logger.info("creating disk images file is successful.")

      logger.info("get system environment information")
-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      logger.info("the environment file is %s" % envfile)

-    # Get iso file based on guest os and arch from env.cfg
+    # Get iso file based on guest os and arch from global.cfg
      envparser = env_parser.Envparser(envfile)
      iso_file = envparser.get_value("guest", guestos + '_' + guestarch)
      cdkey = envparser.get_value("guest", "%s_%s_key" % (guestos, guestarch))
@@ -427,7 +427,7 @@ def install_windows_cdrom_clean(params):
      guestos = params.get('guestos')
      guestarch = params.get('guestarch')

-    envfile = os.path.join(HOME_PATH, 'env.cfg')
+    envfile = os.path.join(HOME_PATH, 'global.cfg')
      envparser = env_parser.Envparser(envfile)
      iso_file = envparser.get_value("guest", guestos + '_' + guestarch)

diff --git a/repos/regression/multiple_thread_block_on_domain_create.py b/repos/regression/multiple_thread_block_on_domain_create.py
index 1c85706..180736a 100644
--- a/repos/regression/multiple_thread_block_on_domain_create.py
+++ b/repos/regression/multiple_thread_block_on_domain_create.py
@@ -116,7 +116,7 @@ def multiple_thread_block_on_domain_create(params):
      logger.info("the type of hypervisor is %s" % hypervisor)
      logger.debug("the uri to connect is %s" % uri)

-    envfile = os.path.join(homepath, 'env.cfg')
+    envfile = os.path.join(homepath, 'global.cfg')
      envparser = env_parser.Envpaser(envfile)
      ostree = envparser.get_value("guest", guestos + "_" + arch)
      ks = envparser.get_value("guest", guestos + "_" + arch +
diff --git a/src/env_parser.py b/src/env_parser.py
index 0d2f2a2..cf4168f 100644
--- a/src/env_parser.py
+++ b/src/env_parser.py
@@ -1,6 +1,6 @@
  #!/usr/bin/env python
  #
-# env_parser.py: Parser for environment config (env.cfg).
+# env_parser.py: Parser for environment config (global.cfg).
  #
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
diff --git a/src/exception.py b/src/exception.py
index 7f67602..9b61bac 100644
--- a/src/exception.py
+++ b/src/exception.py
@@ -73,7 +73,7 @@ class CaseConfigfileError(LibvirtException):

  class MissingVariable(LibvirtException):
      code = 210
-    message = "Variables missing from env.cfg [variables] section"
+    message = "Variables missing from global.cfg [variables] section"

  class TestError(LibvirtException):
      code = 211
diff --git a/src/generator.py b/src/generator.py
index 1f19ea3..4247fda 100644
--- a/src/generator.py
+++ b/src/generator.py
@@ -59,7 +59,7 @@ class FuncGen(object):
          # Save case information to a file in a format
          self.__case_info_save(activity, testrunid)

-        self.env = env_parser.Envparser("env.cfg")
+        self.env = env_parser.Envparser("global.cfg")

          mapper_obj = mapper.Mapper(activity)
          case_list = mapper_obj.module_casename_func_map()
diff --git a/src/parser.py b/src/parser.py
index 1c4abcb..8a861fd 100644
--- a/src/parser.py
+++ b/src/parser.py
@@ -35,7 +35,7 @@ class CaseFileParser(object):
          self.missing_variables = []
          self.debug = debug
          self.casefile = casefile
-        self.env = env_parser.Envparser("env.cfg")
+        self.env = env_parser.Envparser("global.cfg")
          self.loop_finish = False
          self.loop_start = 0
          self.loop_end = 0
@@ -210,7 +210,7 @@ class CaseFileParser(object):
                  tripped_valuelist = self.variables_lookup(tripped_valuelist)
                  if len(self.missing_variables) != 0:
                      raise exception.MissingVariable(
-                    "The variables %s referenced in %s could not be found in env.cfg" %
+                    "The variables %s referenced in %s could not be found in global.cfg" %
                          (self.missing_variables, self.casefile))

                  tripped_valuename = tripped_valuelist[0]


        global.ini isn't better

        too many .cfg I am dizzied.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]