Exemple #1
0
 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None
     self.objstore = kargs['objstore']
     self.task = TaskModel(**kargs)
Exemple #2
0
    def lookup(self, name):
        try:
            swupdate = SoftwareUpdate()
        except Exception:
            raise OperationFailed('KCHPKGUPD0004E')

        return swupdate.getUpdate(name)
Exemple #3
0
    def lookup(self, name):
        try:
            swupdate = SoftwareUpdate()
        except Exception:
            raise OperationFailed('KCHPKGUPD0004E')

        return swupdate.getUpdate(name)
Exemple #4
0
    def swupdate(self, *name):
        try:
            swupdate = SoftwareUpdate()
        except:
            raise OperationFailed('KCHPKGUPD0004E')

        pkgs = swupdate.getNumOfUpdates()
        if pkgs == 0:
            raise OperationFailed('KCHPKGUPD0001E')

        kimchi_log.debug('Host is going to be updated.')
        taskid = add_task('', swupdate.doUpdate, self.objstore, None)
        return self.task.lookup(taskid)
Exemple #5
0
    def swupdate(self, *name):
        try:
            swupdate = SoftwareUpdate()
        except:
            raise OperationFailed('KCHPKGUPD0004E')

        pkgs = swupdate.getNumOfUpdates()
        if pkgs == 0:
            raise OperationFailed('KCHPKGUPD0001E')

        kimchi_log.debug('Host is going to be updated.')
        taskid = add_task('', swupdate.doUpdate, self.objstore, None)
        return self.task.lookup(taskid)
Exemple #6
0
    def lookup(self, *ident):
        report_tool = DebugReportsModel.get_system_report_tool()
        try:
            SoftwareUpdate()
        except Exception:
            update_tool = False
        else:
            update_tool = True

        try:
            repo = Repositories()
        except Exception:
            repo_mngt_tool = None
        else:
            repo_mngt_tool = repo._pkg_mnger.TYPE

        return {'libvirt_stream_protocols': self.libvirt_stream_protocols,
                'qemu_spice': self._qemu_support_spice(),
                'qemu_stream': self.qemu_stream,
                'screenshot': VMScreenshot.get_stream_test_result(),
                'system_report_tool': bool(report_tool),
                'update_tool': update_tool,
                'repo_mngt_tool': repo_mngt_tool,
                'federation': kconfig.get("server", "federation"),
                'auth': kconfig.get("authentication", "method"),
                'kernel_vfio': self.kernel_vfio,
                }
Exemple #7
0
 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None
     self.objstore = kargs['objstore']
     self.task = TaskModel(**kargs)
Exemple #8
0
    def lookup(self, *ident):
        report_tool = DebugReportsModel.get_system_report_tool()
        try:
            SoftwareUpdate()
        except Exception:
            update_tool = False
        else:
            update_tool = True

        try:
            repo = Repositories()
        except Exception:
            repo_mngt_tool = None
        else:
            repo_mngt_tool = repo._pkg_mnger.TYPE

        return {
            'libvirt_stream_protocols': self.libvirt_stream_protocols,
            'qemu_spice': self._qemu_support_spice(),
            'qemu_stream': self.qemu_stream,
            'screenshot': VMScreenshot.get_stream_test_result(),
            'system_report_tool': bool(report_tool),
            'update_tool': update_tool,
            'repo_mngt_tool': repo_mngt_tool
        }
Exemple #9
0
class PackagesUpdateModel(object):
    def __init__(self, **kargs):
        try:
            self.host_swupdate = SoftwareUpdate()
        except:
            self.host_swupdate = None

    def get_list(self):
        if self.host_swupdate is None:
            raise OperationFailed('KCHPKGUPD0004E')

        return self.host_swupdate.getUpdates()
Exemple #10
0
class PackagesUpdateModel(object):
    def __init__(self, **kargs):
        try:
            self.host_swupdate = SoftwareUpdate()
        except:
            self.host_swupdate = None

    def get_list(self):
        if self.host_swupdate is None:
            raise OperationFailed('KCHPKGUPD0004E')

        return self.host_swupdate.getUpdates()
Exemple #11
0
class PackagesUpdateModel(object):
    def __init__(self, **kargs):
        try:
            self.host_swupdate = SoftwareUpdate()
        except:
            self.host_swupdate = None
        self.objstore = kargs["objstore"]
        self.task = TaskModel(**kargs)

    def get_list(self):
        if self.host_swupdate is None:
            raise OperationFailed("KCHPKGUPD0004E")

        return self.host_swupdate.getUpdates()
Exemple #12
0
    def lookup(self, *ident):
        report_tool = DebugReportsModel.get_system_report_tool()
        try:
            SoftwareUpdate()
        except Exception:
            update_tool = False
        else:
            update_tool = True

        return {
            'libvirt_stream_protocols': self.libvirt_stream_protocols,
            'qemu_stream': self.qemu_stream,
            'screenshot': VMScreenshot.get_stream_test_result(),
            'system_report_tool': bool(report_tool),
            'update_tool': update_tool
        }
Exemple #13
0
 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None
Exemple #14
0
 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None