Пример #1
0
 def get_security_groups_data(self):
     try:
         security_groups = nova.security_group_list(self.request)
     except:
         security_groups = []
         exceptions.handle(self.request,
                           _('Unable to retrieve security groups.'))
     return security_groups
Пример #2
0
 def populate_security_groups_choices(self, request, context):
     try:
         groups = nova.security_group_list(request)
         security_group_list = [(sg.name, sg.name) for sg in groups]
     except:
         exceptions.handle(request, _("Unable to retrieve list of security groups"))
         security_group_list = []
     return security_group_list
Пример #3
0
 def get_security_groups_data(self):
     try:
         security_groups = nova.security_group_list(self.request)
     except:
         security_groups = []
         exceptions.handle(self.request,
                           _('Unable to retrieve security groups.'))
     return security_groups
Пример #4
0
 def populate_security_groups_choices(self, request, context):
     try:
         groups = nova.security_group_list(request)
         security_group_list = [(sg.name, sg.name) for sg in groups]
     except:
         exceptions.handle(
             request, _('Unable to retrieve list of security groups'))
         security_group_list = []
     return security_group_list