Skip to content

Commit

Permalink
Tidy up fetcd.py:
Browse files Browse the repository at this point in the history
* FelixEtcdWatcher no longer an EtcdWatcher subclass.
* Move status cleanup to the StatusReporter.
* Remove ResyncRequired exception.
  • Loading branch information
Shaun Crampton committed Oct 27, 2015
1 parent 7c0345c commit a3a96ce
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 189 deletions.
6 changes: 6 additions & 0 deletions calico/datamodel_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ def path_for_status(self):
def __str__(self):
return self.__class__.__name__ + ("<%s>" % self.endpoint)

def __repr__(self):
return self.__class__.__name__ + ("(%r,%r,%r,%r)" % (self.host,
self.orchestrator,
self.workload,
self.endpoint))

def __eq__(self, other):
if other is self:
return True
Expand Down
12 changes: 12 additions & 0 deletions calico/etcddriver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@

FLUSH_THRESHOLD = 200

# TODO: trigger immediate resync if these are deleted?
# RESYNC_KEYS = [
# VERSION_DIR,
# POLICY_DIR,
# PROFILE_DIR,
# CONFIG_DIR,
# HOST_DIR,
# IPAM_DIR,
# IPAM_V4_DIR,
# POOL_V4_DIR,
# ]


class EtcdDriver(object):
def __init__(self, felix_sck):
Expand Down
Loading

0 comments on commit a3a96ce

Please sign in to comment.