def _translate_alias_to_requests(alias_spec):
 pci_aliases = _get_alias_from_config()
 pci_requests = []
 for (name, count) in [spec.split(':') for spec in alias_spec.split(',')]:
  name = name.strip()
  if (name not in pci_aliases):
   raise exception.PciRequestAliasNotDefined(alias=name)
  else:
   request = objects.InstancePCIRequest(count=int(count), spec=copy.deepcopy(pci_aliases[name]), alias_name=name)
   pci_requests.append(request)
 return pci_requests

def _translate_alias_to_requests ( alias_spec ) : pci_aliases = _get_alias_from_config ( ) pci_requests = [ ] for ( name , count ) in [ spec . split ( ':' ) for spec in alias_spec . split ( ',' ) ] : name = name . strip ( ) if ( name not in pci_aliases ) : raise exception . PciRequestAliasNotDefined ( alias = name ) else : request = objects . InstancePCIRequest ( count = int ( count ) , spec = copy . deepcopy ( pci_aliases [ name ] ) , alias_name = name ) pci_requests . append ( request ) return pci_requests
generate complete pci requests from pci aliases in extra_spec .