When the attribute of filesystem/source is changed the old value is not assigned to the new attribute. --- virtinst/devicefilesystem.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/virtinst/devicefilesystem.py b/virtinst/devicefilesystem.py index 951b716..be8f841 100644 --- a/virtinst/devicefilesystem.py +++ b/virtinst/devicefilesystem.py @@ -54,7 +54,7 @@ class VirtualFilesystem(VirtualDevice): DRIVER_DEFAULT] - type = XMLProperty("./@type", + _type_prop = XMLProperty("./@type", default_cb=lambda s: None, default_name=TYPE_DEFAULT) accessmode = XMLProperty("./@accessmode", @@ -111,6 +111,15 @@ class VirtualFilesystem(VirtualDevice): return setattr(self, self._type_to_source_prop(), val) source = property(_get_source, _set_source) + def _get_type(self): + return getattr(self, '_type_prop') + def _set_type(self, val): + source_value = self.source + new_type = setattr(self, '_type_prop', val) + self.source = source_value + return new_type + type = property(_get_type, _set_type) + def set_defaults(self, guest): ignore = guest -- 2.9.4 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list