Fix same base MAC for duplicated IOS routers. Fixes #1264.

pull/1302/head
grossmj 7 years ago
parent e5e2b7a8ac
commit c281f55fb2

@ -17,7 +17,6 @@
import asyncio import asyncio
from ...error import NodeError
from ...base_node import BaseNode from ...base_node import BaseNode
import logging import logging

@ -17,7 +17,6 @@
import asyncio import asyncio
from ...error import NodeError
from ...base_node import BaseNode from ...base_node import BaseNode
import logging import logging

@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys import sys
import asyncio
from .cloud import Cloud from .cloud import Cloud
from ...error import NodeError from ...error import NodeError

@ -946,10 +946,11 @@ class Project:
raise aiohttp.web.HTTPConflict(text="Cannot duplicate node data while the node is running") raise aiohttp.web.HTTPConflict(text="Cannot duplicate node data while the node is running")
data = copy.deepcopy(node.__json__(topology_dump=True)) data = copy.deepcopy(node.__json__(topology_dump=True))
# Some properties like internal ID should not be duplicate # Some properties like internal ID should not be duplicated
for unique_property in ( for unique_property in (
'node_id', 'node_id',
'name', 'name',
'mac_addr',
'compute_id', 'compute_id',
'application_id', 'application_id',
'dynamips_id'): 'dynamips_id'):

Loading…
Cancel
Save