def get_instance_properties(name, keys=['processes', 'state', 'name']):
    """
    Return instance properties.

    Args:
        name (str): job name
        keys (list): list of property names to get
    """
    out = []
    for path in _get_instances_path(name) or []:
        instance = _sysbus.get_object(BUS_NAME, path)
        props = instance.GetAll(UPSTARTINST_IFACE,
                                dbus_interface=dbus.PROPERTIES_IFACE)
        for key in props.keys():
            if key not in keys:
                del props[key]
        out.append(props)
    return out
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/rest-service/manager_rest/upstartdbus.py/get_instance_properties/original