diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2017-05-31 14:02:41 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-06-07 11:44:16 +0200 |
| commit | 34d600edff2b60905104aecf1cfd7fe59f9aa697 (patch) | |
| tree | 4f9f691503b35556e15756be35d9aa2b91abccdd /meta-openstack | |
| parent | a4bf68fee320ddf898cde7df65754657f3b45bb4 (diff) | |
| download | meta-cloud-services-34d600edff2b60905104aecf1cfd7fe59f9aa697.tar.gz | |
python-keystoneclient: Uprev to 3.5.1
This is used by latest stable/newton
Drop memory leak patch, has been fixed in the new version.
keystone.bash_completion has been removed in the newer version, so drop
support for it from the recipe.
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta-openstack')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-keystoneclient/fix_keystoneclient_memory_leak.patch | 37 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb | 18 |
2 files changed, 5 insertions, 50 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_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb index 0b67e40..1c1d4ec 100644 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb | |||
| @@ -7,18 +7,17 @@ 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/newton \ |
| 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.5.1+git${SRCPV}" |
| 16 | SRCREV = "28138b588224c6b0503620ac2e24bd37dad25370" | 15 | SRCREV = "7c40ff8466dc5e49f93752ecb998db864f8e5598" |
| 17 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 18 | 17 | ||
| 19 | inherit setuptools monitor rmargparse | 18 | inherit setuptools monitor rmargparse |
| 20 | 19 | ||
| 21 | FILES_${PN}-doc += "${datadir}/keystoneclient" | 20 | FILES_${PN}-doc += "${datadir}/keystoneclient" |
| 22 | 21 | ||
| 23 | DEPENDS += " \ | 22 | DEPENDS += " \ |
| 24 | python-pip \ | 23 | python-pip \ |
| @@ -41,18 +40,11 @@ RDEPENDS_${PN} += " \ | |||
| 41 | python-argparse \ | 40 | python-argparse \ |
| 42 | " | 41 | " |
| 43 | 42 | ||
| 44 | PACKAGECONFIG ?= "bash-completion" | ||
| 45 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" | ||
| 46 | |||
| 47 | do_install_append() { | 43 | 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} | 44 | cp -r ${S}/examples ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME} |
| 52 | } | 45 | } |
| 53 | 46 | ||
| 54 | PACKAGES =+ " ${SRCNAME}-tests ${BPN}-bash-completion" | 47 | PACKAGES =+ " ${SRCNAME}-tests" |
| 55 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" | ||
| 56 | 48 | ||
| 57 | FILES_${SRCNAME}-tests = "${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/examples \ | 49 | FILES_${SRCNAME}-tests = "${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/examples \ |
| 58 | " | 50 | " |
