def _execute_on_vm(self, cmd): LOG.debug("{0}: Executing remote command '{1}'".format( self.instance.hostname, cmd)) LOG.debug( 'Executing using instance: id = {0}, hostname = {1}'.format( self.instance.instance_id, self.instance.hostname)) remote.execute_command(self._ssh, cmd)
def execute_command(self, host, cmd): with contextlib.closing(self.ssh_connection(host)) as ssh: return remote.execute_command(ssh, cmd)
def _execute_on_vm(self, cmd): LOG.debug("{0}: Executing remote command '{1}'".format( self.instance.hostname, cmd)) LOG.debug('Executing using instance: id = {0}, hostname = {1}'.format( self.instance.instance_id, self.instance.hostname)) remote.execute_command(self._ssh, cmd)
def execute_command(self, host, cmd, node_username): with contextlib.closing(self.ssh_connection(host, node_username)) as ssh: return remote.execute_command(ssh, cmd)