cli: clean up imports

This is very simple stuff, but it doesn't hurt to clean it up.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
 cgroup: Fix None value check and modify the way to create a path with os.path.join()

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #695 from clebergnu/cli_cleanup

cli: clean up imports
tko.dbutils: Fix a couple of small mistakes

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
cgroup: Add/Modify some functions in utils_cgroup.py

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #689 from liyangfnst/cgroup_test

Cgroup test:None value check, os.path.join() form a path, add/modify  functions
cgroup: add 2 pid relational functions

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #703 from liyangfnst/cgroup_pid

cgroup: add 2 pid relational functions
service: Add result parser to make the @return more useful.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
service_unittest: fix some unittest to adapt to result parser.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Some fix according to comments.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
service: some minor fix.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
service_unittest: fix ignore_status unittest.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
service: fix status parser .

status parser fix:
    * sys_v:
        Returns True if XXX is running.
        Returns False if XXX is stopped.
        Returns None if XXX is unrecognized.
    * systemd:
        Returns True if XXX.service is running.
        Returns False if XXX.service is stopped.
        Returns None if XXX.service is not loaded.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
client.shared.service: logging.debug() the CmdResult of a failed command

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
client.shared.base_packages: Better missing command messages

Let's clarify messages given to the user when a fundamental
system utility for the functionality being used is missing.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
autotest: Adds missing run helper for ssh_host run_async.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
client.shared: Move all memory related functions to utils_memory.py

Move all memory related functions from client/base_utils.py to
client/shared/utils_memory.py. Also update the scripts call the
memory related functions.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
client.base_sysinfo: Record /proc/buddyinfo before and after iteration

/proc/buddyinfo can help to analyse the fragement status in host. This
will help to analyse the failed reason for some memory related test.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
client.shared.utils_memory: Add four functions related with host memory status check

read_from_vmstat: Use for reading host memory status such as nr_mlock
read_from_smaps: Use for reading process status like AnonHugePages
get_buddy_info: Get the fragement status in host. Will helpful for
                the huge page related function to decide if there
                is enough space for the test.
read_from_numa_maps: Use for reading process numa status like the pages
                     use in each node and informations like this.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>