diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
3 files changed, 18 insertions, 90 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient/fix_keystoneclient_memory_leak.patch b/meta-openstack/recipes-devtools/python/python-keystoneclient/fix_keystoneclient_memory_leak.patch deleted file mode 100644 index 05a1d23..0000000 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient/fix_keystoneclient_memory_leak.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | --- | ||
| 2 | keystoneclient/openstack/common/apiclient/client.py | 10 ++++++++++ | ||
| 3 | 1 file changed, 10 insertions(+) | ||
| 4 | |||
| 5 | --- a/keystoneclient/openstack/common/apiclient/client.py | ||
| 6 | +++ b/keystoneclient/openstack/common/apiclient/client.py | ||
| 7 | @@ -90,6 +90,7 @@ | ||
| 8 | self.user_agent = user_agent or self.user_agent | ||
| 9 | |||
| 10 | self.times = [] # [("item", starttime, endtime), ...] | ||
| 11 | + self.times_max_len = 200 | ||
| 12 | self.timings = timings | ||
| 13 | |||
| 14 | # requests within the same session can reuse TCP connections from pool | ||
| 15 | @@ -142,6 +143,12 @@ | ||
| 16 | def reset_timings(self): | ||
| 17 | self.times = [] | ||
| 18 | |||
| 19 | + def get_timings_max_len(self): | ||
| 20 | + return self.times_max_len | ||
| 21 | + | ||
| 22 | + def set_timings_max_len(self, new_len): | ||
| 23 | + self.times_max_len = new_len | ||
| 24 | + | ||
| 25 | def request(self, method, url, **kwargs): | ||
| 26 | """Send an http request with the specified characteristics. | ||
| 27 | |||
| 28 | @@ -173,6 +180,9 @@ | ||
| 29 | if self.timings: | ||
| 30 | self.times.append(("%s %s" % (method, url), | ||
| 31 | start_time, time.time())) | ||
| 32 | + # remove oldest items until we maintain max length | ||
| 33 | + while len(self.times) > self.times_max_len: | ||
| 34 | + del self.times[0] | ||
| 35 | self._http_log_resp(resp) | ||
| 36 | |||
| 37 | if resp.status_code >= 400: | ||
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient/keystoneclient-fix-test-path-to-example-certificates.patch b/meta-openstack/recipes-devtools/python/python-keystoneclient/keystoneclient-fix-test-path-to-example-certificates.patch deleted file mode 100644 index a75e1da..0000000 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient/keystoneclient-fix-test-path-to-example-certificates.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | From fae14f85d43da3842b2a065baf0442d61a573598 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
| 3 | Date: Fri, 13 Jun 2014 17:08:03 -0400 | ||
| 4 | Subject: [PATCH] keystoneclient: fix test path to example certificates | ||
| 5 | |||
| 6 | The tests included with keystoneclient expect them to be ran from the | ||
| 7 | source tree. This fix changes base path of the system to where they | ||
| 8 | are actually deployed on the system. This fix is required for some | ||
| 9 | tests to work properly. | ||
| 10 | |||
| 11 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
| 12 | --- | ||
| 13 | keystoneclient/tests/client_fixtures.py | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/keystoneclient/tests/client_fixtures.py b/keystoneclient/tests/client_fixtures.py | ||
| 17 | index 1743162..6bfcb93 100644 | ||
| 18 | --- a/keystoneclient/tests/client_fixtures.py | ||
| 19 | +++ b/keystoneclient/tests/client_fixtures.py | ||
| 20 | @@ -25,7 +25,7 @@ from keystoneclient import utils | ||
| 21 | |||
| 22 | |||
| 23 | TESTDIR = os.path.dirname(os.path.abspath(__file__)) | ||
| 24 | -ROOTDIR = os.path.normpath(os.path.join(TESTDIR, '..', '..')) | ||
| 25 | +ROOTDIR = os.path.normpath(os.path.join(TESTDIR, '..')) | ||
| 26 | CERTDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'certs') | ||
| 27 | CMSDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'cms') | ||
| 28 | KEYDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'private') | ||
| 29 | -- | ||
| 30 | 1.9.3 | ||
| 31 | |||
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb index 0b67e40..e82c5f6 100644 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb | |||
| @@ -7,16 +7,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4a4d0e932ffae1c0131528d30d419c55" | |||
| 7 | SRCNAME = "keystoneclient" | 7 | SRCNAME = "keystoneclient" |
| 8 | 8 | ||
| 9 | SRC_URI = "\ | 9 | SRC_URI = "\ |
| 10 | git://github.com/openstack/python-keystoneclient.git;branch=master \ | 10 | git://github.com/openstack/python-keystoneclient.git;branch=stable/pike \ |
| 11 | file://fix_keystoneclient_memory_leak.patch \ | ||
| 12 | file://keystone-api-check.sh \ | 11 | file://keystone-api-check.sh \ |
| 13 | " | 12 | " |
| 14 | 13 | ||
| 15 | PV = "1.7.1+git${SRCPV}" | 14 | PV = "3.13.0+git${SRCPV}" |
| 16 | SRCREV = "28138b588224c6b0503620ac2e24bd37dad25370" | 15 | SRCREV = "7ff05baa1fa56f152173651f16fc6fd181291292" |
| 17 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 18 | 17 | ||
| 19 | inherit setuptools monitor rmargparse | 18 | inherit setuptools monitor |
| 20 | 19 | ||
| 21 | FILES_${PN}-doc += "${datadir}/keystoneclient" | 20 | FILES_${PN}-doc += "${datadir}/keystoneclient" |
| 22 | 21 | ||
| @@ -31,28 +30,25 @@ DEPENDS += " \ | |||
| 31 | " | 30 | " |
| 32 | 31 | ||
| 33 | RDEPENDS_${PN} += " \ | 32 | RDEPENDS_${PN} += " \ |
| 34 | python-iso8601 \ | 33 | bash \ |
| 35 | python-prettytable \ | 34 | python-pbr \ |
| 36 | python-requests \ | 35 | python-debtcollector \ |
| 37 | python-simplejson \ | 36 | python-keystoneauth1 \ |
| 38 | python-oslo.config \ | 37 | python-oslo.config \ |
| 39 | python-oslo.serialization \ | 38 | python-oslo.i18n \ |
| 40 | python-pbr \ | 39 | python-oslo.serialization \ |
| 41 | python-argparse \ | 40 | python-oslo.utils \ |
| 42 | " | 41 | python-positional \ |
| 43 | 42 | python-requests \ | |
| 44 | PACKAGECONFIG ?= "bash-completion" | 43 | python-six \ |
| 45 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" | 44 | python-stevedore \ |
| 45 | " | ||
| 46 | 46 | ||
| 47 | do_install_append() { | 47 | do_install_append() { |
| 48 | install -d ${D}/${sysconfdir}/bash_completion.d | ||
| 49 | install -m 664 ${S}/tools/keystone.bash_completion ${D}/${sysconfdir}/bash_completion.d | ||
| 50 | |||
| 51 | cp -r ${S}/examples ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME} | 48 | cp -r ${S}/examples ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME} |
| 52 | } | 49 | } |
| 53 | 50 | ||
| 54 | PACKAGES =+ " ${SRCNAME}-tests ${BPN}-bash-completion" | 51 | PACKAGES =+ " ${SRCNAME}-tests" |
| 55 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" | ||
| 56 | 52 | ||
| 57 | FILES_${SRCNAME}-tests = "${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/examples \ | 53 | FILES_${SRCNAME}-tests = "${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/examples \ |
| 58 | " | 54 | " |
