本文整理汇总了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)
示例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)
示例3: __init__
def __init__(self, **kargs):
try:
self.host_swupdate = SoftwareUpdate()
except:
self.host_swupdate = None
self.objstore = kargs['objstore']
self.task = TaskModel(**kargs)
示例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()
示例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()
示例6: __init__
def __init__(self, **kargs):
try:
self.host_swupdate = SoftwareUpdate()
except:
self.host_swupdate = None