gregtampa / coreemu

Automatically exported from code.google.com/p/coreemu
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

custom router configs for nodes are not loaded correctly from xml config file type #281

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create 2 router nodes (n1 and n2)
2. Create link between n1 and n2
3. edit n1 services -> zebra config file
4. zebra on node n1 will default to "Use text below from thile contents".  Add 
custom text to this area such as a new comment line #test.
5. repeat steps 3 and 4 on n2
6. save as XML

7. verify xml has the correct contents.  You can see the n1 and n2 quagga confs 
are different.

    <Node name="n1">
        <File name="/usr/local/etc/quagga/Quagga.conf">interface eth0
  ip address 10.0.0.1/24
  ipv6 address 2001::1/64
!
router ospf
  router-id 10.0.0.1
  network 10.0.0.0/24 area 0
!
router ospf6
  router-id 10.0.0.1
  interface eth0 area 0.0.0.0
!

#test1</File>

    <Node name="n2">
        <File name="/usr/local/etc/quagga/Quagga.conf">interface eth0
  ip address 10.0.0.2/24
  ipv6 address 2001::2/64
!
router ospf
  router-id 10.0.0.2
  network 10.0.0.0/24 area 0
!
router ospf6
  router-id 10.0.0.2
  interface eth0 area 0.0.0.0
!

#test1</File>

8. Load xml in the gui
9. Look at the n1 nodes Quagga.conf info and it will have the n2 config.

Please note:
This happens for any number of nodes where the config from the last nX node is 
applied to all nodes if your are using a the "Use text below from thile 
contents" options with custom configs or using the "Copy this source file" 
option.

What is the expected output? What do you see instead?
each node that uses a custom xml file should have its config file loaded. The 
current behavior is the last node in the list that uses a custom file will have 
this config applied to all custom config nodes.

What version of the product are you using? On what operating system?
core 4.7 (20140806) on fedora 21 x86_64

Please provide any additional information below.
The issue does not occur when loading a imn file with the same configuration.

the issue also occurs when your load the xml directly in python with something 
like.
session = core.pycore.Session(persistent=True)
core.misc.xmlutils.opensessionxml(session, "test.xml",start=True)

Original issue reported on code.google.com by jeremy.a...@gmail.com on 26 May 2015 at 4:45