Beispiel #1
0
 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)
Beispiel #2
0
 def execute_command(self, host, cmd):
     with contextlib.closing(self.ssh_connection(host)) as ssh:
         return remote.execute_command(ssh, cmd)
Beispiel #3
0
 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)
Beispiel #4
0
 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)