~openstack-charmers/charms/trusty/swift-storage/trunk

« back to all changes in this revision

Viewing changes to charmhelpers/contrib/openstack/context.py

  • Committer: James Page
  • Date: 2016-03-03 11:50:13 UTC
  • Revision ID: james.page@ubuntu.com-20160303115013-4cf5brhd8skxuq9u
Resync charm-helpers

Resolve single unit deployment failure with default configuration;
update unit tests to ensure that mkdir is called for /srv/node.

Change-Id: Id5518a2144ec3bdc6341f6dfc85835ae342f490e

Show diffs side-by-side

added added

removed removed

Lines of Context:
410
410
                auth_host = format_ipv6_addr(auth_host) or auth_host
411
411
                svc_protocol = rdata.get('service_protocol') or 'http'
412
412
                auth_protocol = rdata.get('auth_protocol') or 'http'
 
413
                api_version = rdata.get('api_version') or '2.0'
413
414
                ctxt.update({'service_port': rdata.get('service_port'),
414
415
                             'service_host': serv_host,
415
416
                             'auth_host': auth_host,
418
419
                             'admin_user': rdata.get('service_username'),
419
420
                             'admin_password': rdata.get('service_password'),
420
421
                             'service_protocol': svc_protocol,
421
 
                             'auth_protocol': auth_protocol})
 
422
                             'auth_protocol': auth_protocol,
 
423
                             'api_version': api_version})
422
424
 
423
425
                if self.context_complete(ctxt):
424
426
                    # NOTE(jamespage) this is required for >= icehouse
1471
1473
                    rdata.get('service_protocol') or 'http',
1472
1474
                    'auth_protocol':
1473
1475
                    rdata.get('auth_protocol') or 'http',
 
1476
                    'api_version':
 
1477
                    rdata.get('api_version') or '2.0',
1474
1478
                }
1475
1479
                if self.context_complete(ctxt):
1476
1480
                    return ctxt