def build_property_spec(client_factory, type='VirtualMachine', properties_to_collect=None, all_properties=False):
 if (not properties_to_collect):
  properties_to_collect = ['name']
 property_spec = client_factory.create('ns0:PropertySpec')
 property_spec.all = all_properties
 property_spec.pathSet = properties_to_collect
 property_spec.type = type
 return property_spec

def build_property_spec ( client_factory , type = 'VirtualMachine' , properties_to_collect = None , all_properties = False ) : if ( not properties_to_collect ) : properties_to_collect = [ 'name' ] property_spec = client_factory . create ( 'ns0:PropertySpec' ) property_spec . all = all_properties property_spec . pathSet = properties_to_collect property_spec . type = type return property_spec
builds the property spec .