~sdn-charmers/charms/trusty/contrail-analytics/trunk

« back to all changes in this revision

Viewing changes to hooks/contrail_analytics_utils.py

  • Committer: Robert Ayres
  • Date: 2017-06-29 01:57:10 UTC
  • mfrom: (37.2.1 contrail-analytics)
  • Revision ID: robert.ayres@canonical.com-20170629015710-vg2ytz3f19mgdp2k
Merge Dmitrii Shcherbakov's changes (with modifications)

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
def contrail_api_ctx():
122
122
    ctxs = [ { "api_server": vip if vip \
123
123
                 else gethostbyname(relation_get("private-address", unit, rid)),
124
 
               "api_port": port }
 
124
               "api_port": port,
 
125
               "cloud_admin_role": relation_get("cloud-admin-role", unit, rid) }
125
126
             for rid in relation_ids("contrail-api")
126
127
             for unit, port, vip in
127
128
             ((unit, relation_get("port", unit, rid), relation_get("vip", unit, rid))
333
334
    ctx.update(cassandra_ctx())
334
335
    ctx.update(discovery_ctx())
335
336
    if version_compare(CONTRAIL_VERSION, "3.0") >= 0:
 
337
        ctx["rbac"] = True
336
338
        ctx["cassandra"] = True
337
339
    if version_compare(CONTRAIL_VERSION, "3.1") >= 0:
338
340
        ctx["contrail_api"] = True