def get_object_properties(vim, collector, mobj, type, properties):
 client_factory = vim.client.factory
 if (mobj is None):
  return None
 usecoll = collector
 if (usecoll is None):
  usecoll = vim.get_service_content().propertyCollector
 property_filter_spec = client_factory.create('ns0:PropertyFilterSpec')
 property_spec = client_factory.create('ns0:PropertySpec')
 property_spec.all = ((properties is None) or (len(properties) == 0))
 property_spec.pathSet = properties
 property_spec.type = type
 object_spec = client_factory.create('ns0:ObjectSpec')
 object_spec.obj = mobj
 object_spec.skip = False
 property_filter_spec.propSet = [property_spec]
 property_filter_spec.objectSet = [object_spec]
 return vim.RetrieveProperties(usecoll, specSet=[property_filter_spec])

def get_object_properties ( vim , collector , mobj , type , properties ) : client_factory = vim . client . factory if ( mobj is None ) : return None usecoll = collector if ( usecoll is None ) : usecoll = vim . get_service_content ( ) . propertyCollector property_filter_spec = client_factory . create ( 'ns0:PropertyFilterSpec' ) property_spec = client_factory . create ( 'ns0:PropertySpec' ) property_spec . all = ( ( properties is None ) or ( len ( properties ) == 0 ) ) property_spec . pathSet = properties property_spec . type = type object_spec = client_factory . create ( 'ns0:ObjectSpec' ) object_spec . obj = mobj object_spec . skip = False property_filter_spec . propSet = [ property_spec ] property_filter_spec . objectSet = [ object_spec ] return vim . RetrieveProperties ( usecoll , specSet = [ property_filter_spec ] )
gets the properties of the managed object specified .