The nova.virt.powervm.common Module

class Connection(host, username, password, port=22)

Bases: object

ftp_put_command(connection, local_path, remote_dir)

Method to transfer a file via ftp.

Parameters:
  • connection – a Connection object.
  • local_path – path to the local file
  • remote_dir – path to remote destination
Raises :

PowerVMFileTransferFailed

ssh_command_as_root(ssh_connection, cmd, check_exit_code=True)

Method to execute remote command as root.

Parameters:
  • connection – an active paramiko.SSHClient connection.
  • command – string containing the command to run.
Returns:

Tuple – a tuple of (stdout, stderr)

Raises :

nova.exception.ProcessExecutionError

ssh_connect(connection)

Method to connect to remote system using ssh protocol.

Parameters:connection – a Connection object.
Returns:paramiko.SSHClient – an active ssh connection.
Raises :PowerVMConnectionFailed

Previous topic

The nova.virt.powervm.command Module

Next topic

The nova.virt.powervm.constants Module

This Page