aboutsummaryrefslogtreecommitdiffstats
path: root/charms/trusty/kafka/actions/list-zks
diff options
context:
space:
mode:
authorStuart Mackie <wsmackie@juniper.net>2017-03-23 06:19:54 -0700
committerStuart Mackie <wsmackie@juniper.net>2017-03-23 06:19:54 -0700
commit88df88a19674ccc0017836941b8ee32eaadf19fb (patch)
treef930c90f75846ec8d8e33cf27325ff8fafc85d5c /charms/trusty/kafka/actions/list-zks
parent9f50a40437477432a21b326b15c343ca6b8fe516 (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/kafka/actions/list-zks')
-rwxr-xr-xcharms/trusty/kafka/actions/list-zks28
1 files changed, 0 insertions, 28 deletions
diff --git a/charms/trusty/kafka/actions/list-zks b/charms/trusty/kafka/actions/list-zks
deleted file mode 100755
index 9de9e9a..0000000
--- a/charms/trusty/kafka/actions/list-zks
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import sys
-
-try:
- from charmhelpers.core import hookenv
- from charmhelpers.core import unitdata
- from jujubigdata import utils
- from jujubigdata.relations import Zookeeper
- charm_ready = unitdata.kv().get('charm.active', False)
-except ImportError:
- charm_ready = False
-
-if not charm_ready:
- # might not have hookenv.action_fail available yet
- from subprocess import call
- call(['action-fail', 'Kafka service not yet ready'])
-
-if Zookeeper().connected_units() and Zookeeper().is_ready():
- zks = []
- for unit, data in Zookeeper().filtered_data().items():
- ip = utils.resolve_private_address(data['private-address'])
- zks.append("%s:%s" % (ip, data['port']))
- zks.sort()
- zookeepers = ",".join(zks)
- hookenv.action_set({'zookeepers': zookeepers})
-else:
- hookenv.action_fail('Zookeeper relation is not present/ready')
- sys.exit()