dlab_deployment.infrastructure.command_executor

Module Contents

class BaseCommandExecutor[source]

Bases: object

run(self, command)[source]

Run cli command :type command: str :param command: cli command

sudo(self, command)[source]

Run cli sudo command :type command: str :param command: cli command

cd(self, path)[source]

Change work directory to path :type path: str :param path: directory location

put(self, local_path, remote_path)[source]

Copy file :type local_path: str :param local_path: path to local object :type remote_path: str :param remote_path: path to remote object

class LocalCommandExecutor[source]

Bases: dlab_deployment.infrastructure.command_executor.BaseCommandExecutor

run(self, command)[source]

Run cli command :type command: str :param command: cli command :rtype: str :return execution result

sudo(self, command)[source]

Run cli sudo command :type command: str :param command: cli command :rtype: str :return execution result

cd(self, path)[source]

Change work directory to path :type path: str :param path: directory location

put(self, local_path, remote_path)[source]

Copy file :type local_path: str :param local_path: path to local object :type remote_path: str :param remote_path: path to remote object

class ParamikoCommandExecutor(host, name, identity_file)[source]

Bases: dlab_deployment.infrastructure.command_executor.BaseCommandExecutor

connection[source]

Return paramiko connection

current_dir[source]

Default directory

init_connection(self)[source]

Init connection

run(self, command)[source]

Run cli command :type command: str :param command: cli command :rtype: str :return execution result

sudo(self, command)[source]

Run sudo cli command :type command: str :param command: cli command :rtype: str :return execution result

cd(self, path)[source]
put(self, local_path, remote_path)[source]

Copy file :type local_path: str :param local_path: path to local object :type remote_path: str :param remote_path: path to remote object