diff --git a/cli/simple_read_only/test_compute.py b/cli/simple_read_only/test_compute.py
index 742b5a4..073fde1 100644
--- a/cli/simple_read_only/test_compute.py
+++ b/cli/simple_read_only/test_compute.py
@@ -55,6 +55,7 @@
         cls.identity = config.TempestConfig().identity
         super(SimpleReadOnlyNovaCLientTest, cls).setUpClass()
 
+    #NOTE(jogo): This should eventually be moved into a base class
     def nova(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes nova command for the given action."""
         #TODO(jogo) make admin=False work
@@ -66,39 +67,144 @@
         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)
+        try:
+            result = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError, e:
+            LOG.error("command output:\n%s" % e.output)
+            raise
         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')
 
+    #NOTE(jogo): Commands in order listed in 'nova help'
+
+    # Positional arguments:
+
+    def test_admin_absolute_limites(self):
+        self.nova('absolute-limits')
+
     def test_admin_aggregate_list(self):
         self.nova('aggregate-list')
 
+    def test_admin_availability_zone_list(self):
+        self.nova('availability-zone-list')
+
     def test_admin_cloudpipe_list(self):
         self.nova('cloudpipe-list')
 
-    def test_admin_image_list(self):
-        self.nova('image-list')
+    def test_admin_credentials(self):
+        self.nova('credentials')
 
     def test_admin_dns_domains(self):
         self.nova('dns-domains')
 
+    @testtools.skip("needs parameters")
+    def test_admin_dns_list(self):
+        self.nova('dns-list')
+
+    def test_admin_endpoints(self):
+        self.nova('endpoints')
+
+    def test_admin_flavor_acces_list(self):
+        self.assertRaises(subprocess.CalledProcessError,
+                          self.nova,
+                          'flavor-access-list')
+        # Failed to get access list for public flavor type
+        self.assertRaises(subprocess.CalledProcessError,
+                          self.nova,
+                          'flavor-access-list',
+                          params='--flavor m1.tiny')
+
     def test_admin_flavor_list(self):
         self.nova('flavor-list')
 
-    #TODO(jogo) add more tests
+    def test_admin_floating_ip_bulk_list(self):
+        self.nova('floating-ip-bulk-list')
+
+    def test_admin_floating_ip_list(self):
+        self.nova('floating-ip-list')
+
+    def test_admin_floating_ip_pool_list(self):
+        self.nova('floating-ip-pool-list')
+
+    def test_admin_host_list(self):
+        self.nova('host-list')
+
+    def test_admin_hypervisor_list(self):
+        self.nova('hypervisor-list')
+
+    def test_admin_image_list(self):
+        self.nova('image-list')
+
+    @testtools.skip("needs parameters")
+    def test_admin_interface_list(self):
+        self.nova('interface-list')
+
+    def test_admin_keypair_list(self):
+        self.nova('keypair-list')
+
+    def test_admin_list(self):
+        self.nova('list')
+        self.nova('list', params='--all-tenants 1')
+        self.nova('list', params='--all-tenants 0')
+        self.assertRaises(subprocess.CalledProcessError,
+                          self.nova,
+                          'list',
+                          params='--all-tenants bad')
+
+    def test_admin_network_list(self):
+        self.nova('network-list')
+
+    def test_admin_rate_limits(self):
+        self.nova('rate-limits')
+
+    def test_admin_secgroup_list(self):
+        self.nova('secgroup-list')
+
+    @testtools.skip("needs parameters")
+    def test_admin_secgroup_list_rules(self):
+        self.nova('secgroup-list-rules')
+
+    def test_admin_servce_list(self):
+        self.nova('service-list')
+
+    def test_admin_usage(self):
+        self.nova('usage')
+
+    def test_admin_usage_list(self):
+        self.nova('usage-list')
+
+    def test_admin_volume_list(self):
+        self.nova('volume-list')
+
+    def test_admin_volume_snapshot_list(self):
+        self.nova('volume-snapshot-list')
+
+    def test_admin_volume_type_list(self):
+        self.nova('volume-type-list')
+
+    def test_admin_help(self):
+        self.nova('help')
+
+    def test_admin_list_extensions(self):
+        self.nova('list-extensions')
+
+    def test_admin_net_list(self):
+        self.nova('net-list')
+
+    # Optional arguments:
+
+    def test_admin_version(self):
+        self.nova('', flags='--version')
+
+    def test_admin_debug_list(self):
+        self.nova('list', flags='--debug')
+
+    def test_admin_timeout(self):
+        self.nova('list', flags='--timeout 2')
+
+    def test_admin_timing(self):
+        self.nova('list', flags='--timing')
