예제 #1
0
파일: views.py 프로젝트: changbl/inception
 def get_data(self):
     if not hasattr(self, "_instance"):
         try:
             instance_id = self.kwargs['instance_id']
             instance = iapi.cloud_get(self.request, instance_id)
             instance.security_groups = api.network.server_security_groups(
                 self.request, instance_id)
         except:
             redirect = reverse('horizon:project:instances:index')
             exceptions.handle(self.request,
                               _('Unable to retrieve details for '
                                 'instance "%s".') % instance_id,
                               redirect=redirect)
         self._instance = instance
     return self._instance
예제 #2
0
 def get_data(self):
     if not hasattr(self, "_instance"):
         try:
             instance_id = self.kwargs['instance_id']
             instance = iapi.cloud_get(self.request, instance_id)
             instance.security_groups = api.network.server_security_groups(
                 self.request, instance_id)
         except:
             redirect = reverse('horizon:project:instances:index')
             exceptions.handle(self.request,
                               _('Unable to retrieve details for '
                                 'instance "%s".') % instance_id,
                               redirect=redirect)
         self._instance = instance
     return self._instance
예제 #3
0
파일: tables.py 프로젝트: changbl/inception
 def get_data(self, request, instance_id):
     cloud = iapi.cloud_get(request, instance_id)
     return cloud
예제 #4
0
파일: tables.py 프로젝트: changbl/inception
 def get_data(self, request, instance_id):
     cloud = iapi.cloud_get(request, instance_id)
     return cloud