Skip to content

Instantly share code, notes, and snippets.

@denismakogon
Last active December 25, 2015 12:19
Show Gist options
  • Save denismakogon/6975141 to your computer and use it in GitHub Desktop.
Save denismakogon/6975141 to your computer and use it in GitHub Desktop.
Remote executions
Remote execution via ssh using subprocess:
ip_addr = novaclient.servers.get_fixed_ip(server_id).ip
abc = "any command you want, because you access VM as root via SSH"
ret = subprocess.call(["ssh", "root@%(ip_addr)s" % {'ip_addr': ip_addr}, abc])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment