rpcd-mod-lxc: add "info" ubus method (similar to the lxc-info)
authorRafał Miłecki <rafal@milecki.pl>
Tue, 7 Nov 2017 11:02:53 +0000 (12:02 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 7 Nov 2017 22:34:59 +0000 (23:34 +0100)
commitf2a725ba2d5d11d14a149c6d5d6e98c539161245
tree610eb6a5f75d20da06e7358165e40e8f4fd45ca7
parent91dc4e824d24039a98758c3d66ac69ae53e49371
rpcd-mod-lxc: add "info" ubus method (similar to the lxc-info)

This method allows getting basic info about a queried container. It's
based on the lxc-info command-line tool.

Example output:
> ubus call lxc info '{ "name": "foo" }'
{
        "name": "foo",
        "state": "RUNNING",
        "pid": 2946,
        "ips": [
                "192.168.0.124"
        ]
}

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Approved-by: Luka Perkov <luka@openwrt.org>
utils/rpcd-mod-lxc/files/lxc.c