Ejemplo n.º 1
0
def install_and_stream(app_name: str, confinement: str, root_password: str) -> subprocess.Popen:

    install_cmd = [BASE_CMD, 'install', app_name]  # default

    if confinement == 'classic':
        install_cmd.append('--classic')

    return system.cmd_as_root(install_cmd, root_password)
Ejemplo n.º 2
0
def downgrade_and_stream(app_ref: str, commit: str,
                         root_password: str) -> subprocess.Popen:
    return system.cmd_as_root(
        [BASE_CMD, 'update', '--commit={}'.format(commit), app_ref, '-y'],
        root_password)
Ejemplo n.º 3
0
def refresh_and_stream(app_name: str, root_password: str) -> subprocess.Popen:
    return system.cmd_as_root([BASE_CMD, 'refresh', app_name], root_password)
Ejemplo n.º 4
0
def downgrade_and_stream(app_name: str, root_password: str) -> subprocess.Popen:
    return system.cmd_as_root([BASE_CMD, 'revert', app_name], root_password)
Ejemplo n.º 5
0
def uninstall_and_stream(app_name: str, root_password: str):
    return system.cmd_as_root([BASE_CMD, 'remove', app_name], root_password)