def test_key_for_endpoint(self): self.assertEqual( key_for_endpoint("foo", "openstack", "wl1", "ep2"), "/calico/v1/host/foo/workload/openstack/wl1/endpoint/ep2")
def test_key_for_endpoint(self): self.assertEqual( key_for_endpoint("foo", "openstack", "wl1", "ep2"), "/calico/v1/host/foo/workload/openstack/wl1/endpoint/ep2", )
def port_etcd_key(port): """Determine what the etcd key is for a port.""" return datamodel_v1.key_for_endpoint(port['binding:host_id'], "openstack", port['device_id'], port['id'])
def port_etcd_key(port): """Determine what the etcd key is for a port.""" return datamodel_v1.key_for_endpoint(port['binding:host_id'], "openstack", port['device_id'], port['id'])