diff options
author | Michael Elkins <melkins@tislabs.com> | 2010-10-28 22:49:58 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2010-10-28 22:49:58 +0000 |
commit | 2578e9ec1c9f650bdd7f87e90f1f0c6ac71bbc6d (patch) | |
tree | ce42de0876bd793f64ea39cc79f2dfff4069c20f /portal-gui/rpkigui/myrpki/glue.py | |
parent | 27675178bf01051eba5351ac8a17abc6c095026b (diff) |
don't run configure_resources when the user is a front-end for rpkidemo
svn path=/portal-gui/rpkigui/myrpki/glue.py; revision=3506
Diffstat (limited to 'portal-gui/rpkigui/myrpki/glue.py')
-rw-r--r-- | portal-gui/rpkigui/myrpki/glue.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/portal-gui/rpkigui/myrpki/glue.py b/portal-gui/rpkigui/myrpki/glue.py index 009acc68..959a8da6 100644 --- a/portal-gui/rpkigui/myrpki/glue.py +++ b/portal-gui/rpkigui/myrpki/glue.py @@ -113,19 +113,21 @@ def configure_resources(handle): output_asns(cfg.get('asn_csv'), handle) output_prefixes(cfg.get('prefix_csv'), handle) output_roas(cfg.get('roa_csv'), handle) - run_rpkid = cfg.getboolean('run_rpkid') - cmd = 'daemons' if run_rpkid else 'resources' - invoke_rpki(handle.handle, ['configure_' + cmd]) - # handle the hosted case where some communication between rpkid operator - # and resource holder is required - if not run_rpkid: - xml_path = cfg.get('xml_filename') - if xml_path[0] != '/': - # convert to full path - xml_path = '%s/%s/%s' % (settings.MYRPKI_DATA_DIR, handle.handle, xml_path) - # send the myrpki.xml to the rpkid hosting me - invoke_rpki(handle.parents.all()[0].handle, ['configure_daemons', xml_path]) - # process the response - invoke_rpki(handle.handle, ['configure_resources']) + run_rpkidemo = cfg.getboolean('run_rpkidemo', False) + if not run_rpkidemo: + run_rpkid = cfg.getboolean('run_rpkid') + cmd = 'daemons' if run_rpkid else 'resources' + invoke_rpki(handle.handle, ['configure_' + cmd]) + # handle the hosted case where some communication between rpkid operator + # and resource holder is required + if not run_rpkid: + xml_path = cfg.get('xml_filename') + if xml_path[0] != '/': + # convert to full path + xml_path = '%s/%s/%s' % (settings.MYRPKI_DATA_DIR, handle.handle, xml_path) + # send the myrpki.xml to the rpkid hosting me + invoke_rpki(handle.parents.all()[0].handle, ['configure_daemons', xml_path]) + # process the response + invoke_rpki(handle.handle, ['configure_resources']) # vim:sw=4 ts=8 expandtab |