Exemplo n.º 1
0
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()
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
def remove_alias(name):
    key = 'dockyard/aliases/{name}'.format(**locals())
    kv.remove(key)
    if get_default() == name:
        remove_default()
Exemplo n.º 4
0
def remove_default():
    kv.remove('dockyard/default')
Exemplo n.º 5
0
def remove_alias(name):
    key = 'dockyard/aliases/{name}'.format(**locals())
    kv.remove(key)
    if get_default() == name:
        remove_default()
Exemplo n.º 6
0
def remove_default():
    kv.remove('dockyard/default')