aboutsummaryrefslogtreecommitdiff
path: root/myrpki.rototill/yamltest.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2010-03-09 18:19:21 +0000
committerRob Austein <sra@hactrn.net>2010-03-09 18:19:21 +0000
commitc728f40b499fbf0bf2c4fc2d196903611ff54d49 (patch)
treeb2bfa2305ec52fb3635eeaf266d3e1da2d4cb998 /myrpki.rototill/yamltest.py
parentcf75adec7819ce3f6c55c4364f3f31ca9ad42d09 (diff)
Merge myrpki.py and myirbe.py into setup.py, call result myrpki.py.
This will need refactoring at some point, but improving the user interface is the primary concern at the moment. svn path=/myrpki.rototill/myirbe.py; revision=3052
Diffstat (limited to 'myrpki.rototill/yamltest.py')
-rw-r--r--myrpki.rototill/yamltest.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/myrpki.rototill/yamltest.py b/myrpki.rototill/yamltest.py
index 7fb7b169..0871498c 100644
--- a/myrpki.rototill/yamltest.py
+++ b/myrpki.rototill/yamltest.py
@@ -67,9 +67,7 @@ this_dir = os.getcwd()
test_dir = cleanpath(this_dir, "test")
rpkid_dir = cleanpath(this_dir, "../rpkid")
-prog_myirbe = cleanpath(this_dir, "myirbe.py")
-prog_myrpki = cleanpath(this_dir, "myrpki.py")
-prog_setup = cleanpath(this_dir, "setup.py")
+prog_setup = cleanpath(this_dir, "myrpki.py")
prog_rpkid = cleanpath(rpkid_dir, "rpkid.py")
prog_irdbd = cleanpath(rpkid_dir, "irdbd.py")
prog_pubd = cleanpath(rpkid_dir, "pubd.py")
@@ -475,23 +473,19 @@ class allocation(object):
Run myirbe.py if this entity is not hosted by another engine.
"""
if not self.is_hosted():
- print "Running myirbe.py for", self.name
- cmd = ["python", prog_myirbe]
- cmd.extend(h.path("myrpki.xml") for h in self.hosts)
- subprocess.check_call(cmd, cwd = self.path())
+ self.run_setup("myirbe", *[h.path("myrpki.xml") for h in self.hosts])
def run_myrpki(self):
"""
Run myrpki.py for this entity.
"""
- print "Running myrpki.py for", self.name
- subprocess.check_call(("python", prog_myrpki), cwd = self.path())
+ self.run_setup("myrpki")
def run_setup(self, *args):
"""
Run setup.py for this entity.
"""
- print 'Running "%s" for %s' % (" ".join(("setup.py",) + args), self.name)
+ print 'Running "%s" for %s' % (" ".join(("myrpki",) + args), self.name)
subprocess.check_call(("python", prog_setup) + args, cwd = self.path())
def run_python_daemon(self, prog):