summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-novaclient
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2015-02-20 15:41:06 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-02-20 15:41:06 -0500
commitc43afe3b7383ce93fef9cdd1ebb18de5dda0044a (patch)
tree2ac66b1c9a8c1d22405199fc19699bae4e48ce82 /meta-openstack/recipes-devtools/python/python-novaclient
parent5cb7f84b7fdce2d667f51f94af5fdfd4f1e5bd26 (diff)
downloadmeta-cloud-services-c43afe3b7383ce93fef9cdd1ebb18de5dda0044a.tar.gz
bbappends: resync to oe-core versions
Updating the bbappends to match the oe-core versions ~commit 530565c6cb77319f4cc49edeea6fec6be997415d Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-novaclient')
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient/fix_novaclient_memory_leak.patch105
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch32
2 files changed, 0 insertions, 137 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient/fix_novaclient_memory_leak.patch b/meta-openstack/recipes-devtools/python/python-novaclient/fix_novaclient_memory_leak.patch
deleted file mode 100644
index 37688d6..0000000
--- a/meta-openstack/recipes-devtools/python/python-novaclient/fix_novaclient_memory_leak.patch
+++ /dev/null
@@ -1,105 +0,0 @@
1---
2 novaclient/client.py | 10 ++++++++++
3 novaclient/openstack/common/apiclient/client.py | 10 ++++++++++
4 novaclient/v1_1/client.py | 6 ++++++
5 novaclient/v3/client.py | 6 ++++++
6 4 files changed, 32 insertions(+)
7
8Index: git/novaclient/client.py
9===================================================================
10--- git.orig/novaclient/client.py
11+++ git/novaclient/client.py
12@@ -266,6 +266,7 @@
13 self.timeout = None
14
15 self.times = [] # [("item", starttime, endtime), ...]
16+ self.times_max_len = 200
17
18 self.management_url = self.bypass_url or None
19 self.auth_token = auth_token
20@@ -328,6 +329,12 @@
21 else:
22 return name, value
23
24+ def get_timings_max_len(self):
25+ return self.times_max_len
26+
27+ def set_timings_max_len(self, new_len):
28+ self.times_max_len = new_len
29+
30 def http_log_req(self, method, url, kwargs):
31 if not self.http_log_debug:
32 return
33@@ -441,6 +448,9 @@
34 resp, body = self.request(url, method, **kwargs)
35 self.times.append(("%s %s" % (method, url),
36 start_time, time.time()))
37+ # remove oldest items until we maintain max length
38+ while len(self.times) > self.times_max_len:
39+ del self.times[0]
40 return resp, body
41
42 def _cs_request(self, url, method, **kwargs):
43Index: git/novaclient/openstack/common/apiclient/client.py
44===================================================================
45--- git.orig/novaclient/openstack/common/apiclient/client.py
46+++ git/novaclient/openstack/common/apiclient/client.py
47@@ -92,6 +92,7 @@
48 self.user_agent = user_agent or self.user_agent
49
50 self.times = [] # [("item", starttime, endtime), ...]
51+ self.times_max_len = 200
52 self.timings = timings
53
54 # requests within the same session can reuse TCP connections from pool
55@@ -144,6 +145,12 @@
56 def reset_timings(self):
57 self.times = []
58
59+ def get_timings_max_len(self):
60+ return self.times_max_len
61+
62+ def set_timings_max_len(self, new_len):
63+ self.times_max_len = new_len
64+
65 def request(self, method, url, **kwargs):
66 """Send an http request with the specified characteristics.
67
68@@ -175,6 +182,9 @@
69 if self.timings:
70 self.times.append(("%s %s" % (method, url),
71 start_time, time.time()))
72+ # remove oldest items until we maintain max length
73+ while len(self.times) > self.times_max_len:
74+ del self.times[0]
75 self._http_log_resp(resp)
76
77 if resp.status_code >= 400:
78Index: git/novaclient/v1_1/client.py
79===================================================================
80--- git.orig/novaclient/v1_1/client.py
81+++ git/novaclient/v1_1/client.py
82@@ -232,3 +232,9 @@
83 credentials are wrong.
84 """
85 self.client.authenticate()
86+
87+ def get_timings_max_len(self):
88+ return self.client.get_timings_max_len()
89+
90+ def set_timings_max_len(self, new_len):
91+ self.client.set_timings_max_len(new_len)
92Index: git/novaclient/v3/client.py
93===================================================================
94--- git.orig/novaclient/v3/client.py
95+++ git/novaclient/v3/client.py
96@@ -194,3 +194,9 @@
97 credentials are wrong.
98 """
99 self.client.authenticate()
100+
101+ def get_timings_max_len(self):
102+ return self.client.get_timings_max_len()
103+
104+ def set_timings_max_len(self, new_len):
105+ self.client.set_timings_max_len(new_len)
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch b/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch
deleted file mode 100644
index 1cee4d0..0000000
--- a/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From bdd853d38c7b14088d3e6368e298201c249ab004 Mon Sep 17 00:00:00 2001
2From: Keith Holman <Keith.Holman@windriver.com>
3Date: Fri, 13 Jun 2014 09:54:41 -0400
4Subject: [PATCH] novaclient: specify full path to test certificate
5
6The tests shipped with novaclient assume that the files
7exist at the same location as are appear within the
8source tree. The tests also assume that the test is ran
9from the root of the tree. This causes a test to fail as
10it can't find a test certificate used in one of the
11tests. This patch fixes the affected test by putting in
12an identifier that is replaced with the full path to the
13certificate file.
14
15Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
16---
17 novaclient/tests/v1_1/test_servers.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20Index: git/novaclient/tests/v1_1/test_servers.py
21===================================================================
22--- git.orig/novaclient/tests/v1_1/test_servers.py
23+++ git/novaclient/tests/v1_1/test_servers.py
24@@ -501,7 +501,7 @@
25 def test_get_password(self):
26 s = self.cs.servers.get(1234)
27 self.assertEqual(b'FooBar123',
28- s.get_password('novaclient/tests/idfake.pem'))
29+ s.get_password('%PYTHON_SITEPACKAGES_DIR%/novaclient/tests/idfake.pem'))
30 self.assert_called('GET', '/servers/1234/os-server-password')
31
32 def test_get_password_without_key(self):