Exemple #1
0
def info(executable_path, path_noun):
    """Collects subcommand information

    :param executable_path: real path to the dcos subcommand
    :type executable_path: str
    :param path_noun: subcommand
    :type path_noun: str
    :returns: the subcommand information
    :rtype: str
    """

    out = Subproc().check_output([executable_path, path_noun, '--info'])

    return out.decode('utf-8').strip()
Exemple #2
0
def info(executable_path, path_noun):
    """Collects subcommand information

    :param executable_path: real path to the dcos subcommand
    :type executable_path: str
    :param path_noun: subcommand
    :type path_noun: str
    :returns: the subcommand information
    :rtype: str
    """

    out = Subproc().check_output(
        [executable_path, path_noun, '--info'])

    return out.decode('utf-8').strip()
Exemple #3
0
def config_schema(executable_path, noun=None):
    """Collects subcommand config schema

    :param executable_path: real path to the dcos subcommand
    :type executable_path: str
    :param noun: name of subcommand
    :type noun: str
    :returns: the subcommand config schema
    :rtype: dict
    """
    if noun is None:
        noun = noun(executable_path)

    out = Subproc().check_output([executable_path, noun, '--config-schema'])

    return json.loads(out.decode('utf-8'))
Exemple #4
0
def config_schema(executable_path, noun=None):
    """Collects subcommand config schema

    :param executable_path: real path to the dcos subcommand
    :type executable_path: str
    :param noun: name of subcommand
    :type noun: str
    :returns: the subcommand config schema
    :rtype: dict
    """
    if noun is None:
        noun = noun(executable_path)

    out = Subproc().check_output(
        [executable_path, noun, '--config-schema'])

    return json.loads(out.decode('utf-8'))