Merge lp:~ajkavanagh/openstack-mojo-specs/mojo-openstack-specs-fix-novaclient into lp:openstack-mojo-specs

Proposed by Alex Kavanagh
Status: Merged
Approved by: Ryan Beisner
Approved revision: 251
Merged at revision: 252
Proposed branch: lp:~ajkavanagh/openstack-mojo-specs/mojo-openstack-specs-fix-novaclient
Merge into: lp:openstack-mojo-specs
Diff against target: 28 lines (+4/-4)
1 file modified
helper/utils/mojo_os_utils.py (+4/-4)
To merge this branch: bzr merge lp:~ajkavanagh/openstack-mojo-specs/mojo-openstack-specs-fix-novaclient
Reviewer Review Type Date Requested Status
Ryan Beisner Approve
Review via email: mp+291734@code.launchpad.net

Description of the change

On a xenial test running, the xenial package for novaclient no longer includes the novaclient.v1_1 or .v2 modules - they've been deprecated for a while. This change changes the import and uses the newer client - this should be compatible with both trusty and xenial test runners, but may break precise test runners. This does NOT affect precise units under test as the code change only runs on the test runner.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2262 mojo-openstack-specs for ajkavanagh mp291734
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/2262/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

We will need to run this "live" in osci against some edges to make sure the updated client approach works with Precise --> Xenial test targets. Please wait to merge until I confirm here. Thank you.

review: Needs Information
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Looks good in spot checks @ Precise (stable charms) and a few Trusty-* combos. Thanks for the mods!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'helper/utils/mojo_os_utils.py'
2--- helper/utils/mojo_os_utils.py 2016-04-05 03:40:36 +0000
3+++ helper/utils/mojo_os_utils.py 2016-04-13 11:01:03 +0000
4@@ -7,8 +7,7 @@
5 from keystoneclient.v3 import client as keystoneclient_v3
6 from keystoneclient import session
7 import mojo_utils
8-from novaclient.v1_1 import client as novaclient
9-from novaclient.v2 import client as novaclient_v2
10+from novaclient import client as novaclient_client
11 from neutronclient.v2_0 import client as neutronclient
12 import logging
13 import re
14@@ -78,11 +77,12 @@
15 def get_nova_client(novarc_creds, insecure=True):
16 nova_creds = get_nova_creds(novarc_creds)
17 nova_creds['insecure'] = insecure
18- return novaclient.Client(**nova_creds)
19+ nova_creds['version'] = 2
20+ return novaclient_client.Client(**nova_creds)
21
22
23 def get_nova_session_client(session):
24- return novaclient_v2.Client(session=session)
25+ return novaclient_client.Client(2, session=session)
26
27
28 def get_neutron_client(novarc_creds, insecure=True):

Subscribers

People subscribed via source and target branches