]> git.proxmox.com Git - pve-common.git/commitdiff
support aliases in property strings
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 15 Oct 2015 10:35:18 +0000 (12:35 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 15 Oct 2015 10:36:07 +0000 (12:36 +0200)
In qemu the 'volume' key maps to 'file', both can be used,
so to support this case in the comma-separated property
list parser we need a way to alias keys to one another.
This allows declaring a key like:

  volume => {
      alias => 'file'
  }
  file => {
      type => 'string',
      format => 'pve-volume-id',
      default_key => 1,
      format_description => 'volume'
  }

With this the following property strings are equivalent and
result in the same datastructure being returned from
parse_property_string:

  local:disk.raw
  file=local:disk.raw
  volume=local:disk.raw


No differences found