'Create (boot) a new server.
:param name: Something to name the server.
:param image: The :class:`Image` to boot with.
:param flavor: The :class:`Flavor` to boot onto.
:param meta: A dict of arbitrary key/value metadata to store for this
server. Both keys and values must be <=255 characters.
:param files: A dict of files to overwrite on the server upon boot.
Keys are file names (i.e. ``/etc/passwd``) and values
are the file contents (either as a string or as a
file-like object). A maximum of five entries is allowed,
and each file must be 10k or less.
:param reservation_id: return a reservation_id for the set of
servers being requested, boolean.
:param min_count: (optional extension) The minimum number of
servers to launch.
:param max_count: (optional extension) The maximum number of
servers to launch.
:param security_groups: A list of security group names
:param userdata: user data to pass to be exposed by the metadata
server this can be a file type object as well or a
string.
:param key_name: (optional extension) name of previously created
keypair to inject into the instance.
:param availability_zone: Name of the availability zone for instance
placement.
:param block_device_mapping: (optional extension) A dict of block
device mappings for this server.
:param block_device_mapping_v2: (optional extension) A dict of block
device mappings for this server.
:param nics:  An ordered list of nics (dicts) to be added to this
server, with information about connected networks,
fixed IPs, port etc.
Beginning in microversion 2.37 this field is required and
also supports a single string value of \'auto\' or \'none\'.
The \'auto\' value means the Compute service will
automatically allocate a network for the project if one
is not available. This is the same behavior as not
passing anything for nics before microversion 2.37. The
\'none\' value tells the Compute service to not allocate
any networking for the server.
:param scheduler_hints: (optional extension) arbitrary key-value pairs
specified by the client to help boot an instance
:param config_drive: (optional extension) value for config drive
either boolean, or volume-id
:param disk_config: (optional extension) control how the disk is
partitioned when the server is created.  possible
values are \'AUTO\' or \'MANUAL\'.
:param admin_pass: (optional extension) add a user supplied admin
password.
:param access_ip_v4: (optional extension) add alternative access ip v4
:param access_ip_v6: (optional extension) add alternative access ip v6
:param description: optional description of the server (allowed since
microversion 2.19)
:param tags: A list of arbitrary strings to be added to the
server as tags (allowed since microversion 2.52)'

def create(self, name, image, flavor, meta=None, files=None, reservation_id=False, min_count=None, max_count=None, security_groups=None, userdata=None, key_name=None, availability_zone=None, block_device_mapping=None, block_device_mapping_v2=None, nics=None, scheduler_hints=None, config_drive=None, disk_config=None, admin_pass=None, access_ip_v4=None, access_ip_v6=None, **kwargs):

    if (not min_count):
        min_count = 1
    if (not max_count):
        max_count = min_count
    if (min_count > max_count):
        min_count = max_count
    boot_args = [name, image, flavor]
    descr_microversion = api_versions.APIVersion('2.19')
    if (('description' in kwargs) and (self.api_version < descr_microversion)):
        raise exceptions.UnsupportedAttribute('description', '2.19')
    self._validate_create_nics(nics)
    tags_microversion = api_versions.APIVersion('2.32')
    if (self.api_version < tags_microversion):
        if nics:
            for nic_info in nics:
                if nic_info.get('tag'):
                    raise ValueError('Setting    interface    tags    is    unsupported    before    microversion    2.32')
        if block_device_mapping_v2:
            for bdm in block_device_mapping_v2:
                if bdm.get('tag'):
                    raise ValueError('Setting    block    device    tags    is    unsupported    before    microversion    2.32')
    boot_tags_microversion = api_versions.APIVersion('2.52')
    if (('tags' in kwargs) and (self.api_version < boot_tags_microversion)):
        raise exceptions.UnsupportedAttribute('tags', '2.52')
    boot_kwargs = dict(meta=meta, files=files, userdata=userdata, reservation_id=reservation_id, min_count=min_count, max_count=max_count, security_groups=security_groups, key_name=key_name, availability_zone=availability_zone, scheduler_hints=scheduler_hints, config_drive=config_drive, disk_config=disk_config, admin_pass=admin_pass, access_ip_v4=access_ip_v4, access_ip_v6=access_ip_v6, **kwargs)
    if block_device_mapping:
        resource_url = '/os-volumes_boot'
        boot_kwargs['block_device_mapping'] = block_device_mapping
    elif block_device_mapping_v2:
        resource_url = '/os-volumes_boot'
        boot_kwargs['block_device_mapping_v2'] = block_device_mapping_v2
    else:
        resource_url = '/servers'
    if nics:
        boot_kwargs['nics'] = nics
    response_key = ('server' if (not reservation_id) else 'reservation_id')
    return self._boot(resource_url, response_key, *boot_args, **boot_kwargs)
