def config_create(self, kernel=None, label=None, devices=[], disks=[],<EOL>volumes=[], **kwargs):
from .volume import Volume<EOL>hypervisor_prefix = '<STR_LIT>' if self.hypervisor == '<STR_LIT>' else '<STR_LIT>'<EOL>device_names = [hypervisor_prefix + string.ascii_lowercase[i] for i in range(<NUM_LIT:0>, <NUM_LIT:8>)]<EOL>device_map = {device_names[i]: None for i in range(<NUM_LIT:0>, len(device_names))}<EOL>if devices and (disks or volumes):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if not devices:<EOL><INDENT>if not isinstance(disks, list):<EOL><INDENT>disks = [disks]<EOL><DEDENT>if not isinstance(volumes, list):<EOL><INDENT>volumes = [volumes]<EOL><DEDENT>devices = []<EOL>for d in disks:<EOL><INDENT>if d is None:<EOL><INDENT>devices.append(None)<EOL><DEDENT>elif isinstance(d, Disk):<EOL><INDENT>devices.append(d)<EOL><DEDENT>else:<EOL><INDENT>devices.append(Disk(self._client, int(d), self.id))<EOL><DEDENT><DEDENT>for v in volumes:<EOL><INDENT>if v is None:<EOL><INDENT>devices.append(None)<EOL><DEDENT>elif isinstance(v, Volume):<EOL><INDENT>devices.append(v)<EOL><DEDENT>else:<EOL><INDENT>devices.append(Volume(self._client, int(v)))<EOL><DEDENT><DEDENT><DEDENT>if not devices:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for i, d in enumerate(devices):<EOL><INDENT>if d is None:<EOL><INDENT>pass<EOL><DEDENT>elif isinstance(d, Disk):<EOL><INDENT>device_map[device_names[i]] = {'<STR_LIT>': d.id }<EOL><DEDENT>elif isinstance(d, Volume):<EOL><INDENT>device_map[device_names[i]] = {'<STR_LIT>': d.id }<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT>params = {<EOL>'<STR_LIT>': kernel.id if issubclass(type(kernel), Base) else kernel,<EOL>'<STR_LIT:label>': label if label else "<STR_LIT>".format(self.label, len(self.configs)),<EOL>'<STR_LIT>': device_map,<EOL>}<EOL>params.update(kwargs)<EOL>result = self._client.post("<STR_LIT>".format(Instance.api_endpoint), model=self, data=params)<EOL>self.invalidate()<EOL>if not '<STR_LIT:id>' in result:<EOL><INDENT>raise UnexpectedResponseError('<STR_LIT>', json=result)<EOL><DEDENT>c = Config(self._client, result['<STR_LIT:id>'], self.id, result)<EOL>return c<EOL>
Creates a Linode Config with the given attributes.

:param kernel: The kernel to boot with.
:param label: The config label
:param disks: The list of disks, starting at sda, to map to this config.
:param volumes: The volumes, starting after the last disk, to map to this
    config
:param devices: A list of devices to assign to this config, in device
    index order.  Values must be of type Disk or Volume. If this is
    given, you may not include disks or volumes.
:param **kwargs: Any other arguments accepted by the api.

:returns: A new Linode Config