[virt-manager PATCH 1/9] osdict: Add _OsTree() class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similarly to the _OsMedia() class, let's create a _OsTree() class which,
at least for now, has only one method that returns the OsinfoTree
object.

Although this class & method are not extrictly needed, having them makes
the code more consistent.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/osdict.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index b0442527..983f8e83 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -643,3 +643,11 @@ class _OsMedia(object):
 
     def get_osinfo_media(self):
         return self._media
+
+
+class _OsTree(object):
+    def __init__(self, osinfo_tree):
+        self._tree = osinfo_tree
+
+    def get_osinfo_tree(self):
+        return self._tree
-- 
2.21.0

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux