def get_service_instance_from_managed_object(mo_ref, name='<unnamed>'):
 if (not name):
  name = mo_ref.name
 log.trace('[{0}] Retrieving service instance from managed object'.format(name))
 si = vim.ServiceInstance('ServiceInstance')
 si._stub = mo_ref._stub
 return si

def get_service_instance_from_managed_object ( mo_ref , name = '<unnamed>' ) : if ( not name ) : name = mo_ref . name log . trace ( '[{0}] Retrieving service instance from managed object' . format ( name ) ) si = vim . ServiceInstance ( 'ServiceInstance' ) si . _stub = mo_ref . _stub return si
retrieves the service instance from a managed object .