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)
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)
def refresh_and_stream(app_name: str, root_password: str) -> subprocess.Popen: return system.cmd_as_root([BASE_CMD, 'refresh', app_name], root_password)
def downgrade_and_stream(app_name: str, root_password: str) -> subprocess.Popen: return system.cmd_as_root([BASE_CMD, 'revert', app_name], root_password)
def uninstall_and_stream(app_name: str, root_password: str): return system.cmd_as_root([BASE_CMD, 'remove', app_name], root_password)