daemon: Initial support to allow multiple versions of XML scenario files.
This commit is contained in:
parent
3ffdf7c420
commit
104e68a712
3 changed files with 454 additions and 415 deletions
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# CORE
|
||||
# Copyright (c)2011-2013 the Boeing Company.
|
||||
# Copyright (c)2011-2014 the Boeing Company.
|
||||
# See the LICENSE file included in this distribution.
|
||||
#
|
||||
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
||||
|
@ -13,13 +13,14 @@ the main public interface here.
|
|||
|
||||
import os.path
|
||||
from core.netns import nodes
|
||||
from xmlparser import CoreDocumentParser
|
||||
from xmlparser import core_document_parser
|
||||
from xmlwriter import CoreDocumentWriter
|
||||
|
||||
def opensessionxml(session, filename, start=False, nodecls=nodes.CoreNode):
|
||||
''' Import a session from the EmulationScript XML format.
|
||||
'''
|
||||
doc = CoreDocumentParser(session, filename, start, nodecls)
|
||||
options = {'start': start, 'nodecls': nodecls}
|
||||
doc = core_document_parser(session, filename, options)
|
||||
if start:
|
||||
session.name = os.path.basename(filename)
|
||||
session.filename = filename
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue