def parse_propspec(propspec):
 props = []
 for objspec in propspec:
  if (':' not in objspec):
   raise Exception(("property specification '%s' does not contain property list" % objspec))
  (objtype, objprops) = objspec.split(':', 1)
  motype = getattr(vim, objtype, None)
  if (motype is None):
   raise Exception(("referenced type '%s' in property specification does not exist,\nconsult the managed object type reference in the vSphere API documentation" % objtype))
  proplist = objprops.split(',')
  props.append((motype, proplist))
 return props

def parse_propspec ( propspec ) : props = [ ] for objspec in propspec : if ( ':' not in objspec ) : raise Exception ( ( "property specification '%s' does not contain property list" % objspec ) ) ( objtype , objprops ) = objspec . split ( ':' , 1 ) motype = getattr ( vim , objtype , None ) if ( motype is None ) : raise Exception ( ( "referenced type '%s' in property specification does not exist,\nconsult the managed object type reference in the vSphere API documentation" % objtype ) ) proplist = objprops . split ( ',' ) props . append ( ( motype , proplist ) ) return props
parses property specifications .