Пример #1
0
 def get_compute_host_data(self):
     try:
         return nova.service_list(self.tab_group.request,
                                  binary='nova-compute')
     except Exception:
         msg = _('Unable to get nova services list.')
         exceptions.handle(self.tab_group.request, msg)
         return []
Пример #2
0
 def get_compute_host_data(self):
     try:
         services = nova.service_list(self.tab_group.request)
         return [service for service in services
                 if service.binary == 'nova-compute']
     except Exception:
         msg = _('Unable to get nova services list.')
         exceptions.handle(self.tab_group.request, msg)
Пример #3
0
 def get_nova_services_data(self):
     try:
         services = nova.service_list(self.tab_group.request)
     except Exception:
         msg = _('Unable to get nova services list.')
         exceptions.handle(self.request, msg)
         services = []
     return services
Пример #4
0
 def get_compute_host_data(self):
     try:
         return nova.service_list(self.tab_group.request,
                                  binary='nova-compute')
     except Exception:
         msg = _('Unable to get nova services list.')
         exceptions.handle(self.tab_group.request, msg)
         return []
Пример #5
0
    def get_nova_services_data(self):
        try:
            services = nova.service_list(self.tab_group.request)
        except Exception:
            msg = _('Unable to get nova services list.')
            exceptions.check_message(["Connection", "refused"], msg)
            raise

        return services
Пример #6
0
    def get_nova_services_data(self):
        try:
            services = nova.service_list(self.tab_group.request)
        except Exception:
            msg = _('Unable to get nova services list.')
            exceptions.check_message(["Connection", "refused"], msg)
            raise

        return services
Пример #7
0
 def get_compute_host_data(self):
     try:
         services = nova.service_list(self.tab_group.request)
         return [
             service for service in services
             if service.binary == 'nova-compute'
         ]
     except Exception:
         msg = _('Unable to get nova services list.')
         exceptions.handle(self.tab_group.request, msg)
Пример #8
0
def get_compute_service_list(request):
    return nova_api.service_list(request, binary="nova-compute")