Drop assess_status() as it's duplicating work done by set_os_workload_status().

This commit is contained in:
Corey Bryant 2015-10-09 12:00:26 +00:00
parent 39e1045899
commit 1a02c96e7e
2 changed files with 1 additions and 15 deletions

View File

@ -7,7 +7,6 @@ from lib.swift_storage_utils import (
PACKAGES,
RESTART_MAP,
SWIFT_SVCS,
assess_status,
determine_block_devices,
do_openstack_upgrade,
ensure_swift_directories,
@ -167,8 +166,7 @@ def main():
hooks.execute(sys.argv)
except UnregisteredHookError as e:
log('Unknown hook {} - skipping.'.format(e))
set_os_workload_status(CONFIGS, REQUIRED_INTERFACES,
charm_func=assess_status)
set_os_workload_status(CONFIGS, REQUIRED_INTERFACES)
if __name__ == '__main__':

View File

@ -344,15 +344,3 @@ socket options = SO_KEEPALIVE
f = open('/etc/rsyncd.conf', 'w')
f.write(rsyncd_base)
f.close()
def assess_status(configs):
"""Assess status of current unit"""
# Verify swift-hash received from swift-proxy
ctxt = SwiftStorageContext()()
if len(relation_ids('swift-storage')) < 1:
return '', ''
elif not ctxt or not ctxt['swift_hash']:
return 'blocked', 'Missing swift-hash from proxy relation'
else:
return 'active', 'Unit is ready'