summaryrefslogtreecommitdiff
path: root/virtinst/devices/char.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2018-03-20 18:59:14 -0400
committerCole Robinson <crobinso@redhat.com>2018-03-21 11:17:36 -0400
commitf69b823fad26a83e483dcff4de4ddb777745f685 (patch)
tree5927dd653f4e9260b73687a03b2bdda84c385f74 /virtinst/devices/char.py
parent7b61c45d3b5b6c6cf1207fca79a1b07566d1b06d (diff)
downloadvirt-manager-f69b823fad26a83e483dcff4de4ddb777745f685.tar.gz
devices: Switch to normal _XML_PROP_ORDER
Drop the register_device stuff, rename virtual_device_type
Diffstat (limited to 'virtinst/devices/char.py')
-rw-r--r--virtinst/devices/char.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/virtinst/devices/char.py b/virtinst/devices/char.py
index a1a98840..9391ee02 100644
--- a/virtinst/devices/char.py
+++ b/virtinst/devices/char.py
@@ -244,7 +244,7 @@ class _DeviceChar(Device):
default_cb=_get_default_protocol)
def _get_default_target_type(self):
- if self.virtual_device_type == "channel":
+ if self.DEVICE_TYPE == "channel":
return self.CHANNEL_TARGET_VIRTIO
return None
target_type = XMLProperty("./target/@type",
@@ -266,25 +266,19 @@ class _DeviceChar(Device):
class DeviceConsole(_DeviceChar):
- virtual_device_type = "console"
+ _XML_ROOT_NAME = "console"
TYPES = [_DeviceChar.TYPE_PTY]
class DeviceSerial(_DeviceChar):
- virtual_device_type = "serial"
+ _XML_ROOT_NAME = "serial"
class DeviceParallel(_DeviceChar):
- virtual_device_type = "parallel"
+ _XML_ROOT_NAME = "parallel"
class DeviceChannel(_DeviceChar):
- virtual_device_type = "channel"
+ _XML_ROOT_NAME = "channel"
TYPES = (_DeviceChar._TYPES_FOR_CHANNEL +
_DeviceChar._TYPES_FOR_ALL)
-
-
-DeviceConsole.register_type()
-DeviceSerial.register_type()
-DeviceParallel.register_type()
-DeviceChannel.register_type()