Hello community,
here is the log from the commit of package python-oslo.vmware for openSUSE:Factory checked in at 2015-10-30 13:42:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.vmware (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.vmware.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.vmware"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.vmware/python-oslo.vmware.changes 2015-08-27 08:54:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.vmware.new/python-oslo.vmware.changes 2015-10-30 13:42:13.000000000 +0100
@@ -1,0 +2,12 @@
+Wed Sep 9 07:15:02 UTC 2015 - tbechtold@suse.com
+
+- update to 1.21.0:
+ * Updated from global requirements
+ * Use SSL thumbprints for NFC transfer
+ * Update bandit.yaml to the latest
+ * flake8 - remove unused rules
+ * Imported Translations from Transifex
+ * Allow http connection pool size to be configured
+- Adjust Requires according to requirements.txt
+
+-------------------------------------------------------------------
Old:
----
oslo.vmware-1.18.0.tar.gz
New:
----
oslo.vmware-1.21.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.vmware.spec ++++++
--- /var/tmp/diff_new_pack.49lZY8/_old 2015-10-30 13:42:13.000000000 +0100
+++ /var/tmp/diff_new_pack.49lZY8/_new 2015-10-30 13:42:13.000000000 +0100
@@ -17,7 +17,7 @@
Name: python-oslo.vmware
-Version: 1.18.0
+Version: 1.21.0
Release: 0
Url: https://launchpad.net/oslo/
Summary: OpenStack configuration API
@@ -50,7 +50,7 @@
Requires: python-netaddr >= 0.7.12
Requires: python-oslo.concurrency >= 2.3.0
Requires: python-oslo.i18n >= 1.5.0
-Requires: python-oslo.utils >= 1.9.0
+Requires: python-oslo.utils >= 2.0.0
Requires: python-requests >= 2.5.2
Requires: python-six >= 1.9.0
Requires: python-stevedore >= 1.5.0
++++++ oslo.vmware-1.18.0.tar.gz -> oslo.vmware-1.21.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/AUTHORS new/oslo.vmware-1.21.0/AUTHORS
--- old/oslo.vmware-1.18.0/AUTHORS 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/AUTHORS 2015-09-01 20:38:51.000000000 +0200
@@ -24,3 +24,4 @@
Victor Stinner
Vipin Balachandran
Vui Lam
+ZHU ZHU
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/ChangeLog new/oslo.vmware-1.21.0/ChangeLog
--- old/oslo.vmware-1.18.0/ChangeLog 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/ChangeLog 2015-09-01 20:38:51.000000000 +0200
@@ -1,6 +1,30 @@
CHANGES
=======
+1.21.0
+------
+
+* Updated from global requirements
+* Use SSL thumbprints for NFC transfer
+* Updated from global requirements
+* Update bandit.yaml to the latest
+
+1.20.0
+------
+
+* Updated from global requirements
+* Updated from global requirements
+* Updated from global requirements
+* flake8 - remove unused rules
+* Imported Translations from Transifex
+* Allow http connection pool size to be configured
+
+1.19.0
+------
+
+* Imported Translations from Transifex
+* Imported Translations from Transifex
+
1.18.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/PKG-INFO new/oslo.vmware-1.21.0/PKG-INFO
--- old/oslo.vmware-1.18.0/PKG-INFO 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/PKG-INFO 2015-09-01 20:38:51.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.vmware
-Version: 1.18.0
+Version: 1.21.0
Summary: Oslo VMware library
Home-page: http://launchpad.net/oslo
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/bandit.yaml new/oslo.vmware-1.21.0/bandit.yaml
--- old/oslo.vmware-1.18.0/bandit.yaml 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/bandit.yaml 2015-09-01 20:38:14.000000000 +0200
@@ -11,9 +11,9 @@
#output_colors:
# DEFAULT: '\033[0m'
# HEADER: '\033[95m'
-# INFO: '\033[94m'
-# WARN: '\033[93m'
-# ERROR: '\033[91m'
+# LOW: '\033[94m'
+# MEDIUM: '\033[93m'
+# HIGH: '\033[91m'
# optional: log format string
#log_format: "[%(module)s]\t%(levelname)s\t%(message)s"
@@ -21,6 +21,7 @@
# globs of files which should be analyzed
include:
- '*.py'
+ - '*.pyw'
# a list of strings, which if found in the path will cause files to be excluded
# for example /tests/ - to remove all all files in tests directory
@@ -28,6 +29,36 @@
- '/tests/'
profiles:
+ All:
+ include:
+ - any_other_function_with_shell_equals_true
+ - assert_used
+ - blacklist_calls
+ - blacklist_import_func
+ - blacklist_imports
+ - exec_used
+ - execute_with_run_as_root_equals_true
+ - hardcoded_bind_all_interfaces
+ - hardcoded_password
+ - hardcoded_sql_expressions
+ - hardcoded_tmp_directory
+ - jinja2_autoescape_false
+ - linux_commands_wildcard_injection
+ - paramiko_calls
+ - password_config_option_not_marked_secret
+ - request_with_no_cert_validation
+ - set_bad_file_permissions
+ - subprocess_popen_with_shell_equals_true
+ - subprocess_without_shell_equals_true
+ - start_process_with_a_shell
+ - start_process_with_no_shell
+ - start_process_with_partial_path
+ - ssl_with_bad_defaults
+ - ssl_with_bad_version
+ - ssl_with_no_version
+ - try_except_pass
+ - use_of_mako_templates
+
XSS:
include:
- jinja2_autoescape_false
@@ -40,6 +71,7 @@
- any_other_function_with_shell_equals_true
- start_process_with_a_shell
- start_process_with_no_shell
+ - start_process_with_partial_path
exclude:
SqlInjection:
@@ -56,8 +88,8 @@
qualnames: [marshal.load, marshal.loads]
message: "Deserialization with the marshal module is possibly dangerous."
- md5:
- qualnames: [hashlib.md5]
- message: "Use of insecure MD5 hash function."
+ qualnames: [hashlib.md5, Crypto.Hash.MD2.new, Crypto.Hash.MD4.new, Crypto.Hash.MD5.new, cryptography.hazmat.primitives.hashes.MD5]
+ message: "Use of insecure MD2, MD4, or MD5 hash function."
- mktemp_q:
qualnames: [tempfile.mktemp]
message: "Use of insecure and deprecated function (mktemp)."
@@ -76,6 +108,55 @@
- urllib_urlopen:
qualnames: [urllib.urlopen, urllib.urlretrieve, urllib.URLopener, urllib.FancyURLopener, urllib2.urlopen, urllib2.Request]
message: "Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected."
+ - random:
+ qualnames: [random.random, random.randrange, random.randint, random.choice, random.uniform, random.triangular]
+ message: "Standard pseudo-random generators are not suitable for security/cryptographic purposes."
+ level: "LOW"
+
+ # Most of this is based off of Christian Heimes' work on defusedxml:
+ # https://pypi.python.org/pypi/defusedxml/#defusedxml-sax
+
+ - xml_bad_cElementTree:
+ qualnames: [xml.etree.cElementTree.parse,
+ xml.etree.cElementTree.iterparse,
+ xml.etree.cElementTree.fromstring,
+ xml.etree.cElementTree.XMLParser]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_ElementTree:
+ qualnames: [xml.etree.ElementTree.parse,
+ xml.etree.ElementTree.iterparse,
+ xml.etree.ElementTree.fromstring,
+ xml.etree.ElementTree.XMLParser]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_expatreader:
+ qualnames: [xml.sax.expatreader.create_parser]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_expatbuilder:
+ qualnames: [xml.dom.expatbuilder.parse,
+ xml.dom.expatbuilder.parseString]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_sax:
+ qualnames: [xml.sax.parse,
+ xml.sax.parseString,
+ xml.sax.make_parser]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_minidom:
+ qualnames: [xml.dom.minidom.parse,
+ xml.dom.minidom.parseString]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_pulldom:
+ qualnames: [xml.dom.pulldom.parse,
+ xml.dom.pulldom.parseString]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+ - xml_bad_etree:
+ qualnames: [lxml.etree.parse,
+ lxml.etree.fromstring,
+ lxml.etree.RestrictedElement,
+ lxml.etree.GlobalParserTLS,
+ lxml.etree.getDefaultParser,
+ lxml.etree.check_docinfo]
+ message: "Using {func} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {func} with it's defusedxml equivilent function."
+
shell_injection:
# Start a process using the subprocess module, or one of its wrappers.
@@ -95,15 +176,40 @@
bad_import_sets:
- telnet:
imports: [telnetlib]
- level: ERROR
+ level: HIGH
message: "Telnet is considered insecure. Use SSH or some other encrypted protocol."
- info_libs:
imports: [pickle, cPickle, subprocess, Crypto]
- level: INFO
+ level: LOW
message: "Consider possible security implications associated with {module} module."
+ # Most of this is based off of Christian Heimes' work on defusedxml:
+ # https://pypi.python.org/pypi/defusedxml/#defusedxml-sax
+
+ - xml_libs:
+ imports: [xml.etree.cElementTree,
+ xml.etree.ElementTree,
+ xml.sax.expatreader,
+ xml.sax,
+ xml.dom.expatbuilder,
+ xml.dom.minidom,
+ xml.dom.pulldom,
+ lxml.etree,
+ lxml]
+ message: "Using {module} to parse untrusted XML data is known to be vulnerable to XML attacks. Replace {module} with the equivilent defusedxml package."
+ level: LOW
+ - xml_libs_high:
+ imports: [xmlrpclib]
+ message: "Using {module} to parse untrusted XML data is known to be vulnerable to XML attacks. Use defused.xmlrpc.monkey_patch() function to monkey-patch xmlrpclib and mitigate XML vulnerabilities."
+ level: HIGH
+
+hardcoded_tmp_directory:
+ tmp_dirs: ['/tmp', '/var/tmp', '/dev/shm']
+
hardcoded_password:
- word_list: "wordlist/default-passwords"
+ # Support for full path, relative path and special "%(site_data_dir)s"
+ # substitution (/usr/{local}/share)
+ word_list: "%(site_data_dir)s/wordlist/default-passwords"
ssl_with_bad_version:
bad_protocol_versions:
@@ -127,3 +233,6 @@
- neutron.agent.linux.utils.execute
- nova.utils.execute
- nova.utils.trycmd
+
+try_except_pass:
+ check_typed_exception: True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-error.po new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-error.po
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-error.po 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-error.po 2015-09-01 20:38:14.000000000 +0200
@@ -9,16 +9,16 @@
msgstr ""
"Project-Id-Version: oslo.vmware\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-23 06:10+0000\n"
+"POT-Creation-Date: 2015-08-04 06:27+0000\n"
"PO-Revision-Date: 2014-10-27 17:28+0000\n"
"Last-Translator: Maxime COQUEREL \n"
-"Language-Team: French (http://www.transifex.com/projects/p/oslovmware/"
+"Language-Team: French (http://www.transifex.com/openstack/oslovmware/"
"language/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#, python-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-info.po new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-info.po
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-info.po 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-info.po 2015-09-01 20:38:14.000000000 +0200
@@ -9,16 +9,16 @@
msgstr ""
"Project-Id-Version: oslo.vmware\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-23 06:10+0000\n"
+"POT-Creation-Date: 2015-08-04 06:27+0000\n"
"PO-Revision-Date: 2015-03-24 17:17+0000\n"
"Last-Translator: openstackjenkins \n"
-"Language-Team: French (http://www.transifex.com/projects/p/oslovmware/"
+"Language-Team: French (http://www.transifex.com/openstack/oslovmware/"
"language/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#, python-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-warning.po new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-warning.po
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-warning.po 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware-log-warning.po 2015-09-01 20:38:14.000000000 +0200
@@ -9,16 +9,16 @@
msgstr ""
"Project-Id-Version: oslo.vmware\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-23 06:10+0000\n"
-"PO-Revision-Date: 2015-07-13 01:31+0000\n"
-"Last-Translator: openstackjenkins \n"
-"Language-Team: French (http://www.transifex.com/projects/p/oslovmware/"
+"POT-Creation-Date: 2015-08-04 06:27+0000\n"
+"PO-Revision-Date: 2015-07-27 22:54+0000\n"
+"Last-Translator: Maxime COQUEREL \n"
+"Language-Team: French (http://www.transifex.com/openstack/oslovmware/"
"language/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "Error occurred while closing the file handle"
@@ -38,6 +38,11 @@
msgstr "Une erreur est survenue pendant la libération du bail pour %s."
#, python-format
+msgid "Exception %s is deprecated, it will be removed in the next release."
+msgstr ""
+"Exception %s est obsolète , il sera supprimé dans la prochaine version."
+
+#, python-format
msgid ""
"Exception which is in the suggested list of exceptions occurred while "
"invoking function: %s."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware.po new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware.po
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware.po 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/fr/LC_MESSAGES/oslo.vmware.po 2015-09-01 20:38:14.000000000 +0200
@@ -9,16 +9,16 @@
msgstr ""
"Project-Id-Version: oslo.vmware\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-23 06:10+0000\n"
-"PO-Revision-Date: 2015-06-22 13:36+0000\n"
-"Last-Translator: openstackjenkins \n"
-"Language-Team: French (http://www.transifex.com/projects/p/oslovmware/"
+"POT-Creation-Date: 2015-08-04 06:27+0000\n"
+"PO-Revision-Date: 2015-07-27 22:54+0000\n"
+"Last-Translator: Maxime COQUEREL \n"
+"Language-Team: French (http://www.transifex.com/openstack/oslovmware/"
"language/fr/)\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
msgid "An unknown exception occurred."
msgstr "Une exception inconnue s'est produite "
@@ -159,6 +159,9 @@
msgid "Lease: %(lease)s is in error state. Details: %(error_msg)s."
msgstr "Bail: %(lease)s est dans une erreur de status. Détails: %(error_msg)s."
+msgid "Managed object not found."
+msgstr "Objet géré introuvable."
+
#, python-format
msgid "Missing parameter : %(param)s"
msgstr "Paramètre manquant : %(param)s"
@@ -212,6 +215,12 @@
msgid "details must be a dict"
msgstr "details doit etre un dict"
+msgid "exception message must not be a list"
+msgstr "exception ne doit pas etre une liste"
+
+msgid "exception should be a subclass of VimException"
+msgstr "exception devrait être une subclass de VimException"
+
msgid "fault_list must be a list"
msgstr "fault_list doit etre une liste"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-critical.pot new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-critical.pot
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-critical.pot 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-critical.pot 2015-09-01 20:38:14.000000000 +0200
@@ -1,20 +1,20 @@
# Translations template for oslo.vmware.
-# Copyright (C) 2014 ORGANIZATION
+# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.vmware
# project.
-# FIRST AUTHOR , 2014.
+# FIRST AUTHOR , 2015.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: oslo.vmware 0.4.0.3.g1dc80c7\n"
+"Project-Id-Version: oslo.vmware 1.18.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-07-14 06:00+0000\n"
+"POT-Creation-Date: 2015-07-29 06:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-error.pot new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-error.pot
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-error.pot 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-error.pot 2015-09-01 20:38:14.000000000 +0200
@@ -1,71 +1,71 @@
# Translations template for oslo.vmware.
-# Copyright (C) 2014 ORGANIZATION
+# Copyright (C) 2015 ORGANIZATION
# This file is distributed under the same license as the oslo.vmware
# project.
-# FIRST AUTHOR , 2014.
+# FIRST AUTHOR , 2015.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: oslo.vmware 0.6.0.34.g0b7ff54\n"
+"Project-Id-Version: oslo.vmware 1.18.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-10-28 06:08+0000\n"
+"POT-Creation-Date: 2015-07-29 06:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
-#: oslo/vmware/api.py:104
+#: oslo_vmware/api.py:105
#, python-format
msgid ""
"Cannot retry upon suggested exception since retry count (%(retry_count)d)"
" reached max retry count (%(max_retry_count)d)."
msgstr ""
-#: oslo/vmware/api.py:261
+#: oslo_vmware/api.py:256
#, python-format
msgid ""
"Error occurred while logging out and terminating the current session with"
" ID = %s."
msgstr ""
-#: oslo/vmware/api.py:402
+#: oslo_vmware/api.py:401
#, python-format
msgid "Error occurred while reading info of task: %s."
msgstr ""
-#: oslo/vmware/api.py:457
+#: oslo_vmware/api.py:457
#, python-format
msgid "Error occurred while checking state of lease: %s."
msgstr ""
-#: oslo/vmware/exceptions.py:134
+#: oslo_vmware/exceptions.py:82
msgid "Exception in string format operation"
msgstr ""
-#: oslo/vmware/exceptions.py:136
+#: oslo_vmware/exceptions.py:84
#, python-format
msgid "%(name)s: %(value)s"
msgstr ""
-#: oslo/vmware/rw_handles.py:404
+#: oslo_vmware/rw_handles.py:424
#, python-format
msgid ""
"Error occurred while updating the write progress of VMDK file with URL = "
"%s."
msgstr ""
-#: oslo/vmware/rw_handles.py:553
+#: oslo_vmware/rw_handles.py:564
#, python-format
msgid ""
"Error occurred while updating the read progress of VMDK file with URL = "
"%s."
msgstr ""
-#: oslo/vmware/common/loopingcall.py:89
+#: oslo_vmware/common/loopingcall.py:89
msgid "in fixed duration looping call"
msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-info.pot new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-info.pot
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-info.pot 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-info.pot 2015-09-01 20:38:14.000000000 +0200
@@ -7,16 +7,16 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: oslo.vmware 0.11.1.post5\n"
+"Project-Id-Version: oslo.vmware 1.18.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-03-25 06:04+0000\n"
+"POT-Creation-Date: 2015-07-29 06:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
#: oslo_vmware/api.py:185
#, python-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-warning.pot new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-warning.pot
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware-log-warning.pot 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware-log-warning.pot 2015-09-01 20:38:14.000000000 +0200
@@ -7,16 +7,16 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: oslo.vmware 1.17.1.dev5\n"
+"Project-Id-Version: oslo.vmware 1.18.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-23 06:10+0000\n"
+"POT-Creation-Date: 2015-07-29 06:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
#: oslo_vmware/api.py:98
#, python-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware.pot new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware.pot
--- old/oslo.vmware-1.18.0/oslo.vmware/locale/oslo.vmware.pot 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware/locale/oslo.vmware.pot 2015-09-01 20:38:14.000000000 +0200
@@ -7,16 +7,16 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: oslo.vmware 1.16.0\n"
+"Project-Id-Version: oslo.vmware 1.18.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-07-09 06:13+0000\n"
+"POT-Creation-Date: 2015-07-29 06:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
+"Generated-By: Babel 2.0\n"
#: oslo_vmware/api.py:306
#, python-format
@@ -25,12 +25,12 @@
"invoking method %(module)s.%(method)s."
msgstr ""
-#: oslo_vmware/api.py:471
+#: oslo_vmware/api.py:470
#, python-format
msgid "Lease: %(lease)s is in error state. Details: %(error_msg)s."
msgstr ""
-#: oslo_vmware/api.py:478
+#: oslo_vmware/api.py:477
#, python-format
msgid "Unknown state: %(state)s for lease: %(lease)s."
msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware.egg-info/PKG-INFO new/oslo.vmware-1.21.0/oslo.vmware.egg-info/PKG-INFO
--- old/oslo.vmware-1.18.0/oslo.vmware.egg-info/PKG-INFO 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware.egg-info/PKG-INFO 2015-09-01 20:38:51.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: oslo.vmware
-Version: 1.18.0
+Version: 1.21.0
Summary: Oslo VMware library
Home-page: http://launchpad.net/oslo
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware.egg-info/pbr.json new/oslo.vmware-1.21.0/oslo.vmware.egg-info/pbr.json
--- old/oslo.vmware-1.18.0/oslo.vmware.egg-info/pbr.json 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware.egg-info/pbr.json 2015-09-01 20:38:51.000000000 +0200
@@ -1 +1 @@
-{"is_release": true, "git_version": "ddf8341"}
\ No newline at end of file
+{"git_version": "f1e117d", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo.vmware.egg-info/requires.txt new/oslo.vmware-1.21.0/oslo.vmware.egg-info/requires.txt
--- old/oslo.vmware-1.18.0/oslo.vmware.egg-info/requires.txt 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo.vmware.egg-info/requires.txt 2015-09-01 20:38:51.000000000 +0200
@@ -1,14 +1,14 @@
-pbr<2.0,>=1.3
-stevedore>=1.5.0 # Apache-2.0
-netaddr>=0.7.12
+pbr<2.0,>=1.6
+stevedore>=1.5.0
+netaddr!=0.7.16,>=0.7.12
iso8601>=0.1.9
six>=1.9.0
-oslo.i18n>=1.5.0 # Apache-2.0
-oslo.utils>=1.9.0 # Apache-2.0
+oslo.i18n>=1.5.0
+oslo.utils>=2.0.0
Babel>=1.3
PyYAML>=3.1.0
suds-jurko>=0.6
eventlet>=0.17.4
requests>=2.5.2
urllib3>=1.8.3
-oslo.concurrency>=2.3.0 # Apache-2.0
+oslo.concurrency>=2.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/api.py new/oslo.vmware-1.21.0/oslo_vmware/api.py
--- old/oslo.vmware-1.18.0/oslo_vmware/api.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/api.py 2015-09-01 20:38:14.000000000 +0200
@@ -138,7 +138,7 @@
def __init__(self, host, server_username, server_password,
api_retry_count, task_poll_interval, scheme='https',
create_session=True, wsdl_loc=None, pbm_wsdl_loc=None,
- port=443, cacert=None, insecure=True):
+ port=443, cacert=None, insecure=True, pool_size=10):
"""Initializes the API session with given parameters.
:param host: ESX/VC server IP address or host name
@@ -158,6 +158,8 @@
TLS (https) server certificate.
:param insecure: Verify HTTPS connections using system certificates,
used only if cacert is not specified
+ :param pool_size: Maximum number of connections in http
+ connection pool
:raises: VimException, VimFaultException, VimAttributeException,
VimSessionOverLoadException
"""
@@ -176,6 +178,7 @@
self._pbm = None
self._cacert = cacert
self._insecure = insecure
+ self._pool_size = pool_size
if create_session:
self._create_session()
@@ -192,7 +195,8 @@
port=self._port,
wsdl_url=self._vim_wsdl_loc,
cacert=self._cacert,
- insecure=self._insecure)
+ insecure=self._insecure,
+ pool_maxsize=self._pool_size)
return self._vim
@property
@@ -203,7 +207,8 @@
port=self._port,
wsdl_url=self._pbm_wsdl_loc,
cacert=self._cacert,
- insecure=self._insecure)
+ insecure=self._insecure,
+ pool_maxsize=self._pool_size)
if self._session_id:
# To handle the case where pbm property is accessed after
# session creation. If pbm property is accessed before session
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/objects/datastore.py new/oslo.vmware-1.21.0/oslo_vmware/objects/datastore.py
--- old/oslo.vmware-1.18.0/oslo_vmware/objects/datastore.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/objects/datastore.py 2015-09-01 20:38:14.000000000 +0200
@@ -14,7 +14,7 @@
import logging
import posixpath
-import random as _random # nosec
+import random
import six.moves.http_client as httplib
import six.moves.urllib.parse as urlparse
@@ -25,7 +25,6 @@
from oslo_vmware import vim_util
LOG = logging.getLogger(__name__)
-random = _random.SystemRandom() # nosec
def get_datastore_by_ref(session, ds_ref):
@@ -157,7 +156,7 @@
@staticmethod
def choose_host(hosts):
- i = random.randrange(0, len(hosts)) # nosec
+ i = random.SystemRandom().randrange(0, len(hosts))
return hosts[i]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/pbm.py new/oslo.vmware-1.21.0/oslo_vmware/pbm.py
--- old/oslo.vmware-1.18.0/oslo_vmware/pbm.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/pbm.py 2015-09-01 20:38:14.000000000 +0200
@@ -41,7 +41,7 @@
"""Service class that provides access to the Storage Policy API."""
def __init__(self, protocol='https', host='localhost', port=443,
- wsdl_url=None, cacert=None, insecure=True):
+ wsdl_url=None, cacert=None, insecure=True, pool_maxsize=10):
"""Constructs a PBM service client object.
:param protocol: http or https
@@ -52,10 +52,13 @@
TLS (https) server certificate.
:param insecure: Verify HTTPS connections using system certificates,
used only if cacert is not specified
+ :param pool_maxsize: Maximum number of connections in http
+ connection pool
"""
base_url = service.Service.build_base_url(protocol, host, port)
soap_url = base_url + '/pbm'
- super(Pbm, self).__init__(wsdl_url, soap_url, cacert, insecure)
+ super(Pbm, self).__init__(wsdl_url, soap_url, cacert, insecure,
+ pool_maxsize)
def set_soap_cookie(self, cookie):
"""Set the specified vCenter session cookie in the SOAP header
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/rw_handles.py new/oslo.vmware-1.21.0/oslo_vmware/rw_handles.py
--- old/oslo.vmware-1.18.0/oslo_vmware/rw_handles.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/rw_handles.py 2015-09-01 20:38:14.000000000 +0200
@@ -62,16 +62,47 @@
self._last_logged_progress = 0
self._last_progress_udpate = 0
- def _create_read_connection(self, url, cookies=None, cacerts=False):
+ def _create_connection(self, url, method, cacerts=False,
+ ssl_thumbprint=None):
+ _urlparse = urlparse.urlparse(url)
+ scheme, netloc, path, params, query, fragment = _urlparse
+ if scheme == 'http':
+ conn = httplib.HTTPConnection(netloc)
+ elif scheme == 'https':
+ conn = httplib.HTTPSConnection(netloc)
+ cert_reqs = None
+
+ # cacerts can be either True or False or contain
+ # actual certificates. If it is a boolean, then
+ # we need to set cert_reqs and clear the cacerts
+ if isinstance(cacerts, bool):
+ if cacerts:
+ cert_reqs = ssl.CERT_REQUIRED
+ else:
+ cert_reqs = ssl.CERT_NONE
+ cacerts = None
+ conn.set_cert(ca_certs=cacerts, cert_reqs=cert_reqs,
+ assert_fingerprint=ssl_thumbprint)
+ else:
+ excep_msg = _("Invalid scheme: %s.") % scheme
+ LOG.error(excep_msg)
+ raise ValueError(excep_msg)
+
+ if query:
+ path = path + '?' + query
+ conn.putrequest(method, path)
+ return conn
+
+ def _create_read_connection(self, url, cookies=None, cacerts=False,
+ ssl_thumbprint=None):
LOG.debug("Opening URL: %s for reading.", url)
try:
- headers = {'User-Agent': USER_AGENT}
- if cookies:
- headers.update({'Cookie':
- self._build_vim_cookie_header(cookies)})
- response = requests.get(url, headers=headers, stream=True,
- verify=cacerts)
- return response.raw
+ conn = self._create_connection(url, 'GET', cacerts, ssl_thumbprint)
+ vim_cookie = self._build_vim_cookie_header(cookies)
+ conn.putheader('User-Agent', USER_AGENT)
+ conn.putheader('Cookie', vim_cookie)
+ conn.endheaders()
+ return conn.getresponse()
except Exception as excep:
# TODO(vbala) We need to catch and raise specific exceptions
# related to connection problems, invalid request and invalid
@@ -86,41 +117,15 @@
cookies=None,
overwrite=None,
content_type=None,
- cacerts=False):
+ cacerts=False,
+ ssl_thumbprint=None):
"""Create HTTP connection to write to VMDK file."""
LOG.debug("Creating HTTP connection to write to file with "
"size = %(file_size)d and URL = %(url)s.",
{'file_size': file_size,
'url': url})
- _urlparse = urlparse.urlparse(url)
- scheme, netloc, path, params, query, fragment = _urlparse
-
try:
- if scheme == 'http':
- conn = httplib.HTTPConnection(netloc)
- elif scheme == 'https':
- conn = httplib.HTTPSConnection(netloc)
- cert_reqs = None
-
- # cacerts can be either True or False or contain
- # actual certificates. If it is a boolean, then
- # we need to set cert_reqs and clear the cacerts
- if isinstance(cacerts, bool):
- if cacerts:
- cert_reqs = ssl.CERT_REQUIRED
- else:
- cert_reqs = ssl.CERT_NONE
- cacerts = None
-
- conn.set_cert(ca_certs=cacerts, cert_reqs=cert_reqs)
- else:
- excep_msg = _("Invalid scheme: %s.") % scheme
- LOG.error(excep_msg)
- raise ValueError(excep_msg)
-
- if query:
- path = path + '?' + query
-
+ conn = self._create_connection(url, 'PUT', cacerts, ssl_thumbprint)
headers = {'User-Agent': USER_AGENT}
if file_size:
headers.update({'Content-Length': str(file_size)})
@@ -131,8 +136,6 @@
self._build_vim_cookie_header(cookies)})
if content_type:
headers.update({'Content-Type': content_type})
-
- conn.putrequest('PUT', path)
for key, value in six.iteritems(headers):
conn.putheader(key, value)
conn.endheaders()
@@ -213,16 +216,18 @@
def _find_vmdk_url(self, lease_info, host, port):
"""Find the URL corresponding to a VMDK file in lease info."""
url = None
+ ssl_thumbprint = None
for deviceUrl in lease_info.deviceUrl:
if deviceUrl.disk:
url = self._fix_esx_url(deviceUrl.url, host, port)
+ ssl_thumbprint = deviceUrl.sslThumbprint
break
if not url:
excep_msg = _("Could not retrieve VMDK URL from lease info.")
LOG.error(excep_msg)
raise exceptions.VimException(excep_msg)
LOG.debug("Found VMDK URL: %s from lease info.", url)
- return url
+ return url, ssl_thumbprint
def _log_progress(self, progress):
"""Log data transfer progress."""
@@ -338,7 +343,7 @@
'info')
# Find VMDK URL where data is to be written
- self._url = self._find_vmdk_url(lease_info, host, port)
+ self._url, thumbprint = self._find_vmdk_url(lease_info, host, port)
self._vm_ref = lease_info.entity
cookies = session.vim.client.options.transport.cookiejar
@@ -349,7 +354,7 @@
cookies=cookies,
overwrite='t',
content_type=octet_stream,
- cacerts=session._cacert)
+ ssl_thumbprint=thumbprint)
FileHandle.__init__(self, self._conn)
def get_imported_vm(self):
@@ -499,12 +504,11 @@
'info')
# find URL of the VMDK file to be read and open connection
- self._url = self._find_vmdk_url(lease_info, host, port)
+ self._url, thumbprint = self._find_vmdk_url(lease_info, host, port)
cookies = session.vim.client.options.transport.cookiejar
- cacerts = session.vim.client.options.transport.verify
self._conn = self._create_read_connection(self._url,
cookies=cookies,
- cacerts=cacerts)
+ ssl_thumbprint=thumbprint)
FileHandle.__init__(self, self._conn)
def _create_and_wait_for_lease(self, session, vm_ref):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/service.py new/oslo.vmware-1.21.0/oslo_vmware/service.py
--- old/oslo.vmware-1.18.0/oslo_vmware/service.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/service.py 2015-09-01 20:38:14.000000000 +0200
@@ -116,6 +116,9 @@
See http://stackoverflow.com/a/22989322
"""
+ def __init__(self, pool_maxsize=10):
+ super(LocalFileAdapter, self).__init__(pool_connections=pool_maxsize,
+ pool_maxsize=pool_maxsize)
def _build_response_from_file(self, request):
file_path = request.url[7:]
@@ -131,13 +134,14 @@
class RequestsTransport(transport.Transport):
- def __init__(self, cacert=None, insecure=True):
+ def __init__(self, cacert=None, insecure=True, pool_maxsize=10):
transport.Transport.__init__(self)
# insecure flag is used only if cacert is not
# specified.
self.verify = cacert if cacert else not insecure
self.session = requests.Session()
- self.session.mount('file:///', LocalFileAdapter())
+ self.session.mount('file:///',
+ LocalFileAdapter(pool_maxsize=pool_maxsize))
self.cookiejar = self.session.cookies
def open(self, request):
@@ -184,12 +188,12 @@
"""
def __init__(self, wsdl_url=None, soap_url=None,
- cacert=None, insecure=True):
+ cacert=None, insecure=True, pool_maxsize=10):
self.wsdl_url = wsdl_url
self.soap_url = soap_url
LOG.debug("Creating suds client with soap_url='%s' and wsdl_url='%s'",
self.soap_url, self.wsdl_url)
- transport = RequestsTransport(cacert, insecure)
+ transport = RequestsTransport(cacert, insecure, pool_maxsize)
self.client = client.Client(self.wsdl_url,
transport=transport,
location=self.soap_url,
@@ -376,8 +380,8 @@
if login.childAtPath('userName') is not None:
login.childAtPath('userName').setText('***')
- if login.childAtPath('password') is not None:
- login.childAtPath('password').setText('***')
+ if login.childAtPath('password') is not None: # nosec
+ login.childAtPath('password').setText('***') # nosec
session_id = login.childAtPath('sessionID')
if session_id is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/tests/test_api.py new/oslo.vmware-1.21.0/oslo_vmware/tests/test_api.py
--- old/oslo.vmware-1.18.0/oslo_vmware/tests/test_api.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/tests/test_api.py 2015-09-01 20:38:14.000000000 +0200
@@ -102,6 +102,7 @@
PORT = 443
USERNAME = 'admin'
PASSWORD = 'password'
+ POOL_SIZE = 15
def setUp(self):
super(VMwareAPISessionTest, self).setUp()
@@ -122,7 +123,8 @@
_create_session,
port=VMwareAPISessionTest.PORT,
cacert=self.cert_mock,
- insecure=False)
+ insecure=False,
+ pool_size=VMwareAPISessionTest.POOL_SIZE)
def test_vim(self):
api_session = self._create_api_session(False)
@@ -132,7 +134,9 @@
port=VMwareAPISessionTest.PORT,
wsdl_url=api_session._vim_wsdl_loc,
cacert=self.cert_mock,
- insecure=False)
+ insecure=False,
+ pool_maxsize=VMwareAPISessionTest.
+ POOL_SIZE)
@mock.patch.object(pbm, 'Pbm')
def test_pbm(self, pbm_mock):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/tests/test_rw_handles.py new/oslo.vmware-1.21.0/oslo_vmware/tests/test_rw_handles.py
--- old/oslo.vmware-1.18.0/oslo_vmware/tests/test_rw_handles.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/tests/test_rw_handles.py 2015-09-01 20:38:14.000000000 +0200
@@ -24,6 +24,7 @@
from oslo_vmware import rw_handles
from oslo_vmware.tests import base
from oslo_vmware import vim_util
+from urllib3 import connection as httplib
class FileHandleTest(base.TestCase):
@@ -41,15 +42,23 @@
device_url_1 = mock.Mock()
device_url_1.disk = True
device_url_1.url = 'https://*/ds1/vm1.vmdk'
+ device_url_1.sslThumbprint = '11:22:33:44:55'
lease_info = mock.Mock()
lease_info.deviceUrl = [device_url_0, device_url_1]
host = '10.1.2.3'
port = 443
exp_url = 'https://%s:%d/ds1/vm1.vmdk' % (host, port)
vmw_http_file = rw_handles.FileHandle(None)
- self.assertEqual(exp_url, vmw_http_file._find_vmdk_url(lease_info,
- host,
- port))
+ url, thumbprint = vmw_http_file._find_vmdk_url(lease_info, host, port)
+ self.assertEqual(exp_url, url)
+ self.assertEqual('11:22:33:44:55', thumbprint)
+
+ def test_create_connection(self):
+ handle = rw_handles.FileHandle(None)
+ conn = handle._create_connection('http://fira', 'GET')
+ self.assertIsInstance(conn, httplib.HTTPConnection)
+ conn = handle._create_connection('https://fira', 'GET')
+ self.assertIsInstance(conn, httplib.HTTPSConnection)
class FileWriteHandleTest(base.TestCase):
@@ -182,12 +191,15 @@
def setUp(self):
super(VmdkReadHandleTest, self).setUp()
-
- send_patcher = mock.patch('requests.sessions.Session.send')
- self.addCleanup(send_patcher.stop)
- send_mock = send_patcher.start()
- self._response = mock.Mock()
- send_mock.return_value = self._response
+ self._resp = mock.Mock()
+ self._resp.read.return_value = 'fake-data'
+ self._conn = mock.Mock()
+ self._conn.getresponse.return_value = self._resp
+ patcher = mock.patch(
+ 'urllib3.connection.HTTPConnection')
+ self.addCleanup(patcher.stop)
+ HTTPConnectionMock = patcher.start()
+ HTTPConnectionMock.return_value = self._conn
def _create_mock_session(self, disk=True, progress=-1):
device_url = mock.Mock()
@@ -227,25 +239,22 @@
def test_read(self):
chunk_size = rw_handles.READ_CHUNKSIZE
session = self._create_mock_session()
- self._response.raw.read.return_value = [1] * chunk_size
handle = rw_handles.VmdkReadHandle(session, '10.1.2.3', 443,
'vm-1', '[ds] disk1.vmdk',
chunk_size * 10)
- handle.read(chunk_size)
- self.assertEqual(chunk_size, handle._bytes_read)
- self._response.raw.read.assert_called_once_with(chunk_size)
+ data = handle.read(chunk_size)
+ self.assertEqual('fake-data', data)
def test_update_progress(self):
- chunk_size = rw_handles.READ_CHUNKSIZE
+ chunk_size = len('fake-data')
vmdk_size = chunk_size * 10
session = self._create_mock_session(True, 10)
- self._response.raw.read.return_value = [1] * chunk_size
handle = rw_handles.VmdkReadHandle(session, '10.1.2.3', 443,
'vm-1', '[ds] disk1.vmdk',
vmdk_size)
- handle.read(chunk_size)
+ data = handle.read(chunk_size)
handle.update_progress()
- self._response.raw.read.assert_called_once_with(chunk_size)
+ self.assertEqual('fake-data', data)
def test_update_progress_with_error(self):
session = self._create_mock_session(True, 10)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/tests/test_service.py new/oslo.vmware-1.21.0/oslo_vmware/tests/test_service.py
--- old/oslo.vmware-1.18.0/oslo_vmware/tests/test_service.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/tests/test_service.py 2015-09-01 20:38:14.000000000 +0200
@@ -440,6 +440,12 @@
self.assertEqual(mock.sentinel.headers, reply.headers)
self.assertEqual(mock.sentinel.content, reply.message)
+ def test_set_conn_pool_size(self):
+ transport = service.RequestsTransport(pool_maxsize=100)
+ local_file_adapter = transport.session.adapters['file:///']
+ self.assertEqual(100, local_file_adapter._pool_connections)
+ self.assertEqual(100, local_file_adapter._pool_maxsize)
+
@mock.patch('os.path.getsize')
def test_send_with_local_file_url(self, get_size_mock):
transport = service.RequestsTransport()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/oslo_vmware/vim.py new/oslo.vmware-1.21.0/oslo_vmware/vim.py
--- old/oslo.vmware-1.18.0/oslo_vmware/vim.py 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/oslo_vmware/vim.py 2015-09-01 20:38:14.000000000 +0200
@@ -20,7 +20,7 @@
"""Service class that provides access to the VIM API."""
def __init__(self, protocol='https', host='localhost', port=None,
- wsdl_url=None, cacert=None, insecure=True):
+ wsdl_url=None, cacert=None, insecure=True, pool_maxsize=10):
"""Constructs a VIM service client object.
:param protocol: http or https
@@ -31,6 +31,8 @@
TLS (https) server certificate.
:param insecure: Verify HTTPS connections using system certificates,
used only if cacert is not specified
+ :param pool_maxsize: Maximum number of connections in http
+ connection pool
:raises: VimException, VimFaultException, VimAttributeException,
VimSessionOverLoadException, VimConnectionException
"""
@@ -38,7 +40,8 @@
soap_url = base_url + '/sdk'
if wsdl_url is None:
wsdl_url = soap_url + '/vimService.wsdl'
- super(Vim, self).__init__(wsdl_url, soap_url, cacert, insecure)
+ super(Vim, self).__init__(wsdl_url, soap_url, cacert, insecure,
+ pool_maxsize)
def retrieve_service_content(self):
return self.RetrieveServiceContent(service.SERVICE_INSTANCE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/requirements.txt new/oslo.vmware-1.21.0/requirements.txt
--- old/oslo.vmware-1.18.0/requirements.txt 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/requirements.txt 2015-09-01 20:38:14.000000000 +0200
@@ -2,10 +2,10 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-pbr<2.0,>=1.3
+pbr<2.0,>=1.6
stevedore>=1.5.0 # Apache-2.0
-netaddr>=0.7.12
+netaddr!=0.7.16,>=0.7.12
# for timeutils
iso8601>=0.1.9
@@ -14,7 +14,7 @@
six>=1.9.0
oslo.i18n>=1.5.0 # Apache-2.0
-oslo.utils>=1.9.0 # Apache-2.0
+oslo.utils>=2.0.0 # Apache-2.0
Babel>=1.3
# for the routing notifier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/setup.cfg new/oslo.vmware-1.21.0/setup.cfg
--- old/oslo.vmware-1.18.0/setup.cfg 2015-07-27 21:59:44.000000000 +0200
+++ new/oslo.vmware-1.21.0/setup.cfg 2015-09-01 20:38:51.000000000 +0200
@@ -52,7 +52,7 @@
universal = 1
[egg_info]
-tag_build =
tag_date = 0
+tag_build =
tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/test-requirements.txt new/oslo.vmware-1.21.0/test-requirements.txt
--- old/oslo.vmware-1.18.0/test-requirements.txt 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/test-requirements.txt 2015-09-01 20:38:14.000000000 +0200
@@ -23,4 +23,4 @@
oslosphinx>=2.5.0 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
-bandit>=0.10.1
+bandit>=0.13.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.vmware-1.18.0/tox.ini new/oslo.vmware-1.21.0/tox.ini
--- old/oslo.vmware-1.18.0/tox.ini 2015-07-27 21:59:14.000000000 +0200
+++ new/oslo.vmware-1.21.0/tox.ini 2015-09-01 20:38:14.000000000 +0200
@@ -18,7 +18,7 @@
[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
-commands = bandit -c bandit.yaml -r oslo_vmware -n 5 -ll
+commands = bandit -c bandit.yaml -r oslo_vmware -n 5
[testenv:docs]
commands = python setup.py build_sphinx
@@ -33,7 +33,7 @@
[flake8]
show-source = True
-ignore = H405,H904
+ignore = H405
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,__init__.py
[hacking]