>>>dns_node = [i for i in conn.list_nodes() if i.uuid == 'xxxxxxxxxxxxxxxxxxxxxxx07xxxxxxxxxx']
>>>try_script = 'path/to/somefile.py'
>>>dns_file = FileDeployment(try_script, target='/home/ec2-user')
>>>ssh_client = SSHClient(dns_node[0].public_ip[0], username='ec2-user', key=os.path.expanduser("~/.ssh/id_rsa"))
>>>dns_file.run(dns_node, ssh_client)
I've verified that each of these variables assigned show me what I understand to be of the appropriate type. When I try this, I get the following:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ec2-user/Envs/libcloud/lib/python2.7/site-packages/libcloud/compute/deployment.py", line 111, in run
contents=content)
File "/Users/ec2-user/Envs/libcloud/lib/python2.7/site-packages/libcloud/compute/ssh.py", line 174, in put
sftp = self.client.open_sftp()
File "/Users/ec2-user/Envs/libcloud/lib/python2.7/site-packages/paramiko/client.py", line 414, in open_sftp
return self._transport.open_sftp_client()
AttributeError: 'NoneType' object has no attribute 'open_sftp_client'
This is what I have for the above objects:
dns_node:
`[<Node: uuid=xxxxxxxxxxxxxxxxxxxxxxx, name=ec2_node1, state=0, public_ips=['xx.xxx.xxx.xx'], provider=Amazon EC2 ...>]`
dns_file:
<libcloud.compute.deployment.FileDeployment object at 0x10d58de50>
ssh_client:
`<libcloud.compute.ssh.ParamikoSSHClient object at 0x10d55e950>`
ssh_client.connect:
<bound method ParamikoSSHClient.connect of <libcloud.compute.ssh.ParamikoSSHClient object at 0x10d55e950>>
What am I missing?