Merge remote-tracking branch 'origin/pr/260'
* origin/pr/260: tests: handle /qubes-mac mac address: lowercase of default value as in _setter_mac qubesdb: add qubes-mac path entry
This commit is contained in:
commit
7cc5c66f93
@ -1231,7 +1231,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase):
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<interface type="ethernet">
|
||||
<mac address="00:16:3E:5E:6C:00" />
|
||||
<mac address="00:16:3e:5e:6c:00" />
|
||||
<ip address="10.137.0.1" />
|
||||
{extra_ip}
|
||||
<backenddomain name="test-inst-netvm" />
|
||||
@ -1384,6 +1384,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase):
|
||||
'/qubes-iptables-header': iptables_header,
|
||||
'/qubes-service/qubes-update-check': '0',
|
||||
'/qubes-service/meminfo-writer': '1',
|
||||
'/qubes-mac': '00:16:3e:5e:6c:00',
|
||||
'/qubes-ip': '10.137.0.3',
|
||||
'/qubes-netmask': '255.255.255.255',
|
||||
'/qubes-gateway': '10.137.0.2',
|
||||
@ -1427,6 +1428,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase):
|
||||
del expected['/qubes-ip6']
|
||||
del expected['/qubes-primary-dns']
|
||||
del expected['/qubes-secondary-dns']
|
||||
del expected['/qubes-mac']
|
||||
expected['/qubes-netvm-primary-dns'] = '10.139.1.1'
|
||||
expected['/qubes-netvm-secondary-dns'] = '10.139.1.2'
|
||||
expected['/qubes-netvm-network'] = '10.137.0.2'
|
||||
|
@ -94,7 +94,7 @@ def _setter_provides_network(self, prop, value):
|
||||
class NetVMMixin(qubes.events.Emitter):
|
||||
''' Mixin containing network functionality '''
|
||||
mac = qubes.property('mac', type=str,
|
||||
default='00:16:3E:5E:6C:00',
|
||||
default='00:16:3e:5e:6c:00',
|
||||
setter=_setter_mac,
|
||||
doc='MAC address of the NIC emulated inside VM')
|
||||
|
||||
|
@ -2077,6 +2077,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
self.untrusted_qdb.write('/qubes-netvm-{}-dns'.format(i), addr)
|
||||
|
||||
if self.netvm is not None:
|
||||
self.untrusted_qdb.write('/qubes-mac', str(self.mac))
|
||||
self.untrusted_qdb.write('/qubes-ip', str(self.visible_ip))
|
||||
self.untrusted_qdb.write('/qubes-netmask',
|
||||
str(self.visible_netmask))
|
||||
|
Loading…
Reference in New Issue
Block a user