示例#1
0
文件: utils.py 项目: biggtfish/armada
def deregister_services(container_id):
    services_dict = consul_query('agent/services')
    for service_id, service_dict in services_dict.items():
        if service_id.startswith(container_id):
            consul_get('agent/service/deregister/{service_id}'.format(**locals()))
            try:
                kv.remove("start_timestamp/" + container_id)
            except Exception as e:
                traceback.print_exc()
示例#2
0
文件: utils.py 项目: hunterfu/armada
def deregister_services(container_id):
    services_dict = consul_query('agent/services')
    for service_id, service_dict in services_dict.items():
        if service_id.startswith(container_id):
            consul_get(
                'agent/service/deregister/{service_id}'.format(**locals()))
            try:
                kv.remove("start_timestamp/" + container_id)
            except Exception as e:
                traceback.print_exc()
示例#3
0
文件: alias.py 项目: yonglehou/armada
def remove_alias(name):
    key = 'dockyard/aliases/{name}'.format(**locals())
    kv.remove(key)
    if get_default() == name:
        remove_default()
示例#4
0
文件: alias.py 项目: yonglehou/armada
def remove_default():
    kv.remove('dockyard/default')
示例#5
0
文件: alias.py 项目: hunterfu/armada
def remove_alias(name):
    key = 'dockyard/aliases/{name}'.format(**locals())
    kv.remove(key)
    if get_default() == name:
        remove_default()
示例#6
0
文件: alias.py 项目: hunterfu/armada
def remove_default():
    kv.remove('dockyard/default')