當前位置: 首頁>>代碼示例>>Python>>正文


Python swupdate.SoftwareUpdate類代碼示例

本文整理匯總了Python中kimchi.swupdate.SoftwareUpdate的典型用法代碼示例。如果您正苦於以下問題:Python SoftwareUpdate類的具體用法?Python SoftwareUpdate怎麽用?Python SoftwareUpdate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SoftwareUpdate類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: lookup

    def lookup(self, name):
        try:
            swupdate = SoftwareUpdate()
        except Exception:
            raise OperationFailed('KCHPKGUPD0004E')

        return swupdate.getUpdate(name)
開發者ID:EmperorBeezie,項目名稱:kimchi,代碼行數:7,代碼來源:host.py

示例2: swupdate

    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)
開發者ID:EmperorBeezie,項目名稱:kimchi,代碼行數:13,代碼來源:host.py

示例3: __init__

 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None
     self.objstore = kargs['objstore']
     self.task = TaskModel(**kargs)
開發者ID:EmperorBeezie,項目名稱:kimchi,代碼行數:7,代碼來源:host.py

示例4: PackagesUpdateModel

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()
開發者ID:Gossing,項目名稱:kimchi,代碼行數:12,代碼來源:host.py

示例5: PackagesUpdateModel

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()
開發者ID:k0da,項目名稱:kimchi,代碼行數:14,代碼來源:host.py

示例6: __init__

 def __init__(self, **kargs):
     try:
         self.host_swupdate = SoftwareUpdate()
     except:
         self.host_swupdate = None
開發者ID:Gossing,項目名稱:kimchi,代碼行數:5,代碼來源:host.py


注:本文中的kimchi.swupdate.SoftwareUpdate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。