From 0b9b7aee263dcc0a8c4fdbb32acda3617df190f34137f9bd7cd0fa272cb41f91 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 12 Jan 2017 20:18:28 +0000 Subject: [PATCH] Accepting request 449926 from home:mnhauke - Update to version 6.5 * Spec bump to support vSphere 6.5. * Include EAM bindings to support vSphere EAM service. * Fixed server thumbprint verification. * Fixed sslcontext creation in sample code. OBS-URL: https://build.opensuse.org/request/show/449926 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyvmomi?expand=0&rev=4 --- python-pyvmomi.changes | 9 ++ python-pyvmomi.spec | 4 +- pyvmomi-6.0.0.2016.6.tar.gz | 3 - pyvmomi-6.5.tar.gz | 3 + pyvmomi-git20141104-new.diff | 254 ----------------------------------- 5 files changed, 14 insertions(+), 259 deletions(-) delete mode 100644 pyvmomi-6.0.0.2016.6.tar.gz create mode 100644 pyvmomi-6.5.tar.gz delete mode 100644 pyvmomi-git20141104-new.diff diff --git a/python-pyvmomi.changes b/python-pyvmomi.changes index 5600e88..8f1f330 100644 --- a/python-pyvmomi.changes +++ b/python-pyvmomi.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jan 12 19:30:55 UTC 2017 - mardnh@gmx.de + +- Update to version 6.5 + * Spec bump to support vSphere 6.5. + * Include EAM bindings to support vSphere EAM service. + * Fixed server thumbprint verification. + * Fixed sslcontext creation in sample code. + ------------------------------------------------------------------- Sun Sep 18 12:40:36 UTC 2016 - mardnh@gmx.de diff --git a/python-pyvmomi.spec b/python-pyvmomi.spec index 2ce86e3..5e2909c 100644 --- a/python-pyvmomi.spec +++ b/python-pyvmomi.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyvmomi # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: python-pyvmomi -Version: 6.0.0.2016.6 +Version: 6.5 Release: 0 Summary: VMware vSphere Python SDK License: Apache-2.0 diff --git a/pyvmomi-6.0.0.2016.6.tar.gz b/pyvmomi-6.0.0.2016.6.tar.gz deleted file mode 100644 index 3417bcf..0000000 --- a/pyvmomi-6.0.0.2016.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0674174e2799ca4b29daacfb839c68ddd3cc6d92edeb28bf396ce0cb4d23a51 -size 218882 diff --git a/pyvmomi-6.5.tar.gz b/pyvmomi-6.5.tar.gz new file mode 100644 index 0000000..d48c45c --- /dev/null +++ b/pyvmomi-6.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa6a31c747a7d7042a2ad90e7895cab824ba036dcf26ff2f84374e150eac6dfa +size 250996 diff --git a/pyvmomi-git20141104-new.diff b/pyvmomi-git20141104-new.diff deleted file mode 100644 index 1075b8e..0000000 --- a/pyvmomi-git20141104-new.diff +++ /dev/null @@ -1,254 +0,0 @@ -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/pyVmomi/DynamicTypeManagerHelper.py pyvmomi/pyVmomi/DynamicTypeManagerHelper.py ---- pyvmomi-5.5.0.2014.1.1/pyVmomi/DynamicTypeManagerHelper.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/pyVmomi/DynamicTypeManagerHelper.py 2014-11-04 18:50:31.720052092 +0100 -@@ -1,5 +1,3 @@ --#!/usr/bin/env python -- - # VMware vSphere Python SDK - # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. - # -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/pyVmomi/Iso8601.py pyvmomi/pyVmomi/Iso8601.py ---- pyvmomi-5.5.0.2014.1.1/pyVmomi/Iso8601.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/pyVmomi/Iso8601.py 2014-11-04 18:50:31.720052092 +0100 -@@ -1,5 +1,3 @@ --#!/usr/bin/env python -- - # VMware vSphere Python SDK - # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. - # -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/pyVmomi/ManagedMethodExecutorHelper.py pyvmomi/pyVmomi/ManagedMethodExecutorHelper.py ---- pyvmomi-5.5.0.2014.1.1/pyVmomi/ManagedMethodExecutorHelper.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/pyVmomi/ManagedMethodExecutorHelper.py 2014-11-04 18:50:31.724052132 +0100 -@@ -1,5 +1,3 @@ --#!/usr/bin/env python -- - # VMware vSphere Python SDK - # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. - # -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/pyVmomi/SoapAdapter.py pyvmomi/pyVmomi/SoapAdapter.py ---- pyvmomi-5.5.0.2014.1.1/pyVmomi/SoapAdapter.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/pyVmomi/SoapAdapter.py 2014-11-04 18:50:31.756052461 +0100 -@@ -453,20 +453,20 @@ def ReadDocument(parser, data): - # a refactoring that rolls up some repeated code blocks into a method so - # that we can refactor XML parsing behavior in a single place. - if not isinstance(data, str): -- data = data.read() -+ data = data.read() - try: - parser.Parse(data) - except Exception: -- # wrap all parser faults with additional information for later -- # bug reporting on the XML parser code itself. -- (ec, ev, tb) = sys.exc_info() -- line = parser.CurrentLineNumber -- col = parser.CurrentColumnNumber -- pe = ParserError("xml document: " -- "{0} parse error at: " -- "line:{1}, col:{2}".format(data, line, col)) -- # use six.reraise for python 2.x and 3.x compatability -- reraise(ParserError, pe, tb) -+ # wrap all parser faults with additional information for later -+ # bug reporting on the XML parser code itself. -+ (ec, ev, tb) = sys.exc_info() -+ line = parser.CurrentLineNumber -+ col = parser.CurrentColumnNumber -+ pe = ParserError("xml document: " -+ "{0} parse error at: " -+ "line:{1}, col:{2}".format(data, line, col)) -+ # use six.reraise for python 2.x and 3.x compatability -+ reraise(ParserError, pe, tb) - - ## Deserialize an object from a file or string - # -@@ -1035,11 +1035,10 @@ class SSLTunnelConnection(object): - tunnel = http_client.HTTPConnection(path, **kwargs) - tunnel.request('CONNECT', self.proxyPath) - resp = tunnel.getresponse() -- tunnelSocket = resp.fp - if resp.status != 200: -- raise httplib.HTTPException("{0} {1}".format(resp.status, resp.reason)) -+ raise http_client.HTTPException("{0} {1}".format(resp.status, resp.reason)) - retval = http_client.HTTPSConnection(path) -- retval.sock = _SocketWrapper(tunnelSocket, -+ retval.sock = _SocketWrapper(tunnel.sock, - keyfile=key_file, certfile=cert_file) - return retval - -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/README.rst pyvmomi/README.rst ---- pyvmomi-5.5.0.2014.1.1/README.rst 2014-09-22 17:39:34.000000000 +0200 -+++ pyvmomi/README.rst 2014-11-04 18:50:25.899992512 +0100 -@@ -24,7 +24,7 @@ Installing - The master is code that is in development, official releases are tagged and - posted to `pypi `_ - --* The official release is availabe using pip, just run -+* The official release is available using pip, just run - ``pip install --upgrade pyvmomi``. - * To install the version in `github `_ use - ``python setup.py develop`` for development install or -@@ -32,7 +32,7 @@ posted to `pypi `_ command. You may have to - configure multiple python interpreters so that you can test in all the - environments listed in ``tox.ini`` or you will have to run ``tox`` with the - ``-e`` flag to run only in your version of python. For example, if you only -@@ -52,17 +52,17 @@ For general language neutral documentati - - Python Support - ============== --* pyVmomi 5.5.0.2014.1 and later support Python 2.6, 2.7, 3.3 and 3.4 -+* pyVmomi 5.5.0-2014.1 and later support Python 2.6, 2.7, 3.3 and 3.4 - * pyVmomi 5.5.0 and below support Python 2.6 and 2.7 - - Compatibility Policy - ==================== --pyVmomi versions are marked vSphere_version.release . Pyvmomi maintains minimum -+pyVmomi versions are marked vSphere_version-release . Pyvmomi maintains minimum - backward compatibility with the previous _four_ releases of *vSphere* and it's - own previous four releases. Compatibility with much older versions may continue - 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 v5.5.0-2014.1 is most compatible with vSphere 5.5, 5.1, - 5.0, and 4.1 and was the first release in 2014. Initial releases compatible with - a version of vSphere will bare a naked version number of v5.5.0 indicating that - version of pyVmomi was released simultaneously with the *GA* version of vSphere -@@ -70,10 +70,10 @@ with the same version number. - - Releases - ======== --* `5.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 `_ -- release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0.2014.1 -+* `5.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 `_ -+ release notes https://github.com/vmware/pyvmomi/releases/tag/v5.5.0-2014.1 - * `5.5.0 `_ - * `5.1.0 `_ - release notes https://github.com/vmware/pyvmomi/releases/tag/v5.1.0 -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/sample/getallvms.py pyvmomi/sample/getallvms.py ---- pyvmomi-5.5.0.2014.1.1/sample/getallvms.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/sample/getallvms.py 2014-11-04 18:50:31.772052624 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - # VMware vSphere Python SDK - # Copyright (c) 2008-2013 VMware, Inc. All Rights Reserved. - # -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/sample/poweronvm.py pyvmomi/sample/poweronvm.py ---- pyvmomi-5.5.0.2014.1.1/sample/poweronvm.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/sample/poweronvm.py 2014-11-04 18:50:31.776052665 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python - # - # VMware vSphere Python SDK - # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/tests/fixtures/ssl_tunnel_http_failure.yaml pyvmomi/tests/fixtures/ssl_tunnel_http_failure.yaml ---- pyvmomi-5.5.0.2014.1.1/tests/fixtures/ssl_tunnel_http_failure.yaml 1970-01-01 01:00:00.000000000 +0100 -+++ pyvmomi/tests/fixtures/ssl_tunnel_http_failure.yaml 2014-11-04 18:50:31.804052951 +0100 -@@ -0,0 +1,15 @@ -+interactions: -+- request: -+ body: null -+ headers: {} -+ method: CONNECT -+ uri: http://vcsavcsa:80 -+ response: -+ body: {string: !!python/unicode '

404 Not Found

'} -+ headers: -+ connection: [close] -+ content-length: ['48'] -+ content-type: [text/html] -+ date: ['Thu, 11 Sep 2014 07:57:56 GMT'] -+ status: {code: 404, message: Not Found} -+version: 1 -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/tests/fixtures/ssl_tunnel.yaml pyvmomi/tests/fixtures/ssl_tunnel.yaml ---- pyvmomi-5.5.0.2014.1.1/tests/fixtures/ssl_tunnel.yaml 1970-01-01 01:00:00.000000000 +0100 -+++ pyvmomi/tests/fixtures/ssl_tunnel.yaml 2014-11-04 18:50:31.800052911 +0100 -@@ -0,0 +1,14 @@ -+interactions: -+- request: -+ body: null -+ headers: {} -+ method: CONNECT -+ uri: http://vcsasdkTunnel:8089 -+ response: -+ body: {string: !!python/unicode ''} -+ headers: -+ content-length: ['0'] -+ content-type: [text/html] -+ date: ['Thu, 11 Sep 2014 08:23:36 GMT'] -+ status: {code: 200, message: OK} -+version: 1 -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/tests/__init__.py pyvmomi/tests/__init__.py ---- pyvmomi-5.5.0.2014.1.1/tests/__init__.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/tests/__init__.py 2014-11-04 18:50:31.784052747 +0100 -@@ -16,6 +16,7 @@ import logging - import os - import unittest - import vcr -+import socket - - - def tests_resource_path(local_path=''): -@@ -29,7 +30,7 @@ fixtures_path = tests_resource_path('fix - def monkey_patch_vcrpy(): - # TODO (hartsock): This should be unnecessary. Remove after vcrpy updates. - vcr.stubs.VCRHTTPSConnection.is_verified = True -- -+ vcr.stubs.VCRFakeSocket = socket.socket - - class VCRTestBase(unittest.TestCase): - -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/tests/test_connect.py pyvmomi/tests/test_connect.py ---- pyvmomi-5.5.0.2014.1.1/tests/test_connect.py 2014-09-22 17:37:16.000000000 +0200 -+++ pyvmomi/tests/test_connect.py 2014-11-04 18:50:31.816053075 +0100 -@@ -68,5 +68,20 @@ class ConnectionTests(tests.VCRTestBase) - def test_disconnect_on_no_connection(self): - connect.Disconnect(None) - -+ @vcr.use_cassette('ssl_tunnel.yaml', -+ cassette_library_dir=tests.fixtures_path, -+ record_mode='none') -+ def test_ssl_tunnel(self): -+ connect.SoapStubAdapter('sdkTunnel', 8089, httpProxyHost='vcsa').GetConnection() -+ -+ @vcr.use_cassette('ssl_tunnel_http_failure.yaml', -+ cassette_library_dir=tests.fixtures_path, -+ record_mode='none') -+ def test_ssl_tunnel_http_failure(self): -+ from six.moves import http_client -+ def should_fail(): -+ connect.SoapStubAdapter('vcsa', 80, httpProxyHost='vcsa').GetConnection() -+ self.assertRaises(http_client.HTTPException, should_fail) -+ - if __name__ == '__main__': - unittest.main() -\ No newline at end of file -diff -up -rNx '.git*' pyvmomi-5.5.0.2014.1.1/.travis.yml pyvmomi/.travis.yml ---- pyvmomi-5.5.0.2014.1.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 -+++ pyvmomi/.travis.yml 2014-11-04 18:50:25.891992430 +0100 -@@ -0,0 +1,17 @@ -+language: python -+python: -+ - "2.6" -+ - "2.7" -+ - "pypy" -+ - "3.3" -+ - "3.4" -+ -+before_install: -+ - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi -+ - pip install -r requirements.txt -+ - pip install -r test-requirements.txt -+ -+install: -+ - python setup.py install -+ -+script: python setup.py test