diff options
Diffstat (limited to 'rpkid/rpki/rpkic.py')
-rw-r--r-- | rpkid/rpki/rpkic.py | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/rpkid/rpki/rpkic.py b/rpkid/rpki/rpkic.py index 2849aa12..6af63126 100644 --- a/rpkid/rpki/rpkic.py +++ b/rpkid/rpki/rpkic.py @@ -252,7 +252,7 @@ class main(rpki.cli.Cmd): r, child_handle = self.zoo.configure_child(argv[0], child_handle) r.save("%s.%s.parent-response.xml" % (self.zoo.handle, child_handle), sys.stdout) - self.zoo.synchronize() + self.zoo.synchronize_ca() def do_delete_child(self, arg): @@ -262,7 +262,7 @@ class main(rpki.cli.Cmd): try: self.zoo.delete_child(arg) - self.zoo.synchronize() + self.zoo.synchronize_ca() except rpki.irdb.Child.DoesNotExist: print "No such child \"%s\"" % arg @@ -309,7 +309,7 @@ class main(rpki.cli.Cmd): try: self.zoo.delete_parent(arg) - self.zoo.synchronize() + self.zoo.synchronize_ca() except rpki.irdb.Parent.DoesNotExist: print "No such parent \"%s\"" % arg @@ -324,7 +324,7 @@ class main(rpki.cli.Cmd): try: self.zoo.delete_rootd() - self.zoo.synchronize() + self.zoo.synchronize_ca() except rpki.irdb.Rootd.DoesNotExist: print "No associated rootd" @@ -355,7 +355,7 @@ class main(rpki.cli.Cmd): r.save("%s.repository-response.xml" % client_handle.replace("/", "."), sys.stdout) try: - self.zoo.synchronize() + self.zoo.synchronize_pubd() except rpki.irdb.Repository.DoesNotExist: pass @@ -367,7 +367,7 @@ class main(rpki.cli.Cmd): try: self.zoo.delete_publication_client(arg).delete() - self.zoo.synchronize() + self.zoo.synchronize_pubd() except rpki.irdb.Client.DoesNotExist: print "No such client \"%s\"" % arg @@ -396,7 +396,7 @@ class main(rpki.cli.Cmd): raise BadCommandSyntax, "Need to specify filename for repository.xml on command line" self.zoo.configure_repository(argv[0], parent_handle) - self.zoo.synchronize() + self.zoo.synchronize_ca() def do_delete_repository(self, arg): """ @@ -408,7 +408,7 @@ class main(rpki.cli.Cmd): try: self.zoo.delete_repository(arg) - self.zoo.synchronize() + self.zoo.synchronize_ca() except rpki.irdb.Repository.DoesNotExist: print "No such repository \"%s\"" % arg @@ -422,7 +422,7 @@ class main(rpki.cli.Cmd): """ self.zoo.delete_self() - self.zoo.synchronize() + self.zoo.synchronize_deleted_ca() def do_renew_child(self, arg): @@ -441,7 +441,9 @@ class main(rpki.cli.Cmd): raise BadCommandSyntax, "Need to specify child handle" self.zoo.renew_children(argv[0], valid_until) - self.zoo.synchronize(self.zoo.handle) + self.zoo.synchronize_ca() + if self.autosync: + self.zoo.run_rpkid_now() def complete_renew_child(self, *args): return self.irdb_handle_complete(self.zoo.resource_ca.children, *args) @@ -463,7 +465,9 @@ class main(rpki.cli.Cmd): raise BadCommandSyntax, "Unexpected arguments" self.zoo.renew_children(None, valid_until) - self.zoo.synchronize(self.zoo.handle) + self.zoo.synchronize_ca() + if self.autosync: + self.zoo.run_rpkid_now() def do_load_prefixes(self, arg): @@ -478,7 +482,7 @@ class main(rpki.cli.Cmd): self.zoo.load_prefixes(argv[0], True) if self.autosync: - self.zoo.synchronize(self.zoo.handle) + self.zoo.run_rpkid_now() def do_show_child_resources(self, arg): @@ -513,7 +517,7 @@ class main(rpki.cli.Cmd): self.zoo.load_asns(argv[0], True) if self.autosync: - self.zoo.synchronize(self.zoo.handle) + self.zoo.run_rpkid_now() def do_load_roa_requests(self, arg): @@ -528,7 +532,7 @@ class main(rpki.cli.Cmd): self.zoo.load_roa_requests(argv[0]) if self.autosync: - self.zoo.synchronize(self.zoo.handle) + self.zoo.run_rpkid_now() def do_synchronize(self, arg): @@ -542,7 +546,7 @@ class main(rpki.cli.Cmd): if arg: raise BadCommandSyntax("Unexpected argument(s): %r" % arg) - self.zoo.synchronize(self.zoo.handle) + self.zoo.synchronize() def do_force_publication(self, arg): |