def get_dynamic_properties(vim, mobj, type, property_names):
    'Gets the specified properties of the Managed Object.'
    obj_content = get_object_properties(vim, None, mobj, type, property_names)
    if (obj_content is None):
        return {}
    if hasattr(obj_content, 'token'):
        cancel_retrieve(vim, obj_content.token)
    property_dict = {}
    if obj_content.objects:
        if hasattr(obj_content.objects[0], 'propSet'):
            dynamic_properties = obj_content.objects[0].propSet
            if dynamic_properties:
                for prop in dynamic_properties:
                    property_dict[prop.name] = prop.val
        if hasattr(obj_content.objects[0], 'missingSet'):
            for m in obj_content.objects[0].missingSet:
                LOG.warning(_('Unable to retrieve value for %(path)s Reason: %(reason)s'), {'path': m.path, 'reason': m.fault.localizedMessage})
    return property_dict
Gets the specified properties of the Managed Object.
def get_dynamic_properties(vim, mobj, type, property_names):
    
    obj_content = get_object_properties(vim, None, mobj, type, property_names)
    if (obj_content is None):
        return {}
    if hasattr(obj_content, 'token'):
        cancel_retrieve(vim, obj_content.token)
    property_dict = {}
    if obj_content.objects:
        if hasattr(obj_content.objects[0], 'propSet'):
            dynamic_properties = obj_content.objects[0].propSet
            if dynamic_properties:
                for prop in dynamic_properties:
                    property_dict[prop.name] = prop.val
        if hasattr(obj_content.objects[0], 'missingSet'):
            for m in obj_content.objects[0].missingSet:
                LOG.warning(_('Unable to retrieve value for %(path)s Reason: %(reason)s'), {'path': m.path, 'reason': m.fault.localizedMessage})
    return property_dict