本文整理汇总了Python中service.Service.remove方法的典型用法代码示例。如果您正苦于以下问题:Python Service.remove方法的具体用法?Python Service.remove怎么用?Python Service.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类service.Service
的用法示例。
在下文中一共展示了Service.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: strict_up
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import remove [as 别名]
def strict_up(self, ignore):
started_list = []
for i in range(len(self.services) - 1):
for service in self.services[i]:
try:
service.run()
except AlaudaServerError as ex:
if str(ex).find('App {} already exists'.format(service.name)) > -1 and ignore:
continue
else:
print 'error: {}'.format(ex.message)
raise ex
started_list.extend(self.services[i])
ret = self._wait_services_ready(self.services[i])
if ret is not None:
for service in started_list:
Service.remove(service.name)
raise AlaudaServerError(500, ret)
for service in self.services[len(self.services) - 1]:
try:
service.run()
except AlaudaServerError as ex:
if str(ex).find('App {} already exists'.format(service.name)) > -1 and ignore:
print 'Ignore exist service -> {}'.format(service.name)
continue
else:
raise ex
示例2: strict_start
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import remove [as 别名]
def strict_start(self):
started_list = []
for i in range(len(self.services) - 1):
for service in self.services[i]:
service.start()
started_list.extend(self.services[i])
ret = self._wait_services_ready(self.services[i])
if ret is not None:
for service in started_list:
Service.remove(service.name)
raise AlaudaServerError(500, ret)
for service in self.services[len(self.services) - 1]:
service.start()
示例3: rm
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import remove [as 别名]
def rm(self, namespace):
for service_level in self.services:
for service in service_level:
Service.remove(service.name, namespace)
示例4: service_rm
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import remove [as 别名]
def service_rm(name, namespace):
Service.remove(name, namespace)