[docs]@require_class(UbuntuHost)classUbuntu1604Host:""" A general class to provide an abstraction between Ubuntu Server and Desktop """def__init__(self):"""This abstraction is not needed"""
[docs]@require_class(Ubuntu1604Host)@require_class(UbuntuServer)classUbuntu1604Server:""" The Model Component for the Ubuntu1604Server image. """def__init__(self):""" Setting all of the required parameters for a new image """self.vm=getattr(self,"vm",{})if"architecture"notinself.vm:self.vm["architecture"]="x86_64"if"vcpu"notinself.vm:self.vm["vcpu"]={"model":"qemu64","sockets":1,"cores":1,"threads":1,}if"mem"notinself.vm:self.vm["mem"]=256if"drives"notinself.vm:self.vm["drives"]=[{"db_path":"ubuntu-16.04.4-server-amd64.qcow2.xz","file":"ubuntu-16.04.4-server-amd64.qcow2",}]if"vga"notinself.vm:self.vm["vga"]="std"self.set_image("ubuntu1604server")
[docs]@require_class(Ubuntu1604Host)@require_class(UbuntuDesktop)classUbuntu1604Desktop:""" The Model Component for the Ubuntu1604Desktop image. """def__init__(self):""" Setting all of the required parameters for a new image """self.vm=getattr(self,"vm",{})if"architecture"notinself.vm:self.vm["architecture"]="x86_64"if"vcpu"notinself.vm:self.vm["vcpu"]={"model":"qemu64","sockets":1,"cores":2,"threads":1,}if"mem"notinself.vm:self.vm["mem"]=2048if"drives"notinself.vm:self.vm["drives"]=[{"db_path":"ubuntu-16.04.4-desktop-amd64.qcow2.xz","file":"ubuntu-16.04.4-desktop-amd64.qcow2",}]if"vga"notinself.vm:self.vm["vga"]="std"self.set_image("ubuntu1604Desktop")