commit
51a54c0ca3
16
README.rst
16
README.rst
@ -48,11 +48,12 @@ Documentation
|
|||||||
=============
|
=============
|
||||||
For general language neutral documentation of vSphere Management API see:
|
For general language neutral documentation of vSphere Management API see:
|
||||||
|
|
||||||
* `vSphere WS SDK API Docs <http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/right-pane.html>`_
|
* `vSphere WS SDK API Docs <http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/right-pane.html>`_
|
||||||
|
|
||||||
Python Support
|
Python Support
|
||||||
==============
|
==============
|
||||||
* pyVmomi 5.5.0-2014.1 and later support Python 2.6, 2.7, 3.3 and 3.4
|
* pyVmomi 6.0.0 and later support 2.7, 3.3 and 3.4
|
||||||
|
* pyVmomi 5.5.0-2014.1 and 5.5.0-2014.1.1 support Python 2.6, 2.7, 3.3 and 3.4
|
||||||
* pyVmomi 5.5.0 and below support Python 2.6 and 2.7
|
* pyVmomi 5.5.0 and below support Python 2.6 and 2.7
|
||||||
|
|
||||||
Compatibility Policy
|
Compatibility Policy
|
||||||
@ -62,14 +63,15 @@ backward compatibility with the previous _four_ releases of *vSphere* and it's
|
|||||||
own previous four releases. Compatibility with much older versions may continue
|
own previous four releases. Compatibility with much older versions may continue
|
||||||
to work but will not be actively supported.
|
to work but will not be actively supported.
|
||||||
|
|
||||||
For example, version v5.5.0-2014.1 is most compatible with vSphere 5.5, 5.1,
|
For example, version v6.0.0 is most compatible with vSphere 6.0, 5.5, 5.1 and
|
||||||
5.0, and 4.1 and was the first release in 2014. Initial releases compatible with
|
5.0. Initial releases compatible with a version of vSphere will bare a naked
|
||||||
a version of vSphere will bare a naked version number of v5.5.0 indicating that
|
version number of v6.0.0 indicating that version of pyVmomi was released
|
||||||
version of pyVmomi was released simultaneously with the *GA* version of vSphere
|
simultaneously with the *GA* version of vSphere with the same version number.
|
||||||
with the same version number.
|
|
||||||
|
|
||||||
Releases
|
Releases
|
||||||
========
|
========
|
||||||
|
* `6.0.0 <https://github.com/vmware/pyvmomi/tree/v6.0.0>`_
|
||||||
|
release notes https://github.com/vmware/pyvmomi/releases/tag/v6.0.0
|
||||||
* `5.5.0-2014.1.1 <https://github.com/vmware/pyvmomi/tree/v5.5.0-2014.1.1>`_
|
* `5.5.0-2014.1.1 <https://github.com/vmware/pyvmomi/tree/v5.5.0-2014.1.1>`_
|
||||||
release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0-2014.1.1
|
release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0-2014.1.1
|
||||||
* `5.5.0-2014.1 <https://github.com/vmware/pyvmomi/tree/v5.5.0-2014.1>`_
|
* `5.5.0-2014.1 <https://github.com/vmware/pyvmomi/tree/v5.5.0-2014.1>`_
|
||||||
|
@ -20,18 +20,12 @@ Python program for listing the vms on an ESX / vCenter host
|
|||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import pyVmomi
|
|
||||||
|
|
||||||
from pyVmomi import vim
|
|
||||||
from pyVmomi import vmodl
|
|
||||||
|
|
||||||
from pyVim.connect import SmartConnect, Disconnect
|
from pyVim.connect import SmartConnect, Disconnect
|
||||||
from pyVmomi import vmodl
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import atexit
|
import atexit
|
||||||
import getpass
|
import getpass
|
||||||
|
import ssl
|
||||||
|
|
||||||
def GetArgs():
|
def GetArgs():
|
||||||
"""
|
"""
|
||||||
@ -96,10 +90,14 @@ def main():
|
|||||||
password = getpass.getpass(prompt='Enter password for host %s and '
|
password = getpass.getpass(prompt='Enter password for host %s and '
|
||||||
'user %s: ' % (args.host,args.user))
|
'user %s: ' % (args.host,args.user))
|
||||||
|
|
||||||
|
|
||||||
|
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||||
|
context.verify_mode = ssl.CERT_NONE
|
||||||
si = SmartConnect(host=args.host,
|
si = SmartConnect(host=args.host,
|
||||||
user=args.user,
|
user=args.user,
|
||||||
pwd=password,
|
pwd=password,
|
||||||
port=int(args.port))
|
port=int(args.port),
|
||||||
|
sslContext=context)
|
||||||
if not si:
|
if not si:
|
||||||
print("Could not connect to the specified host using specified "
|
print("Could not connect to the specified host using specified "
|
||||||
"username and password")
|
"username and password")
|
||||||
|
@ -28,6 +28,7 @@ import argparse
|
|||||||
import atexit
|
import atexit
|
||||||
import getpass
|
import getpass
|
||||||
import sys
|
import sys
|
||||||
|
import ssl
|
||||||
|
|
||||||
def GetArgs():
|
def GetArgs():
|
||||||
"""
|
"""
|
||||||
@ -113,11 +114,14 @@ def main():
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
si = None
|
si = None
|
||||||
|
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||||
|
context.verify_mode = ssl.CERT_NONE
|
||||||
try:
|
try:
|
||||||
si = SmartConnect(host=args.host,
|
si = SmartConnect(host=args.host,
|
||||||
user=args.user,
|
user=args.user,
|
||||||
pwd=password,
|
pwd=password,
|
||||||
port=int(args.port))
|
port=int(args.port),
|
||||||
|
sslContext=context)
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
if not si:
|
if not si:
|
||||||
|
Loading…
Reference in New Issue
Block a user