parent
							
								
									7b9ee45c07
								
							
						
					
					
						commit
						756235d4f3
					
				| @ -179,7 +179,7 @@ class TC_10_QubesBase(qubesadmin.tests.QubesTestCase): | ||||
|             'memory': 'default=False type=int 400', | ||||
|             'kernel': 'default=False type=str 4.9.31', | ||||
|             'netvm': 'default=False type=vm test-net', | ||||
|             'hvm': 'default=False type=bool True', | ||||
|             'virt_mode': 'default=False type=str hvm', | ||||
|             'default_user': 'default=True type=str user', | ||||
|         } | ||||
|         self.app.expected_calls[ | ||||
|  | ||||
| @ -119,7 +119,7 @@ class BackupTestCase(qubesadmin.tests.QubesTestCase): | ||||
|         testvm2 = self.app.add_new_vm('StandaloneVM', | ||||
|                                       name=vmname, | ||||
|                                       label='red') | ||||
|         testvm2.hvm = True | ||||
|         testvm2.virt_mode = 'hvm' | ||||
|         testvm2.create_on_disk(pool=pool) | ||||
|         self.fill_image(testvm2.storage.export('root'), 1024 * 1024 * 1024, \ | ||||
|             True) | ||||
|  | ||||
| @ -467,7 +467,7 @@ parsed_qubes_xml_v4 = { | ||||
|             'klass': 'AppVM', | ||||
|             'label': 'red', | ||||
|             'properties': { | ||||
|                 'hvm': 'False', | ||||
|                 'virt_mode': 'hvm', | ||||
|                 'kernelopts': 'nopat i8042.nokbd i8042.noaux', | ||||
|                 'maxmem': '300', | ||||
|                 'memory': '300', | ||||
| @ -547,7 +547,7 @@ parsed_qubes_xml_v4 = { | ||||
|         'vault': { | ||||
|             'klass': 'AppVM', | ||||
|             'label': 'black', | ||||
|             'properties': {'hvm': 'False', 'maxmem': '1536', 'netvm': None}, | ||||
|             'properties': {'virt_mode': 'pv', 'maxmem': '1536', 'netvm': None}, | ||||
|             'devices': {}, | ||||
|             'tags': set(), | ||||
|             'features': {}, | ||||
| @ -591,7 +591,7 @@ parsed_qubes_xml_v4 = { | ||||
|             'klass': 'AppVM', | ||||
|             'label': 'red', | ||||
|             'properties': { | ||||
|                 'hvm': 'False', | ||||
|                 'virt_mode': 'pv', | ||||
|                 'autostart': 'True', | ||||
|                 'maxmem': '400', | ||||
|                 'provides_network': 'True', | ||||
| @ -620,7 +620,7 @@ parsed_qubes_xml_v4 = { | ||||
|         'test-hvm': { | ||||
|             'klass': 'StandaloneVM', | ||||
|             'label': 'purple', | ||||
|             'properties': {'hvm': 'True', 'maxmem': '4000'}, | ||||
|             'properties': {'virt_mode': 'hvm', 'maxmem': '4000'}, | ||||
|             'devices': {}, | ||||
|             'tags': set(), | ||||
|             'features': {'service.meminfo-writer': False}, | ||||
|  | ||||
| @ -257,7 +257,7 @@ | ||||
|     </domain> | ||||
|     <domain id="domain-9" class="StandaloneVM"> | ||||
|       <properties> | ||||
|         <property name="hvm">True</property> | ||||
|         <property name="virt_mode">hvm</property> | ||||
|         <property name="label">label-7</property> | ||||
|         <property name="maxmem">4000</property> | ||||
|         <property name="name">test-hvm</property> | ||||
| @ -356,7 +356,7 @@ | ||||
|     <domain id="domain-2" class="AppVM"> | ||||
|       <properties> | ||||
|         <property name="default_user">user</property> | ||||
|         <property name="hvm">False</property> | ||||
|         <property name="virt_mode">hvm</property> | ||||
|         <property name="label">label-1</property> | ||||
|         <property name="maxmem">300</property> | ||||
|         <property name="memory">300</property> | ||||
| @ -420,7 +420,7 @@ | ||||
|       <properties> | ||||
|         <property name="autostart">True</property> | ||||
|         <property name="label">label-1</property> | ||||
|         <property name="hvm">False</property> | ||||
|         <property name="virt_mode">pv</property> | ||||
|         <property name="maxmem">400</property> | ||||
|         <property name="name">sys-usb</property> | ||||
|         <property name="qid">5</property> | ||||
| @ -457,7 +457,7 @@ | ||||
|         <property name="qid">13</property> | ||||
|         <property name="uuid">d5284828-988d-46e2-8388-a09c495475e3</property> | ||||
|         <property name="template">fedora-25</property> | ||||
|         <property name="hvm">False</property> | ||||
|         <property name="virt_mode">pv</property> | ||||
|         <property name="maxmem">1536</property> | ||||
|       </properties> | ||||
|       <features/> | ||||
|  | ||||
| @ -110,7 +110,7 @@ class TC_90_List_with_qubesd_calls(qubesadmin.tests.QubesTestCase): | ||||
|             'label': b'type=label green', | ||||
|             'template': b'type=vm template1', | ||||
|             'netvm': b'type=vm sys-net', | ||||
| #           'hvm': b'type=bool False', | ||||
| #           'virt_mode': b'type=str pv', | ||||
|         } | ||||
|         for key, value in props.items(): | ||||
|             self.app.expected_calls[ | ||||
|  | ||||
| @ -156,8 +156,8 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase): | ||||
|             ('test-vm', 'admin.vm.property.Get', 'xid', None)] = \ | ||||
|                 b'0\x00default=False type=int 3000' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'hvm', None)] = \ | ||||
|                 b'0\x00default=False type=bool False' | ||||
|             ('test-vm', 'admin.vm.property.Get', 'virt_mode', None)] = \ | ||||
|                 b'0\x00default=False type=str pv' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.feature.CheckWithTemplate', | ||||
|             'no-monitor-layout', None)] = \ | ||||
| @ -190,8 +190,8 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase): | ||||
|             ('test-vm', 'admin.vm.property.Get', 'stubdom_xid', None)] = \ | ||||
|                 b'0\x00default=False type=int 3001' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'hvm', None)] = \ | ||||
|                 b'0\x00default=False type=bool True' | ||||
|             ('test-vm', 'admin.vm.property.Get', 'virt_mode', None)] = \ | ||||
|                 b'0\x00default=False type=str hvm' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'debug', None)] = \ | ||||
|                 b'0\x00default=False type=bool False' | ||||
| @ -230,8 +230,8 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase): | ||||
|             ('test-vm', 'admin.vm.property.Get', 'stubdom_xid', None)] = \ | ||||
|                 b'0\x00default=False type=int 3001' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'hvm', None)] = \ | ||||
|                 b'0\x00default=False type=bool True' | ||||
|             ('test-vm', 'admin.vm.property.Get', 'virt_mode', None)] = \ | ||||
|                 b'0\x00default=False type=str hvm' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'debug', None)] = \ | ||||
|                 b'0\x00default=False type=bool False' | ||||
| @ -310,8 +310,8 @@ class TC_00_qvm_start_gui(qubesadmin.tests.QubesTestCase): | ||||
|             'no-monitor-layout', None)] = \ | ||||
|             b'2\x00QubesFeatureNotFoundError\x00\x00Feature not set\x00' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'hvm', None)] = \ | ||||
|                 b'0\x00default=False type=bool True' | ||||
|             ('test-vm', 'admin.vm.property.Get', 'virt_mode', None)] = \ | ||||
|                 b'0\x00default=False type=str hvm' | ||||
|         self.app.expected_calls[ | ||||
|             ('test-vm', 'admin.vm.property.Get', 'xid', None)] = \ | ||||
|                 b'0\x00default=False type=int 3000' | ||||
|  | ||||
| @ -229,7 +229,7 @@ class FlagsColumn(Column): | ||||
|             ret = 'd' | ||||
| 
 | ||||
|         if ret is not None: | ||||
|             if getattr(vm, 'hvm', False): | ||||
|             if getattr(vm, 'virt_mode', 'pv') == 'hvm': | ||||
|                 return ret.upper() | ||||
|             return ret | ||||
| 
 | ||||
|  | ||||
| @ -187,7 +187,7 @@ class GUILauncher(object): | ||||
|         guid_cmd = self.common_guid_args(vm) | ||||
|         guid_cmd.extend(['-d', str(vm.xid)]) | ||||
| 
 | ||||
|         if vm.hvm: | ||||
|         if vm.virt_mode == 'hvm': | ||||
|             guid_cmd.extend(['-n']) | ||||
| 
 | ||||
|             if vm.features.check_with_template('rpc-clipboard', False): | ||||
| @ -231,7 +231,7 @@ class GUILauncher(object): | ||||
|         if not vm.features.check_with_template('gui', True): | ||||
|             return | ||||
| 
 | ||||
|         if vm.hvm: | ||||
|         if vm.virt_mode == 'hvm': | ||||
|             if force_stubdom or not os.path.exists(self.guid_pidfile(vm.xid)): | ||||
|                 if not os.path.exists(self.guid_pidfile(vm.stubdom_xid)): | ||||
|                     yield from self.start_gui_for_stubdomain(vm) | ||||
| @ -297,7 +297,7 @@ class GUILauncher(object): | ||||
|         '''Handler of 'domain-spawn' event, starts GUI daemon for stubdomain''' | ||||
|         if not vm.features.check_with_template('gui', True): | ||||
|             return | ||||
|         if vm.hvm and kwargs.get('start_guid', 'True') == 'True': | ||||
|         if vm.virt_mode == 'hvm' and kwargs.get('start_guid', 'True') == 'True': | ||||
|             asyncio.ensure_future(self.start_gui_for_stubdomain(vm)) | ||||
| 
 | ||||
|     def on_domain_start(self, vm, _event, **kwargs): | ||||
| @ -325,7 +325,7 @@ class GUILauncher(object): | ||||
|             elif power_state == 'Transient': | ||||
|                 # it is still starting, we'll get 'domain-start' event when | ||||
|                 # fully started | ||||
|                 if vm.hvm: | ||||
|                 if vm.virt_mode == 'hvm': | ||||
|                     asyncio.ensure_future(self.start_gui_for_stubdomain(vm)) | ||||
| 
 | ||||
|     def register_events(self, events): | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski-Górecki
						Marek Marczykowski-Górecki