api/admin: skip firewall in vm.Clone

This operation is going to be removed, so apply a quick fix for tests.

QubesOS/qubes-issues#2622
This commit is contained in:
Marek Marczykowski-Górecki 2017-06-26 13:06:22 +02:00
parent 26013122a0
commit 65d15e6040
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 2 additions and 2 deletions

View File

@ -853,7 +853,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
dst_vm.clone_properties(src_vm) dst_vm.clone_properties(src_vm)
dst_vm.tags.update(src_vm.tags) dst_vm.tags.update(src_vm.tags)
dst_vm.features.update(src_vm.features) dst_vm.features.update(src_vm.features)
dst_vm.firewall.clone(src_vm.firewall) #dst_vm.firewall.clone(src_vm.firewall)
for devclass in src_vm.devices: for devclass in src_vm.devices:
for device_assignment in src_vm.devices[devclass].assignments(): for device_assignment in src_vm.devices[devclass].assignments():
dst_vm.devices[devclass].attach(device_assignment.clone()) dst_vm.devices[devclass].attach(device_assignment.clone())

View File

@ -1250,7 +1250,7 @@ class TC_00_VMs(AdminAPITestCase):
self.assertEqual(vm.template, self.app.domains['test-template']) self.assertEqual(vm.template, self.app.domains['test-template'])
self.assertEqual(vm.tags, self.vm.tags) self.assertEqual(vm.tags, self.vm.tags)
self.assertEqual(vm.features, self.vm.features) self.assertEqual(vm.features, self.vm.features)
self.assertEqual(vm.firewall, self.vm.firewall) #self.assertEqual(vm.firewall, self.vm.firewall)
self.assertEqual(mock_clone.mock_calls, self.assertEqual(mock_clone.mock_calls,
[unittest.mock.call(self.app.domains['test-vm2']).clone( [unittest.mock.call(self.app.domains['test-vm2']).clone(
self.app.domains['test-vm1'])]) self.app.domains['test-vm1'])])