'Shared implementation for tests below that create instance.'

def setUp(self):

    super(ServersControllerCreateTestV21, self).setUp()
    self.instance_cache_num = 0
    fakes.stub_out_nw_api(self)
    self._set_up_controller()
    def create_db_entry_for_new_instance(*args, **kwargs):
        instance = args[4]
        instance.uuid = FAKE_UUID
        return instance
    fake.stub_out_image_service(self)
    self.stub_out('nova.compute.api.API.create_db_entry_for_new_instance', create_db_entry_for_new_instance)
    self.req = fakes.HTTPRequest.blank('')
