diff options
3 files changed, 42 insertions, 43 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 index 5732d9a..37688d6 100644 --- 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 | |||
@@ -5,9 +5,11 @@ | |||
5 | novaclient/v3/client.py | 6 ++++++ | 5 | novaclient/v3/client.py | 6 ++++++ |
6 | 4 files changed, 32 insertions(+) | 6 | 4 files changed, 32 insertions(+) |
7 | 7 | ||
8 | --- a/novaclient/client.py | 8 | Index: git/novaclient/client.py |
9 | +++ b/novaclient/client.py | 9 | =================================================================== |
10 | @@ -87,6 +87,7 @@ | 10 | --- git.orig/novaclient/client.py |
11 | +++ git/novaclient/client.py | ||
12 | @@ -266,6 +266,7 @@ | ||
11 | self.timeout = None | 13 | self.timeout = None |
12 | 14 | ||
13 | self.times = [] # [("item", starttime, endtime), ...] | 15 | self.times = [] # [("item", starttime, endtime), ...] |
@@ -15,9 +17,9 @@ | |||
15 | 17 | ||
16 | self.management_url = self.bypass_url or None | 18 | self.management_url = self.bypass_url or None |
17 | self.auth_token = auth_token | 19 | self.auth_token = auth_token |
18 | @@ -139,6 +140,12 @@ | 20 | @@ -328,6 +329,12 @@ |
19 | def reset_timings(self): | 21 | else: |
20 | self.times = [] | 22 | return name, value |
21 | 23 | ||
22 | + def get_timings_max_len(self): | 24 | + def get_timings_max_len(self): |
23 | + return self.times_max_len | 25 | + return self.times_max_len |
@@ -28,7 +30,7 @@ | |||
28 | def http_log_req(self, method, url, kwargs): | 30 | def http_log_req(self, method, url, kwargs): |
29 | if not self.http_log_debug: | 31 | if not self.http_log_debug: |
30 | return | 32 | return |
31 | @@ -214,6 +221,9 @@ | 33 | @@ -441,6 +448,9 @@ |
32 | resp, body = self.request(url, method, **kwargs) | 34 | resp, body = self.request(url, method, **kwargs) |
33 | self.times.append(("%s %s" % (method, url), | 35 | self.times.append(("%s %s" % (method, url), |
34 | start_time, time.time())) | 36 | start_time, time.time())) |
@@ -38,9 +40,11 @@ | |||
38 | return resp, body | 40 | return resp, body |
39 | 41 | ||
40 | def _cs_request(self, url, method, **kwargs): | 42 | def _cs_request(self, url, method, **kwargs): |
41 | --- a/novaclient/openstack/common/apiclient/client.py | 43 | Index: git/novaclient/openstack/common/apiclient/client.py |
42 | +++ b/novaclient/openstack/common/apiclient/client.py | 44 | =================================================================== |
43 | @@ -90,6 +90,7 @@ | 45 | --- git.orig/novaclient/openstack/common/apiclient/client.py |
46 | +++ git/novaclient/openstack/common/apiclient/client.py | ||
47 | @@ -92,6 +92,7 @@ | ||
44 | self.user_agent = user_agent or self.user_agent | 48 | self.user_agent = user_agent or self.user_agent |
45 | 49 | ||
46 | self.times = [] # [("item", starttime, endtime), ...] | 50 | self.times = [] # [("item", starttime, endtime), ...] |
@@ -48,7 +52,7 @@ | |||
48 | self.timings = timings | 52 | self.timings = timings |
49 | 53 | ||
50 | # requests within the same session can reuse TCP connections from pool | 54 | # requests within the same session can reuse TCP connections from pool |
51 | @@ -142,6 +143,12 @@ | 55 | @@ -144,6 +145,12 @@ |
52 | def reset_timings(self): | 56 | def reset_timings(self): |
53 | self.times = [] | 57 | self.times = [] |
54 | 58 | ||
@@ -61,7 +65,7 @@ | |||
61 | def request(self, method, url, **kwargs): | 65 | def request(self, method, url, **kwargs): |
62 | """Send an http request with the specified characteristics. | 66 | """Send an http request with the specified characteristics. |
63 | 67 | ||
64 | @@ -173,6 +180,9 @@ | 68 | @@ -175,6 +182,9 @@ |
65 | if self.timings: | 69 | if self.timings: |
66 | self.times.append(("%s %s" % (method, url), | 70 | self.times.append(("%s %s" % (method, url), |
67 | start_time, time.time())) | 71 | start_time, time.time())) |
@@ -71,33 +75,31 @@ | |||
71 | self._http_log_resp(resp) | 75 | self._http_log_resp(resp) |
72 | 76 | ||
73 | if resp.status_code >= 400: | 77 | if resp.status_code >= 400: |
74 | --- a/novaclient/v1_1/client.py | 78 | Index: git/novaclient/v1_1/client.py |
75 | +++ b/novaclient/v1_1/client.py | 79 | =================================================================== |
76 | @@ -156,6 +156,12 @@ | 80 | --- git.orig/novaclient/v1_1/client.py |
77 | def reset_timings(self): | 81 | +++ git/novaclient/v1_1/client.py |
78 | self.client.reset_timings() | 82 | @@ -232,3 +232,9 @@ |
79 | 83 | credentials are wrong. | |
84 | """ | ||
85 | self.client.authenticate() | ||
86 | + | ||
80 | + def get_timings_max_len(self): | 87 | + def get_timings_max_len(self): |
81 | + return self.client.get_timings_max_len() | 88 | + return self.client.get_timings_max_len() |
82 | + | 89 | + |
83 | + def set_timings_max_len(self, new_len): | 90 | + def set_timings_max_len(self, new_len): |
84 | + self.client.set_timings_max_len(new_len) | 91 | + self.client.set_timings_max_len(new_len) |
85 | + | 92 | Index: git/novaclient/v3/client.py |
86 | def authenticate(self): | 93 | =================================================================== |
94 | --- git.orig/novaclient/v3/client.py | ||
95 | +++ git/novaclient/v3/client.py | ||
96 | @@ -194,3 +194,9 @@ | ||
97 | credentials are wrong. | ||
87 | """ | 98 | """ |
88 | Authenticate against the server. | 99 | self.client.authenticate() |
89 | --- a/novaclient/v3/client.py | 100 | + |
90 | +++ b/novaclient/v3/client.py | ||
91 | @@ -121,6 +121,12 @@ | ||
92 | def reset_timings(self): | ||
93 | self.client.reset_timings() | ||
94 | |||
95 | + def get_timings_max_len(self): | 101 | + def get_timings_max_len(self): |
96 | + return self.client.get_timings_max_len() | 102 | + return self.client.get_timings_max_len() |
97 | + | 103 | + |
98 | + def set_timings_max_len(self, new_len): | 104 | + def set_timings_max_len(self, new_len): |
99 | + self.client.set_timings_max_len(new_len) | 105 | + self.client.set_timings_max_len(new_len) |
100 | + | ||
101 | def authenticate(self): | ||
102 | """ | ||
103 | Authenticate against the server. | ||
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 index dff3edd..60d5984 100644 --- 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 | |||
@@ -17,19 +17,16 @@ Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | |||
17 | novaclient/tests/v1_1/test_servers.py | 2 +- | 17 | novaclient/tests/v1_1/test_servers.py | 2 +- |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/novaclient/tests/v1_1/test_servers.py b/novaclient/tests/v1_1/test_servers.py | 20 | Index: git/novaclient/tests/v1_1/test_servers.py |
21 | index a48204c..443adc3 100644 | 21 | =================================================================== |
22 | --- a/novaclient/tests/v1_1/test_servers.py | 22 | --- git.orig/novaclient/tests/v1_1/test_servers.py |
23 | +++ b/novaclient/tests/v1_1/test_servers.py | 23 | +++ git/novaclient/tests/v1_1/test_servers.py |
24 | @@ -462,7 +462,7 @@ class ServersTest(utils.TestCase): | 24 | @@ -489,7 +489,7 @@ |
25 | 25 | ||
26 | def test_get_password(self): | 26 | def test_get_password(self): |
27 | s = cs.servers.get(1234) | 27 | s = self.cs.servers.get(1234) |
28 | - self.assertEqual(s.get_password('novaclient/tests/idfake.pem'), | 28 | - self.assertEqual(s.get_password('novaclient/tests/idfake.pem'), |
29 | + self.assertEqual(s.get_password('%PYTHON_SITEPACKAGES_DIR%/novaclient/tests/idfake.pem'), | 29 | + self.assertEqual(s.get_password('%PYTHON_SITEPACKAGES_DIR%/novaclient/tests/idfake.pem'), |
30 | b'FooBar123') | 30 | b'FooBar123') |
31 | cs.assert_called('GET', '/servers/1234/os-server-password') | 31 | self.assert_called('GET', '/servers/1234/os-server-password') |
32 | 32 | ||
33 | -- | ||
34 | 1.9.3 | ||
35 | |||
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb index 3bb3aac..70cb39e 100644 --- a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb | |||
@@ -12,8 +12,8 @@ SRC_URI = "\ | |||
12 | file://novaclient-specify-full-path-to-test-certificate.patch \ | 12 | file://novaclient-specify-full-path-to-test-certificate.patch \ |
13 | " | 13 | " |
14 | 14 | ||
15 | PV="2.16.0+git${SRCPV}" | 15 | PV="2.18.1+git${SRCPV}" |
16 | SRCREV="9344f02649df65af26ca13b4d3443be73beb5d4e" | 16 | SRCREV="b21d6775685fc2ca9bd5c13e817343789d7ad6c5" |
17 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
18 | 18 | ||
19 | inherit setuptools | 19 | inherit setuptools |