Example #1
0
 def drop_ip(self, endpoint_name, ip):
     logging.info("Dropping endpoint %s IP %s" % (endpoint_name, ip))
     self.zk_conn.delete(paths.endpoint_ip_metrics(endpoint_name, ip))
     self.zk_conn.delete(paths.confirmed_ip(endpoint_name, ip))
     self.zk_conn.delete(paths.ip_address(ip))
     for name in self.config.loadbalancer_names():
         self.zk_conn.delete(paths.loadbalancer_ip(name, ip))
Example #2
0
 def confirm_ip(self, endpoint_name, ip):
     logging.info("Adding endpoint %s IP %s" % (endpoint_name, ip))
     self.zk_conn.write(paths.confirmed_ip(endpoint_name, ip), "")
     self.zk_conn.write(paths.ip_address(ip), endpoint_name)
Example #3
0
 def get_ip_address_endpoint(self, ip_address):
     """
     Returns the endpoint name associated with this ip address.
     """
     return self.zk_conn.read(paths.ip_address(ip_address))