def create_flavor(self, ram, vcpus, disk, name=None, is_public='True', **kwargs):
    if (name is None):
        name = data_utils.rand_name((self.__class__.__name__ + '-flavor'))
    id = kwargs.pop('id', data_utils.rand_int_id(start=1000))
    client = self.admin_flavors_client
    flavor = client.create_flavor(ram=ram, vcpus=vcpus, disk=disk, name=name, id=id, is_public=is_public, **kwargs)['flavor']
    self.addCleanup(client.wait_for_resource_deletion, flavor['id'])
    self.addCleanup(client.delete_flavor, flavor['id'])
    return flavor
def create_flavor(self, ram, vcpus, disk, name=None, is_public='True', **kwargs):
    if (name is None):
        name = data_utils.rand_name((self.__class__.__name__ + '-flavor'))
    id = kwargs.pop('id', data_utils.rand_int_id(start=1000))
    client = self.admin_flavors_client
    flavor = client.create_flavor(ram=ram, vcpus=vcpus, disk=disk, name=name, id=id, is_public=is_public, **kwargs)['flavor']
    self.addCleanup(client.wait_for_resource_deletion, flavor['id'])
    self.addCleanup(client.delete_flavor, flavor['id'])
    return flavor