diff --git a/cli/__init__.py b/cli/__init__.py
new file mode 100644
index 0000000..cea0b62
--- /dev/null
+++ b/cli/__init__.py
@@ -0,0 +1,36 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import logging
+
+from tempest.openstack.common import cfg
+
+LOG = logging.getLogger(__name__)
+
+cli_opts = [
+    cfg.BoolOpt('enabled',
+                default=True,
+                help="enable cli tests"),
+    cfg.StrOpt('cli_dir',
+               default='/usr/local/bin/',
+               help="directory where python client binaries are located"),
+]
+
+CONF = cfg.CONF
+cli_group = cfg.OptGroup(name='cli', title="cli Configuration Options")
+CONF.register_group(cli_group)
+CONF.register_opts(cli_opts, group=cli_group)
diff --git a/cli/simple_read_only/README.txt b/cli/simple_read_only/README.txt
new file mode 100644
index 0000000..ca5fa2f
--- /dev/null
+++ b/cli/simple_read_only/README.txt
@@ -0,0 +1 @@
+This directory consists of simple read only python client tests.
diff --git a/tempest/services/compute/admin/__init__.py b/cli/simple_read_only/__init__.py
similarity index 100%
rename from tempest/services/compute/admin/__init__.py
rename to cli/simple_read_only/__init__.py
diff --git a/cli/simple_read_only/test_compute.py b/cli/simple_read_only/test_compute.py
new file mode 100644
index 0000000..742b5a4
--- /dev/null
+++ b/cli/simple_read_only/test_compute.py
@@ -0,0 +1,104 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import logging
+import shlex
+import subprocess
+
+import testtools
+
+import cli
+
+from tempest import config
+from tempest.openstack.common import cfg
+
+
+CONF = cfg.CONF
+
+
+LOG = logging.getLogger(__name__)
+
+
+class SimpleReadOnlyNovaCLientTest(testtools.TestCase):
+
+    """
+    This is a first pass at a simple read only python-novaclient test. This
+    only exercises client commands that are read only.
+
+    This should test commands:
+    * as a regular user
+    * as a admin user
+    * with and without optional parameters
+    * initially just check return codes, and later test command outputs
+
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        if not CONF.cli.enabled:
+            msg = "cli testing disabled"
+            raise cls.skipException(msg)
+        cls.identity = config.TempestConfig().identity
+        super(SimpleReadOnlyNovaCLientTest, cls).setUpClass()
+
+    def nova(self, action, flags='', params='', admin=True, fail_ok=False):
+        """Executes nova command for the given action."""
+        #TODO(jogo) make admin=False work
+        creds = ('--os-username %s --os-tenant-name %s --os-password %s '
+                 '--os-auth-url %s ' % (self.identity.admin_username,
+                 self.identity.admin_tenant_name, self.identity.admin_password,
+                 self.identity.uri))
+        flags = creds + ' ' + flags
+        cmd = ' '.join([CONF.cli.cli_dir + 'nova', flags, action, params])
+        LOG.info("running: '%s'" % cmd)
+        cmd = shlex.split(cmd)
+        result = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+        return result
+
+    def test_admin_version(self):
+        self.nova('', flags='--version')
+
+    def test_admin_timing(self):
+        self.nova('list', flags='--timing')
+
+    def test_admin_timeout(self):
+        self.nova('list', flags='--timeout 2')
+
+    def test_admin_debug_list(self):
+        self.nova('list', flags='--debug')
+
+    def test_admin_fake_action(self):
+        self.assertRaises(subprocess.CalledProcessError,
+                          self.nova,
+                          'this-does-nova-exist')
+
+    def test_admin_aggregate_list(self):
+        self.nova('aggregate-list')
+
+    def test_admin_cloudpipe_list(self):
+        self.nova('cloudpipe-list')
+
+    def test_admin_image_list(self):
+        self.nova('image-list')
+
+    def test_admin_dns_domains(self):
+        self.nova('dns-domains')
+
+    def test_admin_flavor_list(self):
+        self.nova('flavor-list')
+
+    #TODO(jogo) add more tests
diff --git a/run_tests.sh b/run_tests.sh
index e26c51c..3a2bd94 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -11,28 +11,12 @@
   echo "  -s, --smoke              Only run smoke tests"
   echo "  -w, --whitebox           Only run whitebox tests"
   echo "  -c, --nova-coverage      Enable Nova coverage collection"
+  echo "  -C, --config             Config file location"
   echo "  -p, --pep8               Just run pep8"
   echo "  -h, --help               Print this usage message"
   echo "  -d, --debug              Debug this script -- set -o xtrace"
   echo "  -S, --stdout             Don't capture stdout"
-  exit
-}
-
-function process_option {
-  case "$1" in
-    -h|--help) usage;;
-    -V|--virtual-env) always_venv=1; never_venv=0;;
-    -N|--no-virtual-env) always_venv=0; never_venv=1;;
-    -n|--no-site-packages) no_site_packages=1;;
-    -f|--force) force=1;;
-    -d|--debug) set -o xtrace;;
-    -c|--nova-coverage) let nova_coverage=1;;
-    -p|--pep8) let just_pep8=1;;
-    -s|--smoke) noseargs="$noseargs --attr=type=smoke";;
-    -w|--whitebox) noseargs="$noseargs --attr=type=whitebox";;
-    -S|--stdout) noseargs="$noseargs -s";;
-    *) noseargs="$noseargs $1"
-  esac
+  echo "  -- [NOSEOPTIONS]         After the first '--' you can pass arbitrary arguments to nosetests "
 }
 
 noseargs=""
@@ -45,6 +29,44 @@
 force=0
 wrapper=""
 nova_coverage=0
+config_file=""
+
+if ! options=$(getopt -o VNnfswcphdsC: -l virtual-env,no-virtual-env,no-site-packages,force,smoke,whitebox,nova-coverage,pep8,help,debug,stdout,config: -- "$@")
+then
+    # parse error
+    usage
+    exit 1
+fi
+
+eval set -- $options
+first_uu=yes
+while [ $# -gt 0 ]; do
+  case "$1" in
+    -h|--help) usage; exit;;
+    -V|--virtual-env) always_venv=1; never_venv=0;;
+    -N|--no-virtual-env) always_venv=0; never_venv=1;;
+    -n|--no-site-packages) no_site_packages=1;;
+    -f|--force) force=1;;
+    -d|--debug) set -o xtrace;;
+    -c|--nova-coverage) let nova_coverage=1;;
+    -C|--config) config_file=$2; shift;;
+    -p|--pep8) let just_pep8=1;;
+    -s|--smoke) noseargs="$noseargs --attr=type=smoke";;
+    -w|--whitebox) noseargs="$noseargs --attr=type=whitebox";;
+    -S|--stdout) noseargs="$noseargs -s";;
+    --) [ "yes" == "$first_uu" ] || noseargs="$noseargs $1"; first_uu=no  ;;
+    *) noseargs="$noseargs $1"
+  esac
+  shift
+done
+
+if [ -n "$config_file" ]; then
+    config_file=`readlink -f "$config_file"`
+    export TEMPEST_CONFIG_DIR=`dirname "$config_file"`
+    export TEMPEST_CONFIG=`basename "$config_file"`
+fi
+
+cd `dirname "$0"`
 
 export NOSE_WITH_OPENSTACK=1
 export NOSE_OPENSTACK_COLOR=1
@@ -53,10 +75,6 @@
 export NOSE_OPENSTACK_SHOW_ELAPSED=1
 export NOSE_OPENSTACK_STDOUT=1
 
-for arg in "$@"; do
-  process_option $arg
-done
-
 if [ $no_site_packages -eq 1 ]; then
   installvenvopts="--no-site-packages"
 fi
@@ -68,7 +86,6 @@
   noseargs="$noseargs tempest"
 fi
 
-
 function run_tests {
   ${wrapper} $NOSETESTS
 }
diff --git a/tempest/clients.py b/tempest/clients.py
index 7eb17f3..7d314f3 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -26,12 +26,12 @@
 from tempest.services.compute.json.floating_ips_client import \
     FloatingIPsClientJSON
 from tempest.services.compute.json.images_client import ImagesClientJSON
+from tempest.services.compute.json.keypairs_client import KeyPairsClientJSON
 from tempest.services.compute.json.limits_client import LimitsClientJSON
-from tempest.services.compute.json.servers_client import ServersClientJSON
+from tempest.services.compute.json.quotas_client import QuotasClientJSON
 from tempest.services.compute.json.security_groups_client import \
     SecurityGroupsClientJSON
-from tempest.services.compute.json.keypairs_client import KeyPairsClientJSON
-from tempest.services.compute.json.quotas_client import QuotasClientJSON
+from tempest.services.compute.json.servers_client import ServersClientJSON
 from tempest.services.compute.json.volumes_extensions_client import \
     VolumesExtensionsClientJSON
 from tempest.services.compute.xml.extensions_client import ExtensionsClientXML
@@ -54,20 +54,20 @@
 from tempest.services.image.json.image_client import ImageClientJSON
 from tempest.services.network.json.network_client import NetworkClient
 from tempest.services.object_storage.account_client import AccountClient
-from tempest.services.object_storage.container_client import ContainerClient
-from tempest.services.object_storage.object_client import ObjectClient
-from tempest.services.volume.json.admin.volume_types_client import \
-    VolumeTypesClientJSON
-from tempest.services.volume.xml.admin.volume_types_client import \
-    VolumeTypesClientXML
-from tempest.services.volume.json.snapshots_client import SnapshotsClientJSON
-from tempest.services.volume.json.volumes_client import VolumesClientJSON
-from tempest.services.volume.xml.snapshots_client import SnapshotsClientXML
-from tempest.services.volume.xml.volumes_client import VolumesClientXML
-from tempest.services.object_storage.object_client import \
-    ObjectClientCustomizedHeader
 from tempest.services.object_storage.account_client import \
     AccountClientCustomizedHeader
+from tempest.services.object_storage.container_client import ContainerClient
+from tempest.services.object_storage.object_client import ObjectClient
+from tempest.services.object_storage.object_client import \
+    ObjectClientCustomizedHeader
+from tempest.services.volume.json.admin.volume_types_client import \
+    VolumeTypesClientJSON
+from tempest.services.volume.json.snapshots_client import SnapshotsClientJSON
+from tempest.services.volume.json.volumes_client import VolumesClientJSON
+from tempest.services.volume.xml.admin.volume_types_client import \
+    VolumeTypesClientXML
+from tempest.services.volume.xml.snapshots_client import SnapshotsClientXML
+from tempest.services.volume.xml.volumes_client import VolumesClientXML
 
 LOG = logging.getLogger(__name__)
 
diff --git a/tempest/openstack/common/cfg.py b/tempest/openstack/common/cfg.py
index 1bbfe6a..08d9b47 100644
--- a/tempest/openstack/common/cfg.py
+++ b/tempest/openstack/common/cfg.py
@@ -217,7 +217,7 @@
         ...
      ]
 
-This module also contains a global instance of the CommonConfigOpts class
+This module also contains a global instance of the ConfigOpts class
 in order to support a common usage pattern in OpenStack::
 
     from tempest.openstack.common import cfg
@@ -236,10 +236,11 @@
 Positional command line arguments are supported via a 'positional' Opt
 constructor argument::
 
-    >>> CONF.register_cli_opt(MultiStrOpt('bar', positional=True))
+    >>> conf = ConfigOpts()
+    >>> conf.register_cli_opt(MultiStrOpt('bar', positional=True))
     True
-    >>> CONF(['a', 'b'])
-    >>> CONF.bar
+    >>> conf(['a', 'b'])
+    >>> conf.bar
     ['a', 'b']
 
 It is also possible to use argparse "sub-parsers" to parse additional
@@ -249,10 +250,11 @@
     ...     list_action = subparsers.add_parser('list')
     ...     list_action.add_argument('id')
     ...
-    >>> CONF.register_cli_opt(SubCommandOpt('action', handler=add_parsers))
+    >>> conf = ConfigOpts()
+    >>> conf.register_cli_opt(SubCommandOpt('action', handler=add_parsers))
     True
-    >>> CONF(['list', '10'])
-    >>> CONF.action.name, CONF.action.id
+    >>> conf(args=['list', '10'])
+    >>> conf.action.name, conf.action.id
     ('list', '10')
 
 """
@@ -861,7 +863,7 @@
                                            description=self.description,
                                            help=self.help)
 
-        if not self.handler is None:
+        if self.handler is not None:
             self.handler(subparsers)
 
 
@@ -1295,6 +1297,24 @@
         __import__(module_str)
         self._get_opt_info(name, group)
 
+    def import_group(self, group, module_str):
+        """Import an option group from a module.
+
+        Import a module and check that a given option group is registered.
+
+        This is intended for use with global configuration objects
+        like cfg.CONF where modules commonly register options with
+        CONF at module load time. If one module requires an option group
+        defined by another module it can use this method to explicitly
+        declare the dependency.
+
+        :param group: an option OptGroup object or group name
+        :param module_str: the name of a module to import
+        :raises: ImportError, NoSuchGroupError
+        """
+        __import__(module_str)
+        self._get_group(group)
+
     @__clear_cache
     def set_override(self, name, override, group=None):
         """Override an opt value.
@@ -1417,7 +1437,7 @@
         logger.log(lvl, "=" * 80)
 
         def _sanitize(opt, value):
-            """Obfuscate values of options declared secret."""
+            """Obfuscate values of options declared secret"""
             return value if not opt.secret else '*' * len(str(value))
 
         for opt_name in sorted(self._opts):
@@ -1545,8 +1565,8 @@
         group = group_or_name if isinstance(group_or_name, OptGroup) else None
         group_name = group.name if group else group_or_name
 
-        if not group_name in self._groups:
-            if not group is None or not autocreate:
+        if group_name not in self._groups:
+            if group is not None or not autocreate:
                 raise NoSuchGroupError(group_name)
 
             self.register_group(OptGroup(name=group_name))
@@ -1566,7 +1586,7 @@
             group = self._get_group(group)
             opts = group._opts
 
-        if not opt_name in opts:
+        if opt_name not in opts:
             raise NoSuchOptError(opt_name, group)
 
         return opts[opt_name]
@@ -1604,7 +1624,7 @@
             opt = info['opt']
 
             if opt.required:
-                if ('default' in info or 'override' in info):
+                if 'default' in info or 'override' in info:
                     continue
 
                 if self._get(opt.dest, group) is None:
@@ -1623,7 +1643,7 @@
         """
         self._args = args
 
-        for opt, group in self._all_cli_opts():
+        for opt, group in sorted(self._all_cli_opts()):
             opt._add_to_cli(self._oparser, group)
 
         return vars(self._oparser.parse_args(args))
@@ -1726,62 +1746,4 @@
             return value
 
 
-class CommonConfigOpts(ConfigOpts):
-
-    DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
-    DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
-
-    common_cli_opts = [
-        BoolOpt('debug',
-                short='d',
-                default=False,
-                help='Print debugging output'),
-        BoolOpt('verbose',
-                short='v',
-                default=False,
-                help='Print more verbose output'),
-    ]
-
-    logging_cli_opts = [
-        StrOpt('log-config',
-               metavar='PATH',
-               help='If this option is specified, the logging configuration '
-                    'file specified is used and overrides any other logging '
-                    'options specified. Please see the Python logging module '
-                    'documentation for details on logging configuration '
-                    'files.'),
-        StrOpt('log-format',
-               default=DEFAULT_LOG_FORMAT,
-               metavar='FORMAT',
-               help='A logging.Formatter log message format string which may '
-                    'use any of the available logging.LogRecord attributes. '
-                    'Default: %(default)s'),
-        StrOpt('log-date-format',
-               default=DEFAULT_LOG_DATE_FORMAT,
-               metavar='DATE_FORMAT',
-               help='Format string for %%(asctime)s in log records. '
-                    'Default: %(default)s'),
-        StrOpt('log-file',
-               metavar='PATH',
-               deprecated_name='logfile',
-               help='(Optional) Name of log file to output to. '
-                    'If not set, logging will go to stdout.'),
-        StrOpt('log-dir',
-               deprecated_name='logdir',
-               help='(Optional) The directory to keep log files in '
-                    '(will be prepended to --log-file)'),
-        BoolOpt('use-syslog',
-                default=False,
-                help='Use syslog for logging.'),
-        StrOpt('syslog-log-facility',
-               default='LOG_USER',
-               help='syslog facility to receive log lines')
-    ]
-
-    def __init__(self):
-        super(CommonConfigOpts, self).__init__()
-        self.register_cli_opts(self.common_cli_opts)
-        self.register_cli_opts(self.logging_cli_opts)
-
-
-CONF = CommonConfigOpts()
+CONF = ConfigOpts()
diff --git a/tempest/openstack/common/iniparser.py b/tempest/openstack/common/iniparser.py
index b5cb604..9bf399f 100644
--- a/tempest/openstack/common/iniparser.py
+++ b/tempest/openstack/common/iniparser.py
@@ -54,7 +54,7 @@
 
         value = value.strip()
         if ((value and value[0] == value[-1]) and
-            (value[0] == "\"" or value[0] == "'")):
+                (value[0] == "\"" or value[0] == "'")):
             value = value[1:-1]
         return key.strip(), [value]
 
@@ -100,15 +100,15 @@
             self._assignment(key, value)
 
     def assignment(self, key, value):
-        """Called when a full assignment is parsed."""
+        """Called when a full assignment is parsed"""
         raise NotImplementedError()
 
     def new_section(self, section):
-        """Called when a new section is started."""
+        """Called when a new section is started"""
         raise NotImplementedError()
 
     def comment(self, comment):
-        """Called when a comment is parsed."""
+        """Called when a comment is parsed"""
         pass
 
     def error_invalid_assignment(self, line):
diff --git a/tempest/openstack/common/setup.py b/tempest/openstack/common/setup.py
index e6f72f0..35680b3 100644
--- a/tempest/openstack/common/setup.py
+++ b/tempest/openstack/common/setup.py
@@ -1,6 +1,7 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 
 # Copyright 2011 OpenStack LLC.
+# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -19,7 +20,7 @@
 Utilities with minimum-depends for use in setup.py
 """
 
-import datetime
+import email
 import os
 import re
 import subprocess
@@ -33,11 +34,12 @@
     if os.path.exists(mailmap):
         with open(mailmap, 'r') as fp:
             for l in fp:
-                l = l.strip()
-                if not l.startswith('#') and ' ' in l:
-                    canonical_email, alias = [x for x in l.split(' ')
-                                              if x.startswith('<')]
-                    mapping[alias] = canonical_email
+                try:
+                    canonical_email, alias = re.match(
+                        r'[^#]*?(<.+>).*(<.+>).*', l).groups()
+                except AttributeError:
+                    continue
+                mapping[alias] = canonical_email
     return mapping
 
 
@@ -45,8 +47,8 @@
     """Takes in a string and an email alias mapping and replaces all
        instances of the aliases in the string with their real email.
     """
-    for alias, email in mapping.iteritems():
-        changelog = changelog.replace(alias, email)
+    for alias, email_address in mapping.iteritems():
+        changelog = changelog.replace(alias, email_address)
     return changelog
 
 
@@ -106,23 +108,17 @@
     return dependency_links
 
 
-def write_requirements():
-    venv = os.environ.get('VIRTUAL_ENV', None)
-    if venv is not None:
-        with open("requirements.txt", "w") as req_file:
-            output = subprocess.Popen(["pip", "-E", venv, "freeze", "-l"],
-                                      stdout=subprocess.PIPE)
-            requirements = output.communicate()[0].strip()
-            req_file.write(requirements)
-
-
-def _run_shell_command(cmd):
+def _run_shell_command(cmd, throw_on_error=False):
     if os.name == 'nt':
         output = subprocess.Popen(["cmd.exe", "/C", cmd],
-                                  stdout=subprocess.PIPE)
+                                  stdout=subprocess.PIPE,
+                                  stderr=subprocess.PIPE)
     else:
         output = subprocess.Popen(["/bin/sh", "-c", cmd],
-                                  stdout=subprocess.PIPE)
+                                  stdout=subprocess.PIPE,
+                                  stderr=subprocess.PIPE)
+    if output.returncode and throw_on_error:
+        raise Exception("%s returned %d" % cmd, output.returncode)
     out = output.communicate()
     if len(out) == 0:
         return None
@@ -131,57 +127,6 @@
     return out[0].strip()
 
 
-def _get_git_next_version_suffix(branch_name):
-    datestamp = datetime.datetime.now().strftime('%Y%m%d')
-    if branch_name == 'milestone-proposed':
-        revno_prefix = "r"
-    else:
-        revno_prefix = ""
-    _run_shell_command("git fetch origin +refs/meta/*:refs/remotes/meta/*")
-    milestone_cmd = "git show meta/openstack/release:%s" % branch_name
-    milestonever = _run_shell_command(milestone_cmd)
-    if milestonever:
-        first_half = "%s~%s" % (milestonever, datestamp)
-    else:
-        first_half = datestamp
-
-    post_version = _get_git_post_version()
-    # post version should look like:
-    # 0.1.1.4.gcc9e28a
-    # where the bit after the last . is the short sha, and the bit between
-    # the last and second to last is the revno count
-    (revno, sha) = post_version.split(".")[-2:]
-    second_half = "%s%s.%s" % (revno_prefix, revno, sha)
-    return ".".join((first_half, second_half))
-
-
-def _get_git_current_tag():
-    return _run_shell_command("git tag --contains HEAD")
-
-
-def _get_git_tag_info():
-    return _run_shell_command("git describe --tags")
-
-
-def _get_git_post_version():
-    current_tag = _get_git_current_tag()
-    if current_tag is not None:
-        return current_tag
-    else:
-        tag_info = _get_git_tag_info()
-        if tag_info is None:
-            base_version = "0.0"
-            cmd = "git --no-pager log --oneline"
-            out = _run_shell_command(cmd)
-            revno = len(out.split("\n"))
-            sha = _run_shell_command("git describe --always")
-        else:
-            tag_infos = tag_info.split("-")
-            base_version = "-".join(tag_infos[:-2])
-            (revno, sha) = tag_infos[-2:]
-        return "%s.%s.%s" % (base_version, revno, sha)
-
-
 def write_git_changelog():
     """Write a changelog based on the git changelog."""
     new_changelog = 'ChangeLog'
@@ -227,26 +172,6 @@
 """
 
 
-def read_versioninfo(project):
-    """Read the versioninfo file. If it doesn't exist, we're in a github
-       zipball, and there's really no way to know what version we really
-       are, but that should be ok, because the utility of that should be
-       just about nil if this code path is in use in the first place."""
-    versioninfo_path = os.path.join(project, 'versioninfo')
-    if os.path.exists(versioninfo_path):
-        with open(versioninfo_path, 'r') as vinfo:
-            version = vinfo.read().strip()
-    else:
-        version = "0.0.0"
-    return version
-
-
-def write_versioninfo(project, version):
-    """Write a simple file containing the version of the package."""
-    with open(os.path.join(project, 'versioninfo'), 'w') as fil:
-        fil.write("%s\n" % version)
-
-
 def get_cmdclass():
     """Return dict of commands to run from setup.py."""
 
@@ -276,6 +201,9 @@
         from sphinx.setup_command import BuildDoc
 
         class LocalBuildDoc(BuildDoc):
+
+            builders = ['html', 'man']
+
             def generate_autoindex(self):
                 print "**Autodocumenting from %s" % os.path.abspath(os.curdir)
                 modules = {}
@@ -311,56 +239,97 @@
                 if not os.getenv('SPHINX_DEBUG'):
                     self.generate_autoindex()
 
-                for builder in ['html', 'man']:
+                for builder in self.builders:
                     self.builder = builder
                     self.finalize_options()
                     self.project = self.distribution.get_name()
                     self.version = self.distribution.get_version()
                     self.release = self.distribution.get_version()
                     BuildDoc.run(self)
+
+        class LocalBuildLatex(LocalBuildDoc):
+            builders = ['latex']
+
         cmdclass['build_sphinx'] = LocalBuildDoc
+        cmdclass['build_sphinx_latex'] = LocalBuildLatex
     except ImportError:
         pass
 
     return cmdclass
 
 
-def get_git_branchname():
-    for branch in _run_shell_command("git branch --color=never").split("\n"):
-        if branch.startswith('*'):
-            _branch_name = branch.split()[1].strip()
-    if _branch_name == "(no":
-        _branch_name = "no-branch"
-    return _branch_name
+def _get_revno():
+    """Return the number of commits since the most recent tag.
+
+    We use git-describe to find this out, but if there are no
+    tags then we fall back to counting commits since the beginning
+    of time.
+    """
+    describe = _run_shell_command("git describe --always")
+    if "-" in describe:
+        return describe.rsplit("-", 2)[-2]
+
+    # no tags found
+    revlist = _run_shell_command("git rev-list --abbrev-commit HEAD")
+    return len(revlist.splitlines())
 
 
-def get_pre_version(projectname, base_version):
-    """Return a version which is leading up to a version that will
-       be released in the future."""
-    if os.path.isdir('.git'):
-        current_tag = _get_git_current_tag()
-        if current_tag is not None:
-            version = current_tag
-        else:
-            branch_name = os.getenv('BRANCHNAME',
-                                    os.getenv('GERRIT_REFNAME',
-                                              get_git_branchname()))
-            version_suffix = _get_git_next_version_suffix(branch_name)
-            version = "%s~%s" % (base_version, version_suffix)
-        write_versioninfo(projectname, version)
-        return version
-    else:
-        version = read_versioninfo(projectname)
-    return version
-
-
-def get_post_version(projectname):
+def _get_version_from_git(pre_version):
     """Return a version which is equal to the tag that's on the current
     revision if there is one, or tag plus number of additional revisions
     if the current revision has no tag."""
 
     if os.path.isdir('.git'):
-        version = _get_git_post_version()
-        write_versioninfo(projectname, version)
+        if pre_version:
+            try:
+                return _run_shell_command(
+                    "git describe --exact-match",
+                    throw_on_error=True).replace('-', '.')
+            except Exception:
+                sha = _run_shell_command("git log -n1 --pretty=format:%h")
+                return "%s.a%s.g%s" % (pre_version, _get_revno(), sha)
+        else:
+            return _run_shell_command(
+                "git describe --always").replace('-', '.')
+    return None
+
+
+def _get_version_from_pkg_info(package_name):
+    """Get the version from PKG-INFO file if we can."""
+    try:
+        pkg_info_file = open('PKG-INFO', 'r')
+    except (IOError, OSError):
+        return None
+    try:
+        pkg_info = email.message_from_file(pkg_info_file)
+    except email.MessageError:
+        return None
+    # Check to make sure we're in our own dir
+    if pkg_info.get('Name', None) != package_name:
+        return None
+    return pkg_info.get('Version', None)
+
+
+def get_version(package_name, pre_version=None):
+    """Get the version of the project. First, try getting it from PKG-INFO, if
+    it exists. If it does, that means we're in a distribution tarball or that
+    install has happened. Otherwise, if there is no PKG-INFO file, pull the
+    version from git.
+
+    We do not support setup.py version sanity in git archive tarballs, nor do
+    we support packagers directly sucking our git repo into theirs. We expect
+    that a source tarball be made from our git repo - or that if someone wants
+    to make a source tarball from a fork of our repo with additional tags in it
+    that they understand and desire the results of doing that.
+    """
+    version = os.environ.get("OSLO_PACKAGE_VERSION", None)
+    if version:
         return version
-    return read_versioninfo(projectname)
+    version = _get_version_from_pkg_info(package_name)
+    if version:
+        return version
+    version = _get_version_from_git(pre_version)
+    if version:
+        return version
+    raise Exception("Versioning for this project requires either an sdist"
+                    " tarball, or access to an upstream git repository.")
diff --git a/tempest/services/compute/admin/json/__init__.py b/tempest/services/compute/admin/json/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/services/compute/admin/json/__init__.py
+++ /dev/null
diff --git a/tempest/services/compute/admin/json/quotas_client.py b/tempest/services/compute/admin/json/quotas_client.py
deleted file mode 100644
index b886834..0000000
--- a/tempest/services/compute/admin/json/quotas_client.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 NTT Data
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import json
-
-from tempest.services.compute.json.quotas_client import QuotasClientJSON
-
-
-class AdminQuotasClientJSON(QuotasClientJSON):
-
-    def __init__(self, config, username, password, auth_url, tenant_name=None):
-        super(AdminQuotasClientJSON, self).__init__(config, username, password,
-                                                    auth_url, tenant_name)
-
-    def update_quota_set(self, tenant_id, injected_file_content_bytes=None,
-                         metadata_items=None, ram=None, floating_ips=None,
-                         key_pairs=None, instances=None,
-                         security_group_rules=None, injected_files=None,
-                         cores=None, injected_file_path_bytes=None,
-                         security_groups=None):
-        """
-        Updates the tenant's quota limits for one or more resources
-        """
-        post_body = {}
-
-        if injected_file_content_bytes is not None:
-            post_body['injected_file_content_bytes'] = \
-                injected_file_content_bytes
-
-        if metadata_items is not None:
-            post_body['metadata_items'] = metadata_items
-
-        if ram is not None:
-            post_body['ram'] = ram
-
-        if floating_ips is not None:
-            post_body['floating_ips'] = floating_ips
-
-        if key_pairs is not None:
-            post_body['key_pairs'] = key_pairs
-
-        if instances is not None:
-            post_body['instances'] = instances
-
-        if security_group_rules is not None:
-            post_body['security_group_rules'] = security_group_rules
-
-        if injected_files is not None:
-            post_body['injected_files'] = injected_files
-
-        if cores is not None:
-            post_body['cores'] = cores
-
-        if injected_file_path_bytes is not None:
-            post_body['injected_file_path_bytes'] = injected_file_path_bytes
-
-        if security_groups is not None:
-            post_body['security_groups'] = security_groups
-
-        post_body = json.dumps({'quota_set': post_body})
-        resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body,
-                              self.headers)
-
-        body = json.loads(body)
-        return resp, body['quota_set']
diff --git a/tempest/services/compute/admin/xml/__init__.py b/tempest/services/compute/admin/xml/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/services/compute/admin/xml/__init__.py
+++ /dev/null
diff --git a/tempest/services/compute/admin/xml/quotas_client.py b/tempest/services/compute/admin/xml/quotas_client.py
deleted file mode 100644
index f416334..0000000
--- a/tempest/services/compute/admin/xml/quotas_client.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 NTT Data
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from lxml import etree
-
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import xml_to_json
-from tempest.services.compute.xml.common import XMLNS_11
-from tempest.services.compute.xml.quotas_client import QuotasClientXML
-
-
-class AdminQuotasClientXML(QuotasClientXML):
-
-    def __init__(self, config, username, password, auth_url, tenant_name=None):
-        super(AdminQuotasClientXML, self).__init__(config, username, password,
-                                                   auth_url, tenant_name)
-
-    def update_quota_set(self, tenant_id, injected_file_content_bytes=None,
-                         metadata_items=None, ram=None, floating_ips=None,
-                         key_pairs=None, instances=None,
-                         security_group_rules=None, injected_files=None,
-                         cores=None, injected_file_path_bytes=None,
-                         security_groups=None):
-        """
-        Updates the tenant's quota limits for one or more resources
-        """
-        post_body = Element("quota_set",
-                            xmlns=XMLNS_11)
-
-        if injected_file_content_bytes is not None:
-            post_body.add_attr('injected_file_content_bytes',
-                               injected_file_content_bytes)
-
-        if metadata_items is not None:
-            post_body.add_attr('metadata_items', metadata_items)
-
-        if ram is not None:
-            post_body.add_attr('ram', ram)
-
-        if floating_ips is not None:
-            post_body.add_attr('floating_ips', floating_ips)
-
-        if key_pairs is not None:
-            post_body.add_attr('key_pairs', key_pairs)
-
-        if instances is not None:
-            post_body.add_attr('instances', instances)
-
-        if security_group_rules is not None:
-            post_body.add_attr('security_group_rules', security_group_rules)
-
-        if injected_files is not None:
-            post_body.add_attr('injected_files', injected_files)
-
-        if cores is not None:
-            post_body.add_attr('cores', cores)
-
-        if injected_file_path_bytes is not None:
-            post_body.add_attr('injected_file_path_bytes',
-                               injected_file_path_bytes)
-
-        if security_groups is not None:
-            post_body.add_attr('security_groups', security_groups)
-
-        resp, body = self.put('os-quota-sets/%s' % str(tenant_id),
-                              str(Document(post_body)),
-                              self.headers)
-        body = xml_to_json(etree.fromstring(body))
-        body = self._format_quota(body)
-        return resp, body
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index a95ff1c..330e80b 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -34,3 +34,55 @@
         resp, body = self.get(url)
         body = json.loads(body)
         return resp, body['quota_set']
+
+    def update_quota_set(self, tenant_id, injected_file_content_bytes=None,
+                         metadata_items=None, ram=None, floating_ips=None,
+                         key_pairs=None, instances=None,
+                         security_group_rules=None, injected_files=None,
+                         cores=None, injected_file_path_bytes=None,
+                         security_groups=None):
+        """
+        Updates the tenant's quota limits for one or more resources
+        """
+        post_body = {}
+
+        if injected_file_content_bytes is not None:
+            post_body['injected_file_content_bytes'] = \
+                injected_file_content_bytes
+
+        if metadata_items is not None:
+            post_body['metadata_items'] = metadata_items
+
+        if ram is not None:
+            post_body['ram'] = ram
+
+        if floating_ips is not None:
+            post_body['floating_ips'] = floating_ips
+
+        if key_pairs is not None:
+            post_body['key_pairs'] = key_pairs
+
+        if instances is not None:
+            post_body['instances'] = instances
+
+        if security_group_rules is not None:
+            post_body['security_group_rules'] = security_group_rules
+
+        if injected_files is not None:
+            post_body['injected_files'] = injected_files
+
+        if cores is not None:
+            post_body['cores'] = cores
+
+        if injected_file_path_bytes is not None:
+            post_body['injected_file_path_bytes'] = injected_file_path_bytes
+
+        if security_groups is not None:
+            post_body['security_groups'] = security_groups
+
+        post_body = json.dumps({'quota_set': post_body})
+        resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body,
+                              self.headers)
+
+        body = json.loads(body)
+        return resp, body['quota_set']
diff --git a/tempest/services/compute/xml/quotas_client.py b/tempest/services/compute/xml/quotas_client.py
index faa0aab..0437205 100644
--- a/tempest/services/compute/xml/quotas_client.py
+++ b/tempest/services/compute/xml/quotas_client.py
@@ -18,7 +18,10 @@
 from lxml import etree
 
 from tempest.common.rest_client import RestClientXML
+from tempest.services.compute.xml.common import Document
+from tempest.services.compute.xml.common import Element
 from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml.common import XMLNS_11
 
 
 class QuotasClientXML(RestClientXML):
@@ -51,3 +54,57 @@
         body = xml_to_json(etree.fromstring(body))
         body = self._format_quota(body)
         return resp, body
+
+    def update_quota_set(self, tenant_id, injected_file_content_bytes=None,
+                         metadata_items=None, ram=None, floating_ips=None,
+                         key_pairs=None, instances=None,
+                         security_group_rules=None, injected_files=None,
+                         cores=None, injected_file_path_bytes=None,
+                         security_groups=None):
+        """
+        Updates the tenant's quota limits for one or more resources
+        """
+        post_body = Element("quota_set",
+                            xmlns=XMLNS_11)
+
+        if injected_file_content_bytes is not None:
+            post_body.add_attr('injected_file_content_bytes',
+                               injected_file_content_bytes)
+
+        if metadata_items is not None:
+            post_body.add_attr('metadata_items', metadata_items)
+
+        if ram is not None:
+            post_body.add_attr('ram', ram)
+
+        if floating_ips is not None:
+            post_body.add_attr('floating_ips', floating_ips)
+
+        if key_pairs is not None:
+            post_body.add_attr('key_pairs', key_pairs)
+
+        if instances is not None:
+            post_body.add_attr('instances', instances)
+
+        if security_group_rules is not None:
+            post_body.add_attr('security_group_rules', security_group_rules)
+
+        if injected_files is not None:
+            post_body.add_attr('injected_files', injected_files)
+
+        if cores is not None:
+            post_body.add_attr('cores', cores)
+
+        if injected_file_path_bytes is not None:
+            post_body.add_attr('injected_file_path_bytes',
+                               injected_file_path_bytes)
+
+        if security_groups is not None:
+            post_body.add_attr('security_groups', security_groups)
+
+        resp, body = self.put('os-quota-sets/%s' % str(tenant_id),
+                              str(Document(post_body)),
+                              self.headers)
+        body = xml_to_json(etree.fromstring(body))
+        body = self._format_quota(body)
+        return resp, body
diff --git a/tempest/tests/boto/__init__.py b/tempest/tests/boto/__init__.py
index 6d5149e..dd224d6 100644
--- a/tempest/tests/boto/__init__.py
+++ b/tempest/tests/boto/__init__.py
@@ -27,9 +27,9 @@
 from tempest.common.utils.file_utils import have_effective_read_access
 import tempest.config
 
-A_I_IMAGES_READY = False  # ari,ami,aki
-S3_CAN_CONNECT_ERROR = "Unknown Error"
-EC2_CAN_CONNECT_ERROR = "Unknown Error"
+A_I_IMAGES_READY = True  # ari,ami,aki
+S3_CAN_CONNECT_ERROR = None
+EC2_CAN_CONNECT_ERROR = None
 
 
 def generic_setup_package():
@@ -76,8 +76,6 @@
                                 " faild to get them even by keystoneclient"
     except Exception as exc:
         EC2_CAN_CONNECT_ERROR = str(exc)
-    else:
-        EC2_CAN_CONNECT_ERROR = None
 
     try:
         if urlparse.urlparse(config.boto.s3_url).hostname is None:
@@ -93,6 +91,4 @@
     except keystoneclient.exceptions.Unauthorized:
         S3_CAN_CONNECT_ERROR = "AWS credentials not set," +\
                                " faild to get them even by keystoneclient"
-    else:
-        S3_CAN_CONNECT_ERROR = None
     boto_logger.setLevel(level)
diff --git a/tempest/tests/compute/__init__.py b/tempest/tests/compute/__init__.py
index 5b59a70..a3c6380 100644
--- a/tempest/tests/compute/__init__.py
+++ b/tempest/tests/compute/__init__.py
@@ -30,10 +30,10 @@
 RESIZE_AVAILABLE = CONFIG.compute.resize_available
 CHANGE_PASSWORD_AVAILABLE = CONFIG.compute.change_password_available
 WHITEBOX_ENABLED = CONFIG.whitebox.whitebox_enabled
-DISK_CONFIG_ENABLED = False
+DISK_CONFIG_ENABLED = True
 DISK_CONFIG_ENABLED_OVERRIDE = CONFIG.compute.disk_config_enabled_override
-FLAVOR_EXTRA_DATA_ENABLED = False
-MULTI_USER = False
+FLAVOR_EXTRA_DATA_ENABLED = True
+MULTI_USER = True
 
 
 # All compute tests -- single setup function
@@ -66,12 +66,12 @@
     # used in testing. If the test cases are allowed to create
     # users (config.compute.allow_tenant_isolation is true,
     # then we allow multi-user.
-    if CONFIG.compute.allow_tenant_isolation:
-        MULTI_USER = True
-    else:
+    if not CONFIG.compute.allow_tenant_isolation:
         user1 = CONFIG.identity.username
         user2 = CONFIG.identity.alt_username
-        if user2 and user1 != user2:
+        if not user2 or user1 == user2:
+            MULTI_USER = False
+        else:
             user2_password = CONFIG.identity.alt_password
             user2_tenant_name = CONFIG.identity.alt_tenant_name
             if not user2_password or not user2_tenant_name:
@@ -79,7 +79,6 @@
                        "tenant or password: alt_tenant_name=%s alt_password=%s"
                        % (user2_tenant_name, user2_password))
                 raise InvalidConfiguration(msg)
-            MULTI_USER = True
 
 
 class ComputeResource(TestResourceManager):
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index 9ad8745..30c3d59 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -35,7 +35,7 @@
             msg = "FlavorExtraData extension not enabled."
             raise cls.skipException(msg)
 
-        cls.client = cls.os.flavors_client
+        cls.client = cls.os_adm.flavors_client
         cls.flavor_name_prefix = 'test_flavor_'
         cls.ram = 512
         cls.vcpus = 1
@@ -312,6 +312,8 @@
                           self.client.list_flavors_with_detail,
                           {'is_public': 'invalid'})
 
+#TODO(afazekas): Negative tests with regular user
+
 
 class FlavorsAdminTestXML(base.BaseComputeAdminTestXML,
                           base.BaseComputeTestXML,
diff --git a/tempest/tests/compute/admin/test_flavors_extra_specs.py b/tempest/tests/compute/admin/test_flavors_extra_specs.py
index ef4c20e..968603d 100644
--- a/tempest/tests/compute/admin/test_flavors_extra_specs.py
+++ b/tempest/tests/compute/admin/test_flavors_extra_specs.py
@@ -35,7 +35,7 @@
             msg = "FlavorExtraData extension not enabled."
             raise cls.skipException(msg)
 
-        cls.client = cls.os.flavors_client
+        cls.client = cls.os_adm.flavors_client
         flavor_name = 'test_flavor2'
         ram = 512
         vcpus = 1
diff --git a/tempest/tests/compute/admin/test_quotas.py b/tempest/tests/compute/admin/test_quotas.py
index a4b106b..a845632 100644
--- a/tempest/tests/compute/admin/test_quotas.py
+++ b/tempest/tests/compute/admin/test_quotas.py
@@ -16,9 +16,6 @@
 #    under the License.
 
 from tempest import exceptions
-from tempest.services.compute.admin.json \
-    import quotas_client as adm_quotas_json
-from tempest.services.compute.admin.xml import quotas_client as adm_quotas_xml
 from tempest.test import attr
 from tempest.tests.compute import base
 
@@ -27,23 +24,21 @@
 
     @classmethod
     def setUpClass(cls):
-        cls.c_adm_user = cls.config.compute_admin.username
-        cls.c_adm_pass = cls.config.compute_admin.password
-        cls.c_adm_tenant = cls.config.compute_admin.tenant_name
         cls.auth_url = cls.config.identity.uri
         cls.client = cls.os.quotas_client
+        cls.adm_client = cls.os_adm.quotas_client
         cls.identity_admin_client = cls._get_identity_admin_client()
+
         resp, tenants = cls.identity_admin_client.list_tenants()
 
+        #NOTE(afazekas): these test cases should always create and use a new
+        # tenant most of them should be skipped if we can't do that
         if cls.config.compute.allow_tenant_isolation:
             cls.demo_tenant_id = cls.isolated_creds[0][0]['tenantId']
         else:
             cls.demo_tenant_id = [tnt['id'] for tnt in tenants if tnt['name']
                                   == cls.config.identity.tenant_name][0]
 
-        cls.adm_tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
-                             cls.config.compute_admin.tenant_name][0]
-
         cls.default_quota_set = {'injected_file_content_bytes': 10240,
                                  'metadata_items': 128, 'injected_files': 5,
                                  'ram': 51200, 'floating_ips': 10,
@@ -97,6 +92,7 @@
             self.assertEqual(200, resp.status, "Failed to reset quota "
                              "defaults")
 
+    #TODO(afazekas): merge these test cases
     def test_get_updated_quotas(self):
         # Verify that GET shows the updated quota set
         self.adm_client.update_quota_set(self.demo_tenant_id,
@@ -151,6 +147,8 @@
             self.adm_client.update_quota_set(self.demo_tenant_id,
                                              ram=default_mem_quota)
 
+#TODO(afazekas): Add test that tried to update the quota_set as a regular user
+
 
 class QuotasAdminTestJSON(QuotasAdminTestBase, base.BaseComputeAdminTestJSON,
                           base.BaseComputeTest):
@@ -161,10 +159,6 @@
         base.BaseComputeTest.setUpClass()
         super(QuotasAdminTestJSON, cls).setUpClass()
 
-        cls.adm_client = adm_quotas_json.AdminQuotasClientJSON(
-            cls.config, cls.c_adm_user, cls.c_adm_pass,
-            cls.auth_url, cls.c_adm_tenant)
-
     @classmethod
     def tearDownClass(cls):
         super(QuotasAdminTestJSON, cls).tearDownClass()
@@ -180,12 +174,6 @@
         base.BaseComputeTest.setUpClass()
         super(QuotasAdminTestXML, cls).setUpClass()
 
-        cls.adm_client = adm_quotas_xml.AdminQuotasClientXML(cls.config,
-                                                             cls.c_adm_user,
-                                                             cls.c_adm_pass,
-                                                             cls.auth_url,
-                                                             cls.c_adm_tenant)
-
     @classmethod
     def tearDownClass(cls):
         super(QuotasAdminTestXML, cls).tearDownClass()
diff --git a/tempest/tests/compute/base.py b/tempest/tests/compute/base.py
index 594535f..2aae89c 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/tests/compute/base.py
@@ -247,23 +247,23 @@
         super(BaseComputeTestXML, cls).setUpClass()
 
 
-class BaseComputeAdminTest(testtools.TestCase):
+class BaseComputeAdminTest(BaseCompTest):
 
     """Base test case class for all Compute Admin API tests."""
 
     @classmethod
     def setUpClass(cls):
-        cls.config = config.TempestConfig()
-        cls.admin_username = cls.config.identity.admin_username
-        cls.admin_password = cls.config.identity.admin_password
-        cls.admin_tenant = cls.config.identity.admin_tenant_name
+        super(BaseComputeAdminTest, cls).setUpClass()
+        admin_username = cls.config.compute_admin.username
+        admin_password = cls.config.compute_admin.password
+        admin_tenant = cls.config.compute_admin.tenant_name
 
-        if not cls.admin_username and cls.admin_password and cls.admin_tenant:
+        if not (admin_username and admin_password and admin_tenant):
             msg = ("Missing Compute Admin API credentials "
                    "in configuration.")
             raise cls.skipException(msg)
 
-        cls.os = clients.ComputeAdminManager(interface=cls._interface)
+        cls.os_adm = clients.ComputeAdminManager(interface=cls._interface)
 
 
 class BaseComputeAdminTestJSON(BaseComputeAdminTest):
diff --git a/tempest/tests/identity/admin/test_services.py b/tempest/tests/identity/admin/test_services.py
index 16b9fd8..9ac102a 100644
--- a/tempest/tests/identity/admin/test_services.py
+++ b/tempest/tests/identity/admin/test_services.py
@@ -101,4 +101,3 @@
     @classmethod
     def setUpClass(cls):
         super(ServicesTestXML, cls).setUpClass()
-        raise cls.skipException("Skipping until Bug #1061738 resolved")
diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py
index 8b676bf..8f91251 100644
--- a/tools/install_venv_common.py
+++ b/tools/install_venv_common.py
@@ -58,7 +58,7 @@
                               check_exit_code=True):
         """Runs a command in an out-of-process shell.
 
-        Returns the output of that command. Working directory is ROOT.
+        Returns the output of that command. Working directory is self.root.
         """
         if redirect_output:
             stdout = subprocess.PIPE
@@ -101,7 +101,7 @@
             else:
                 self.run_command(['virtualenv', '-q', self.venv])
             print 'done.'
-            print 'Installing pip in virtualenv...',
+            print 'Installing pip in venv...',
             if not self.run_command(['tools/with_venv.sh', 'easy_install',
                                     'pip>1.0']).strip():
                 self.die("Failed to install pip.")
