Пример #1
0
def get_oswl_services_names():
    cmd = "systemctl list-units| grep oswl_ | awk '{print $1}'"
    result = SSHManager().execute_on_remote(
        SSHManager().admin_ip, cmd)['stdout_str'].strip()
    logger.info('list of statistic services {0}'.format(
        result.split('\n')))
    return result.split('\n')
Пример #2
0
    def get_os_packages(ip, packages_pattern=None):
        """Pick names of some OS packages from node"""
        if not packages_pattern:
            packages_pattern = "neutron|nova|cinder|keystone|" "ceilometer|ironic|glance"

        packages = SSHManager().execute_on_remote(
            ip, "dpkg-query -W -f '${{package}}\\n' | grep -E '{}'".format(packages_pattern)
        )["stdout_str"]
        return packages.split("\n")
Пример #3
0
    def get_os_packages(ip, packages_pattern=None):
        """Pick names of some OS packages from node"""
        if not packages_pattern:
            packages_pattern = "neutron|nova|cinder|keystone|" \
                               "ceilometer|ironic|glance"

        packages = SSHManager().execute_on_remote(
            ip, "dpkg-query -W -f '${{package}}\\n' | grep -E '{}'".format(
                packages_pattern))['stdout_str']
        return packages.split('\n')
Пример #4
0
def get_oswl_services_names():
    cmd = "systemctl list-units| grep oswl_ | awk '{print $1}'"
    result = SSHManager().execute_on_remote(SSHManager().admin_ip,
                                            cmd)['stdout_str'].strip()
    logger.info('list of statistic services {0}'.format(result.split('\n')))
    return result.split('\n')