예제 #1
0
파일: views.py 프로젝트: ehazlett/horizon
 def get_data(self):
     services = []
     try:
         services = api.service_list(self.request)
     except api_exceptions.ApiException, e:
         LOG.exception('ApiException fetching service list')
         messages.error(self.request,
                        _('Unable to get service info: %s') % e.message)
예제 #2
0
 def get_data(self):
     services = []
     try:
         services = api.service_list(self.request)
     except api_exceptions.ApiException, e:
         LOG.exception('ApiException fetching service list')
         messages.error(self.request,
                        _('Unable to get service info: %s') % e.message)
예제 #3
0
 def service(self):
     try:
         self.service_list = api.service_list(self.request)
     except api_exceptions.ApiException, e:
         self.service_list = []
         LOG.exception('ApiException fetching service list '
                       'in instance usage')
         messages.error(self.request,
                        _('Unable to get service info: %s') % e.message)
         return
예제 #4
0
 def service(self):
     try:
         self.service_list = api.service_list(self.request)
     except api_exceptions.ApiException, e:
         self.service_list = []
         LOG.exception('ApiException fetching service list '
                       'in instance usage')
         messages.error(self.request,
                        _('Unable to get service info: %s') % e.message)
         return
예제 #5
0
def index(request):
    for f in (ToggleService,):
        form, handled = f.maybe_handle(request)
        if handled:
            return handled

    services = []
    try:
        services = api.service_list(request)
    except api_exceptions.ApiException, e:
        LOG.exception('ApiException fetching service list')
        messages.error(request,
                       _('Unable to get service info: %s') % e.message)
예제 #6
0
def index(request):
    for f in (ToggleService, ):
        form, handled = f.maybe_handle(request)
        if handled:
            return handled

    services = []
    try:
        services = api.service_list(request)
    except api_exceptions.ApiException, e:
        LOG.exception('ApiException fetching service list')
        messages.error(request,
                       _('Unable to get service info: %s') % e.message)