diff options
author | 2017-03-23 06:19:54 -0700 | |
---|---|---|
committer | 2017-03-23 06:19:54 -0700 | |
commit | 88df88a19674ccc0017836941b8ee32eaadf19fb (patch) | |
tree | f930c90f75846ec8d8e33cf27325ff8fafc85d5c /charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py | |
parent | 9f50a40437477432a21b326b15c343ca6b8fe516 (diff) |
Deleted charms with wrong license. Will source them differently in future.
Change-Id: I0fc99ea03c6b6ca4701e63793cb2be60e56c7588
Signed-off-by: Stuart Mackie <wsmackie@juniper.net>
Diffstat (limited to 'charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py')
-rw-r--r-- | charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py b/charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py deleted file mode 100644 index 6bab06e..0000000 --- a/charms/trusty/ceilometer-contrail/hooks/ceilometer_contrail_utils.py +++ /dev/null @@ -1,25 +0,0 @@ -from collections import OrderedDict - -import yaml - -from charmhelpers.core.hookenv import ( - related_units, - relation_get, - relation_ids -) - -def ordereddict_representer(dumper, data): - return dumper.represent_mapping("tag:yaml.org,2002:map", data.items()) - -yaml.add_representer(OrderedDict, ordereddict_representer) - -def contrail_analytics_api_units(): - """Return a list of contrail analytics api units""" - return [ unit for rid in relation_ids("contrail-analytics-api") - for unit in related_units(rid) - if relation_get("port", unit, rid) ] - -def units(relation): - """Return a list of units for the specified relation""" - return [ unit for rid in relation_ids(relation) - for unit in related_units(rid) ] |