mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Get the default base MAC address when creating a new router
This commit is contained in:
parent
49345aedd1
commit
78ad94f815
@ -89,6 +89,9 @@ class Router(object):
|
||||
id=self._id))
|
||||
self.console = self._hypervisor.baseconsole + self._id
|
||||
self.aux = self._hypervisor.baseaux + self._id
|
||||
|
||||
self._mac_addr = self._hypervisor.send("{platform} get_mac_addr {name}".format(platform=self._platform,
|
||||
name=self._name))[0]
|
||||
else:
|
||||
log.info("creating a new ghost IOS file")
|
||||
Router._instance_count -= 1
|
||||
|
@ -205,7 +205,7 @@ def test_get_slot_nio_bindings(router):
|
||||
|
||||
def test_mac_addr(router):
|
||||
|
||||
assert router.mac_addr == None # default value
|
||||
assert router.mac_addr != None
|
||||
router.mac_addr = "aa:aa:aa:aa:aa:aa"
|
||||
assert router.mac_addr == "aa:aa:aa:aa:aa:aa"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user