diff --git a/tempest/tests/compute/base.py b/tempest/tests/compute/base.py
index 2e5b4fe..94fff13 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/tests/compute/base.py
@@ -173,36 +173,21 @@
         cls.clear_isolated_creds()
 
     @classmethod
-    def create_server(cls, image_id=None, flavor=None):
+    def create_server(cls, **kwargs):
         """Wrapper utility that returns a test server."""
-        server_name = rand_name(cls.__name__ + "-instance")
-
-        if not flavor:
-            flavor = cls.flavor_ref
-        if not image_id:
-            image_id = cls.image_ref
+        name = rand_name(cls.__name__ + "-instance")
+        if 'name' in kwargs:
+            name = kwargs.pop('name')
+        flavor = kwargs.get('flavor', cls.flavor_ref)
+        image_id = kwargs.get('image_id', cls.image_ref)
 
         resp, server = cls.servers_client.create_server(
-                                                server_name, image_id, flavor)
-        cls.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
-        cls.servers.append(server)
-        return server
+            name, image_id, flavor, **kwargs)
 
-    @classmethod
-    def create_server_with_extras(cls, name, image_id=None,
-                                  flavor=None, **kwargs):
-        # TODO(sdague) transitional function because many
-        # server tests were using extra args and resp so can't
-        # easily be ported to create_server. Will be merged
-        # later
-        if not flavor:
-            flavor = cls.flavor_ref
-        if not image_id:
-            image_id = cls.image_ref
+        if 'wait_until' in kwargs:
+            cls.servers_client.wait_for_server_status(
+                server['id'], kwargs['wait_until'])
 
-        resp, server = cls.servers_client.create_server(name,
-                                                        image_id, flavor,
-                                                        **kwargs)
         cls.servers.append(server)
         return resp, server
 
diff --git a/tempest/tests/compute/images/test_images.py b/tempest/tests/compute/images/test_images.py
index d8d38aa..1e90202 100644
--- a/tempest/tests/compute/images/test_images.py
+++ b/tempest/tests/compute/images/test_images.py
@@ -51,12 +51,6 @@
 
     def tearDown(self):
         """Terminate test instances created after a test is executed."""
-        for server in self.servers:
-            resp, body = self.servers_client.delete_server(server['id'])
-            if resp['status'] == '204':
-                self.servers.remove(server)
-                self.servers_client.wait_for_server_termination(server['id'])
-
         for image_id in self.image_ids:
             self.client.delete_image(image_id)
             self.image_ids.remove(image_id)
@@ -65,11 +59,7 @@
     @attr(type='negative')
     def test_create_image_from_deleted_server(self):
         # An image should not be created if the server instance is removed
-        server_name = rand_name('server')
-        resp, server = self.servers_client.create_server(server_name,
-                                                         self.image_ref,
-                                                         self.flavor_ref)
-        self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
+        resp, server = self.create_server(wait_until='ACTIVE')
 
         # Delete server before trying to create server
         self.servers_client.delete_server(server['id'])
@@ -114,7 +104,7 @@
     @attr(type='negative')
     def test_create_image_when_server_is_terminating(self):
         # Return an error when creating image of server that is terminating
-        server = self.create_server()
+        resp, server = self.create_server(wait_until='ACTIVE')
         self.servers_client.delete_server(server['id'])
 
         snapshot_name = rand_name('test-snap-')
@@ -124,11 +114,7 @@
     @attr(type='negative')
     def test_create_image_when_server_is_building(self):
         # Return error when creating an image of a server that is building
-        server_name = rand_name('test-vm-')
-        resp, server = self.servers_client.create_server(server_name,
-                                                         self.image_ref,
-                                                         self.flavor_ref)
-        self.servers.append(server)
+        resp, server = self.create_server(wait_until='BUILD')
         snapshot_name = rand_name('test-snap-')
         self.assertRaises(exceptions.Duplicate, self.client.create_image,
                           server['id'], snapshot_name)
@@ -137,7 +123,7 @@
     @attr(type='negative')
     def test_create_image_when_server_is_rebooting(self):
         # Return error when creating an image of server that is rebooting
-        server = self.create_server()
+        resp, server = self.create_server()
         self.servers_client.reboot(server['id'], 'HARD')
 
         snapshot_name = rand_name('test-snap-')
diff --git a/tempest/tests/compute/images/test_images_oneserver.py b/tempest/tests/compute/images/test_images_oneserver.py
index 34ea868..6d3f043 100644
--- a/tempest/tests/compute/images/test_images_oneserver.py
+++ b/tempest/tests/compute/images/test_images_oneserver.py
@@ -41,7 +41,7 @@
         super(ImagesOneServerTestJSON, cls).setUpClass()
         cls.client = cls.images_client
         cls.servers_client = cls.servers_client
-        cls.server = cls.create_server()
+        resp, cls.server = cls.create_server(wait_until='ACTIVE')
 
         cls.image_ids = []
 
diff --git a/tempest/tests/compute/images/test_list_image_filters.py b/tempest/tests/compute/images/test_list_image_filters.py
index 56f388d..5038a65 100644
--- a/tempest/tests/compute/images/test_list_image_filters.py
+++ b/tempest/tests/compute/images/test_list_image_filters.py
@@ -30,16 +30,10 @@
         super(ListImageFiltersTest, cls).setUpClass()
         cls.client = cls.images_client
 
-        name = rand_name('server')
-        resp, cls.server1 = cls.servers_client.create_server(name,
-                                                             cls.image_ref,
-                                                             cls.flavor_ref)
-        name = rand_name('server')
-        resp, cls.server2 = cls.servers_client.create_server(name,
-                                                             cls.image_ref,
-                                                             cls.flavor_ref)
+        resp, cls.server1 = cls.create_server()
+        resp, cls.server2 = cls.create_server(wait_until='ACTIVE')
+        # NOTE(sdague) this is faster than doing the sync wait_util on both
         cls.servers_client.wait_for_server_status(cls.server1['id'], 'ACTIVE')
-        cls.servers_client.wait_for_server_status(cls.server2['id'], 'ACTIVE')
 
         # Create images to be used in the filter tests
         image1_name = rand_name('image')
@@ -71,8 +65,6 @@
         cls.client.delete_image(cls.image1_id)
         cls.client.delete_image(cls.image2_id)
         cls.client.delete_image(cls.image3_id)
-        cls.servers_client.delete_server(cls.server1['id'])
-        cls.servers_client.delete_server(cls.server2['id'])
         super(ListImageFiltersTest, cls).tearDownClass()
 
     @attr(type='negative')
diff --git a/tempest/tests/compute/servers/test_disk_config.py b/tempest/tests/compute/servers/test_disk_config.py
index 671abf9..3a1ec20 100644
--- a/tempest/tests/compute/servers/test_disk_config.py
+++ b/tempest/tests/compute/servers/test_disk_config.py
@@ -37,14 +37,8 @@
     @attr(type='positive')
     def test_rebuild_server_with_manual_disk_config(self):
         # A server should be rebuilt using the manual disk config option
-        name = rand_name('server')
-        resp, server = self.create_server_with_extras(name,
-                                                      self.image_ref,
-                                                      self.flavor_ref,
-                                                      disk_config='AUTO')
-
-        #Wait for the server to become active
-        self.client.wait_for_server_status(server['id'], 'ACTIVE')
+        resp, server = self.create_server(disk_config='AUTO',
+                                          wait_until='ACTIVE')
 
         #Verify the specified attributes are set correctly
         resp, server = self.client.get_server(server['id'])
@@ -67,14 +61,8 @@
     @attr(type='positive')
     def test_rebuild_server_with_auto_disk_config(self):
         # A server should be rebuilt using the auto disk config option
-        name = rand_name('server')
-        resp, server = self.create_server_with_extras(name,
-                                                      self.image_ref,
-                                                      self.flavor_ref,
-                                                      disk_config='MANUAL')
-
-        #Wait for the server to become active
-        self.client.wait_for_server_status(server['id'], 'ACTIVE')
+        resp, server = self.create_server(disk_config='MANUAL',
+                                          wait_until='ACTIVE')
 
         #Verify the specified attributes are set correctly
         resp, server = self.client.get_server(server['id'])
@@ -98,14 +86,8 @@
     @testtools.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
     def test_resize_server_from_manual_to_auto(self):
         # A server should be resized from manual to auto disk config
-        name = rand_name('server')
-        resp, server = self.create_server_with_extras(name,
-                                                      self.image_ref,
-                                                      self.flavor_ref,
-                                                      disk_config='MANUAL')
-
-        #Wait for the server to become active
-        self.client.wait_for_server_status(server['id'], 'ACTIVE')
+        resp, server = self.create_server(disk_config='MANUAL',
+                                          wait_until='ACTIVE')
 
         #Resize with auto option
         self.client.resize(server['id'], self.flavor_ref_alt,
@@ -124,14 +106,8 @@
     @testtools.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
     def test_resize_server_from_auto_to_manual(self):
         # A server should be resized from auto to manual disk config
-        name = rand_name('server')
-        resp, server = self.create_server_with_extras(name,
-                                                      self.image_ref,
-                                                      self.flavor_ref,
-                                                      disk_config='AUTO')
-
-        #Wait for the server to become active
-        self.client.wait_for_server_status(server['id'], 'ACTIVE')
+        resp, server = self.create_server(disk_config='AUTO',
+                                          wait_until='ACTIVE')
 
         #Resize with manual option
         self.client.resize(server['id'], self.flavor_ref_alt,
diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/tests/compute/servers/test_list_servers_negative.py
index 320f920..01b11e0 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/tests/compute/servers/test_list_servers_negative.py
@@ -78,10 +78,10 @@
         cls.existing_fixtures = []
         cls.deleted_fixtures = []
         for x in xrange(2):
-            srv = cls.create_server()
+            resp, srv = cls.create_server()
             cls.existing_fixtures.append(srv)
 
-        srv = cls.create_server()
+        resp, srv = cls.create_server()
         cls.client.delete_server(srv['id'])
         # We ignore errors on termination because the server may
         # be put into ERROR status on a quick spawn, then delete,
diff --git a/tempest/tests/compute/servers/test_server_actions.py b/tempest/tests/compute/servers/test_server_actions.py
index bc8e843..5046ec2 100644
--- a/tempest/tests/compute/servers/test_server_actions.py
+++ b/tempest/tests/compute/servers/test_server_actions.py
@@ -257,13 +257,9 @@
     def rebuild_servers(cls):
         # Destroy any existing server and creates a new one
         cls.clear_servers()
-        cls.name = rand_name('server')
-        resp, server = cls.create_server_with_extras(cls.name,
-                                                     cls.image_ref,
-                                                     cls.flavor_ref)
+        resp, server = cls.create_server(wait_until='ACTIVE')
         cls.server_id = server['id']
         cls.password = server['adminPass']
-        cls.client.wait_for_server_status(cls.server_id, 'ACTIVE')
 
 
 class ServerActionsTestXML(ServerActionsTestJSON):
diff --git a/tempest/tests/compute/servers/test_server_metadata.py b/tempest/tests/compute/servers/test_server_metadata.py
index cdfe2f1..4b17fa2 100644
--- a/tempest/tests/compute/servers/test_server_metadata.py
+++ b/tempest/tests/compute/servers/test_server_metadata.py
@@ -83,11 +83,9 @@
         for sz in [256, 257, 511, 1023]:
             key = "k" * sz
             meta = {key: 'data1'}
-            name = rand_name('server')
             self.assertRaises(exceptions.OverLimit,
-                              self.create_server_with_extras,
-                              name, self.image_ref,
-                              self.flavor_ref, meta=meta)
+                              self.create_server,
+                              meta=meta)
 
         # no teardown - all creates should fail
 
@@ -95,11 +93,9 @@
     def test_create_metadata_key_error(self):
         # Blank key should trigger an error.
         meta = {'': 'data1'}
-        name = rand_name('server')
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          name, self.image_ref,
-                          self.flavor_ref, meta=meta)
+                          self.create_server,
+                          meta=meta)
 
     def test_update_server_metadata(self):
         # The server's metadata values should be updated to the
diff --git a/tempest/tests/compute/servers/test_server_personality.py b/tempest/tests/compute/servers/test_server_personality.py
index 816ca76..0bafc2c 100644
--- a/tempest/tests/compute/servers/test_server_personality.py
+++ b/tempest/tests/compute/servers/test_server_personality.py
@@ -35,7 +35,6 @@
     def test_personality_files_exceed_limit(self):
         # Server creation should fail if greater than the maximum allowed
         # number of files are injected into the server.
-        name = rand_name('server')
         file_contents = 'This is a test file.'
         personality = []
         max_file_limit = \
@@ -45,9 +44,7 @@
             personality.append({'path': path,
                                 'contents': base64.b64encode(file_contents)})
         try:
-            self.create_server_with_extras(name, self.image_ref,
-                                           self.flavor_ref,
-                                           personality=personality)
+            self.create_server(personality=personality)
         except exceptions.OverLimit:
             pass
         else:
@@ -58,7 +55,6 @@
         # Server should be created successfully if maximum allowed number of
         # files is injected into the server during creation.
         try:
-            name = rand_name('server')
             file_contents = 'This is a test file.'
 
             max_file_limit = \
@@ -71,9 +67,7 @@
                     'path': path,
                     'contents': base64.b64encode(file_contents),
                 })
-            resp, server = self.create_server_with_extras(name, self.image_ref,
-                                                          self.flavor_ref,
-                                                          personality=person)
+            resp, server = self.create_server(personality=person)
             self.assertEqual('202', resp['status'])
 
         #Teardown
diff --git a/tempest/tests/compute/servers/test_servers.py b/tempest/tests/compute/servers/test_servers.py
index a912652..a8d28df 100644
--- a/tempest/tests/compute/servers/test_servers.py
+++ b/tempest/tests/compute/servers/test_servers.py
@@ -35,11 +35,7 @@
 
         try:
             server = None
-            name = rand_name('server')
-            resp, server = self.create_server_with_extras(name, self.image_ref,
-                                                          self.flavor_ref,
-                                                          adminPass='test'
-                                                          'password')
+            resp, server = self.create_server(adminPass='testpassword')
 
             #Verify the password is set correctly in the response
             self.assertEqual('testpassword', server['adminPass'])
@@ -52,19 +48,16 @@
     def test_create_with_existing_server_name(self):
         # Creating a server with a name that already exists is allowed
 
+        # TODO(sdague): clear out try, we do cleanup one layer up
         try:
             id1 = None
             id2 = None
             server_name = rand_name('server')
-            resp, server = self.create_server_with_extras(server_name,
-                                                          self.image_ref,
-                                                          self.flavor_ref)
-            self.client.wait_for_server_status(server['id'], 'ACTIVE')
+            resp, server = self.create_server(name=server_name,
+                                              wait_until='ACTIVE')
             id1 = server['id']
-            resp, server = self.create_server_with_extras(server_name,
-                                                          self.image_ref,
-                                                          self.flavor_ref)
-            self.client.wait_for_server_status(server['id'], 'ACTIVE')
+            resp, server = self.create_server(name=server_name,
+                                              wait_until='ACTIVE')
             id2 = server['id']
             self.assertNotEqual(id1, id2, "Did not create a new server")
             resp, server = self.client.get_server(id1)
@@ -86,11 +79,7 @@
             key_name = rand_name('key')
             resp, keypair = self.keypairs_client.create_keypair(key_name)
             resp, body = self.keypairs_client.list_keypairs()
-            server_name = rand_name('server')
-            resp, server = self.create_server_with_extras(server_name,
-                                                          self.image_ref,
-                                                          self.flavor_ref,
-                                                          key_name=key_name)
+            resp, server = self.create_server(key_name=key_name)
             self.assertEqual('202', resp['status'])
             self.client.wait_for_server_status(server['id'], 'ACTIVE')
             resp, server = self.client.get_server(server['id'])
@@ -104,10 +93,7 @@
         # The server name should be changed to the the provided value
         try:
             server = None
-            name = rand_name('server')
-            resp, server = self.create_server_with_extras(name, self.image_ref,
-                                                          self.flavor_ref)
-            self.client.wait_for_server_status(server['id'], 'ACTIVE')
+            resp, server = self.create_server(wait_until='ACTIVE')
 
             #Update the server with a new name
             resp, server = self.client.update_server(server['id'],
@@ -129,10 +115,7 @@
         # The server's access addresses should reflect the provided values
         try:
             server = None
-            name = rand_name('server')
-            resp, server = self.create_server_with_extras(name, self.image_ref,
-                                                          self.flavor_ref)
-            self.client.wait_for_server_status(server['id'], 'ACTIVE')
+            resp, server = self.create_server(wait_until='ACTIVE')
 
             #Update the IPv4 and IPv6 access addresses
             resp, body = self.client.update_server(server['id'],
@@ -153,10 +136,7 @@
 
     def test_delete_server_while_in_building_state(self):
         # Delete a server while it's VM state is Building
-        name = rand_name('server')
-        resp, server = self.create_server_with_extras(name, self.image_ref,
-                                                      self.flavor_ref)
-        self.client.wait_for_server_status(server['id'], 'BUILD')
+        resp, server = self.create_server(wait_until='BUILD')
         resp, _ = self.client.delete_server(server['id'])
         self.assertEqual('204', resp['status'])
 
diff --git a/tempest/tests/compute/servers/test_servers_negative.py b/tempest/tests/compute/servers/test_servers_negative.py
index 80358ec..366b630 100644
--- a/tempest/tests/compute/servers/test_servers_negative.py
+++ b/tempest/tests/compute/servers/test_servers_negative.py
@@ -41,8 +41,8 @@
         # Create a server with name parameter empty
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          '', self.image_ref, self.flavor_ref)
+                          self.create_server,
+                          name='')
 
     @attr(type='negative')
     def test_personality_file_contents_not_encoded(self):
@@ -53,8 +53,7 @@
                    'contents': file_contents}]
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          'fail', self.image_ref, self.flavor_ref,
+                          self.create_server,
                           personality=person)
 
     @attr(type='negative')
@@ -62,16 +61,16 @@
         # Create a server with an unknown image
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          'fail', -1, self.flavor_ref)
+                          self.create_server,
+                          image_id=-1)
 
     @attr(type='negative')
     def test_create_with_invalid_flavor(self):
         # Create a server with an unknown flavor
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          'fail', self.image_ref, -1)
+                          self.create_server,
+                          flavor=-1,)
 
     @attr(type='negative')
     def test_invalid_access_ip_v4_address(self):
@@ -79,8 +78,7 @@
 
         IPv4 = '1.1.1.1.1.1'
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras, "fail",
-                          self.image_ref, self.flavor_ref, accessIPv4=IPv4)
+                          self.create_server, accessIPv4=IPv4)
 
     @attr(type='negative')
     def test_invalid_ip_v6_address(self):
@@ -89,18 +87,13 @@
         IPv6 = 'notvalid'
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras, "fail",
-                          self.image_ref, self.flavor_ref, accessIPv6=IPv6)
+                          self.create_server, accessIPv6=IPv6)
 
     @attr(type='negative')
     def test_reboot_deleted_server(self):
         # Reboot a deleted server
-
-        self.name = rand_name('server')
-        resp, create_server = self.create_server_with_extras(self.name,
-                                                             self.image_ref,
-                                                             self.flavor_ref)
-        self.server_id = create_server['id']
+        resp, server = self.create_server()
+        self.server_id = server['id']
         self.client.delete_server(self.server_id)
         self.client.wait_for_server_termination(self.server_id)
         self.assertRaises(exceptions.NotFound, self.client.reboot,
@@ -110,11 +103,8 @@
     def test_rebuild_deleted_server(self):
         # Rebuild a deleted server
 
-        self.name = rand_name('server')
-        resp, create_server = self.create_server_with_extras(self.name,
-                                                             self.image_ref,
-                                                             self.flavor_ref)
-        self.server_id = create_server['id']
+        resp, server = self.create_server()
+        self.server_id = server['id']
         self.client.delete_server(self.server_id)
         self.client.wait_for_server_termination(self.server_id)
 
@@ -128,8 +118,8 @@
 
         server_name = 12345
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          server_name, self.image_ref, self.flavor_ref)
+                          self.create_server,
+                          name=server_name)
 
     @attr(type='negative')
     def test_create_server_name_length_exceeds_256(self):
@@ -137,19 +127,17 @@
 
         server_name = 'a' * 256
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          server_name, self.image_ref, self.flavor_ref)
+                          self.create_server,
+                          name=server_name)
 
     @attr(type='negative')
     def test_create_with_invalid_network_uuid(self):
         # Pass invalid network uuid while creating a server
 
-        server_name = rand_name('server')
         networks = [{'fixed_ip': '10.0.1.1', 'uuid': 'a-b-c-d-e-f-g-h-i-j'}]
 
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          server_name, self.image_ref, self.flavor_ref,
+                          self.create_server,
                           networks=networks)
 
     @attr(type='negative')
@@ -157,21 +145,17 @@
         # Pass a non existant keypair while creating a server
 
         key_name = rand_name('key')
-        server_name = rand_name('server')
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras,
-                          server_name, self.image_ref, self.flavor_ref,
+                          self.create_server,
                           key_name=key_name)
 
     @attr(type='negative')
     def test_create_server_metadata_exceeds_length_limit(self):
         # Pass really long metadata while creating a server
 
-        server_name = rand_name('server')
         metadata = {'a': 'b' * 260}
         self.assertRaises(exceptions.OverLimit,
-                          self.create_server_with_extras,
-                          server_name, self.image_ref, self.flavor_ref,
+                          self.create_server,
                           meta=metadata)
 
     @attr(type='negative')
@@ -252,8 +236,7 @@
 
         security_groups = [{'name': 'does_not_exist'}]
         self.assertRaises(exceptions.BadRequest,
-                          self.create_server_with_extras, 'fail',
-                          self.image_ref, self.flavor_ref,
+                          self.create_server,
                           security_groups=security_groups)
 
     @attr(type='negative')
