本文整理匯總了Python中kimchi.repositories.Repositories.removeRepository方法的典型用法代碼示例。如果您正苦於以下問題:Python Repositories.removeRepository方法的具體用法?Python Repositories.removeRepository怎麽用?Python Repositories.removeRepository使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kimchi.repositories.Repositories
的用法示例。
在下文中一共展示了Repositories.removeRepository方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: RepositoryModel
# 需要導入模塊: from kimchi.repositories import Repositories [as 別名]
# 或者: from kimchi.repositories.Repositories import removeRepository [as 別名]
class RepositoryModel(object):
def __init__(self, **kargs):
try:
self._repositories = Repositories()
except:
self._repositories = None
def lookup(self, repo_id):
if self._repositories is None:
raise InvalidOperation("KCHREPOS0014E")
return self._repositories.getRepository(repo_id)
def enable(self, repo_id):
if self._repositories is None:
raise InvalidOperation("KCHREPOS0014E")
return self._repositories.enableRepository(repo_id)
def disable(self, repo_id):
if self._repositories is None:
raise InvalidOperation("KCHREPOS0014E")
return self._repositories.disableRepository(repo_id)
def update(self, repo_id, params):
if self._repositories is None:
raise InvalidOperation("KCHREPOS0014E")
return self._repositories.updateRepository(repo_id, params)
def delete(self, repo_id):
if self._repositories is None:
raise InvalidOperation("KCHREPOS0014E")
return self._repositories.removeRepository(repo_id)