Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I2e46402a1200129f68009994b37d59eadfb39a89
@classmethod
def _get_file(cls):
@classmethod
def _get_file(cls):
- topo_bi_dir_file = "sample_configs/honeynode-topo.xml"
+ topo_bi_dir_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ "..", "..", "sample_configs", "honeynode-topo.xml")
if os.path.isfile(topo_bi_dir_file):
with open(topo_bi_dir_file, 'r') as topo_bi_dir:
cls.simple_topo_bi_dir_data = topo_bi_dir.read()
if os.path.isfile(topo_bi_dir_file):
with open(topo_bi_dir_file, 'r') as topo_bi_dir:
cls.simple_topo_bi_dir_data = topo_bi_dir.read()
- topo_uni_dir_file = "sample_configs/NW-simple-topology.xml"
+ topo_uni_dir_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ "..", "..", "sample_configs", "NW-simple-topology.xml")
if os.path.isfile(topo_uni_dir_file):
with open(topo_uni_dir_file, 'r') as topo_uni_dir:
cls.simple_topo_uni_dir_data = topo_uni_dir.read()
if os.path.isfile(topo_uni_dir_file):
with open(topo_uni_dir_file, 'r') as topo_uni_dir:
cls.simple_topo_uni_dir_data = topo_uni_dir.read()
- topo_uni_dir_complex_file = "sample_configs/NW-for-test-5-4.xml"
+ topo_uni_dir_complex_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+ "..", "..", "sample_configs", "NW-for-test-5-4.xml")
if os.path.isfile(topo_uni_dir_complex_file):
with open(topo_uni_dir_complex_file, 'r') as topo_uni_dir_complex:
cls.complex_topo_uni_dir_data = topo_uni_dir_complex.read()
if os.path.isfile(topo_uni_dir_complex_file):
with open(topo_uni_dir_complex_file, 'r') as topo_uni_dir_complex:
cls.complex_topo_uni_dir_data = topo_uni_dir_complex.read()