示例#1
0
文件: rpcapi.py 项目: zukobronja/zun
 def wrap(self, context, container, *args, **kwargs):
     services = objects.ZunService.list_by_binary(context, 'zun-compute')
     api_servicegroup = servicegroup.ServiceGroup()
     up_hosts = [service.host for service in services
                 if api_servicegroup.service_is_up(service)]
     if container.host is not None and container.host not in up_hosts:
         raise exception.ContainerHostNotUp(container=container.uuid,
                                            host=container.host)
     return func(self, context, container, *args, **kwargs)
 def wrap(self, context, container, *args, **kwargs):
     services = objects.ZunService.list_by_binary(context, 'zun-compute')
     api_servicegroup = servicegroup.ServiceGroup()
     up_hosts = [service.host for service in services
                 if api_servicegroup.service_is_up(service)]
     #if container.host is not None and container.host not in up_hosts:
     #    raise exception.ContainerHostNotUp(container=container.uuid,
     #                                       host=container.host)
     LOG.debug('get_all check_container_host wrapper =%s, context=%s, container=%s, args=%s, kwargs=%s XXXXXXXXXX.', func, context, container, args, kwargs)
     return func(self, context, container, *args, **kwargs)
示例#3
0
文件: driver.py 项目: zwphit/zun
 def __init__(self):
     self.servicegroup_api = servicegroup.ServiceGroup()
示例#4
0
 def __init__(self, **kwargs):
     super(ZunServiceController, self).__init__()
     self.servicegroup_api = svcgrp_api.ServiceGroup()
 def __init__(self):
     self.servicegroup_api = servicegroup.ServiceGroup()
     super(ComputeFilter, self).__init__()