From: Brian Warner Date: Wed, 23 May 2007 19:48:52 +0000 (-0700) Subject: node.py: use 'node.pem' for all nodes X-Git-Tag: allmydata-tahoe-0.3.0~65 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/frontends/something?a=commitdiff_plain;h=f9e45391f63584bae9bed96c6b7df7d5c0023649;p=tahoe-lafs%2Ftahoe-lafs.git node.py: use 'node.pem' for all nodes Rather than use separate client.pem and introducer.pem files, use 'node.pem' for all nodes regardless of what type it is. This is slightly cleaner, but introduces a compatibility. Users who upgrade to this change should do 'mv client.pem node.pem' to avoid generating a new certificate and thus changing their TubID. --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 687c21f9..e4e142c1 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -19,7 +19,6 @@ from allmydata.introducer import IntroducerClient class Client(node.Node, Referenceable): implements(RIClient) - CERTFILE = "client.pem" PORTNUMFILE = "client.port" STOREDIR = 'storage' NODETYPE = "client" diff --git a/src/allmydata/introducer_and_vdrive.py b/src/allmydata/introducer_and_vdrive.py index cfea26e2..506331a8 100644 --- a/src/allmydata/introducer_and_vdrive.py +++ b/src/allmydata/introducer_and_vdrive.py @@ -6,7 +6,6 @@ from allmydata.introducer import Introducer class IntroducerAndVdrive(node.Node): - CERTFILE = "introducer.pem" PORTNUMFILE = "introducer.port" NODETYPE = "introducer" diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 9bd22000..44b9d15f 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -21,7 +21,7 @@ class Node(service.MultiService): # nodes, and Vdrive nodes NODETYPE = "unknown NODETYPE" PORTNUMFILE = None - CERTFILE = None + CERTFILE = "node.pem" LOCAL_IP_FILE = "advertised_ip_addresses" NODEIDFILE = "my_nodeid" @@ -29,7 +29,6 @@ class Node(service.MultiService): service.MultiService.__init__(self) self.basedir = os.path.abspath(basedir) self._tub_ready_observerlist = observer.OneShotObserverList() - assert self.CERTFILE, "Your node.Node subclass must provide CERTFILE" certfile = os.path.join(self.basedir, self.CERTFILE) self.tub = Tub(certFile=certfile) self.tub.setOption("logLocalFailures", True)