You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Start python console
2. Load pysphere module
3. Create pysphere instance and connect to ESXi server (successful)
4. create vm instance using get_vm_by_name()
5. Set guest credentials using vm.login_in_guest()
6. Attempt to push local file to guest file system using vm.send_file()
function. This produces the error below.
What is the expected output? What do you see instead?
Successful push of file from local system to guest system
What version of the product are you using? On what operating system?
Current - 0.1.8
Please provide any additional information below.
From initial trouble shooting it appears the IPv6 address somewhere in the
process to use the urllib2.py library. Looks like the ":" colons are being
used somewhere to split the address up expecting a port and is ignoring the
wrapping square brackets "[]".
initial ipv6 address = "[fd30:f8fe:a3af:4466::100]"
resulting url var looking like this....
url = "[fd30:"
Currently I am seeing this by looking in some print statements in the
vm_virtual_machine.py around line 1292. "url = url.replace("*",
urlparse(self._server._proxy.binding.url).hostname)"
Python session below
###############################################
Python 2.6.6 (r266:84292, May 27 2013, 05:35:12)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysphere import *
>>> s = VIServer()
>>> s.connect("[fd30:f8fe:a3af:4466::100]", "admin", "adminpass")
>>> vm = s.get_vm_by_name("IPV6guest")
>>> vm.login_in_guest("guestuser","guestpass")
>>> stat =
vm.send_file("/etc/puppet/manifests/site.pp","/etc/puppet/manifests/site.pp",
True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/pyve/mdms/lib/python2.6/site-packages/pysphere/vi_virtual_machine.py", line 1301, in send_file
resp = urllib2.urlopen(request)
File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib64/python2.6/urllib2.py", line 1198, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
Original issue reported on code.google.com by [email protected] on 16 Jan 2014 at 6:22
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 16 Jan 2014 at 6:22The text was updated successfully, but these errors were encountered: