Add an endpoint for exporting the initial config file

This commit is contained in:
Julien Duponchelle committed 2015-02-17 14:52:51 +01:00
1 parent 57348d0508
commit 0e98497a99
4 files changed
+80 -4

No files matched your search

+15
View File
@@ -889,6 +889,21 @@ class IOUVM(BaseVM):
else:
return None
@property
def relative_initial_config_file(self):
"""
Returns the initial config file relative to the project directory.
It's compatible with pre 1.3 topologies.
:returns: path to config file. None if the file doesn't exist
"""
path = os.path.join(self.working_dir, 'initial-config.cfg')
if os.path.exists(path):
return path.replace(self.project.path, "")[1:]
else:
return None
@asyncio.coroutine
def start_capture(self, adapter_number, port_number, output_file, data_link_type="DLT_EN10MB"):
"""