daemon: Initial support for exporting a scenario using the new NRL

Network Modeling Framework (NMF) XML representation.
This commit is contained in:
tgoff0@gmail.com 2015-05-22 00:53:01 +00:00
parent 55d14b78fb
commit 39903c247e
4 changed files with 994 additions and 3 deletions

View file

@ -3,10 +3,13 @@
# See the LICENSE file included in this distribution.
from xmlwriter0 import CoreDocumentWriter0
from xmlwriter1 import CoreDocumentWriter1
def core_document_writer(session, version):
if version == 0.0:
if version == '0.0':
doc = CoreDocumentWriter0(session)
elif version == '1.0':
doc = CoreDocumentWriter1(session)
else:
raise ValueError, 'unsupported document version: %s' % version
return doc