Exemplo n.º 1
0
 def get_data(self):
     try:
         LOG.info("Obtaining instance for detailed view ")
         instance_id = self.kwargs["instance_id"]
         instance = api.trove.instance_get(self.request, instance_id)
         instance.host = tables.get_host(instance)
     except Exception:
         msg = _("Unable to retrieve details " "for database instance: %s") % instance_id
         exceptions.handle(self.request, msg, redirect=self.get_redirect_url())
     try:
         instance.full_flavor = api.trove.flavor_get(self.request, instance.flavor["id"])
     except Exception:
         LOG.error("Unable to retrieve flavor details" " for database instance: %s" % instance_id)
     return instance
Exemplo n.º 2
0
 def get_data(self):
     try:
         LOG.info("Obtaining instance for detailed view ")
         instance_id = self.kwargs['instance_id']
         instance = api.trove.instance_get(self.request, instance_id)
         instance.host = tables.get_host(instance)
     except Exception:
         msg = _('Unable to retrieve details '
                 'for database instance: %s') % instance_id
         exceptions.handle(self.request,
                           msg,
                           redirect=self.get_redirect_url())
     try:
         instance.full_flavor = api.trove.flavor_get(
             self.request, instance.flavor["id"])
     except Exception:
         LOG.error('Unable to retrieve flavor details'
                   ' for database instance: %s' % instance_id)
     return instance
Exemplo n.º 3
0
 def _extra_data(self, instance):
     flavor = self.get_flavors().get(instance.flavor["id"])
     if flavor is not None:
         instance.full_flavor = flavor
     instance.host = tables.get_host(instance)
     return instance
Exemplo n.º 4
0
 def _extra_data(self, instance):
     flavor = self.get_flavors().get(instance.flavor["id"])
     if flavor is not None:
         instance.full_flavor = flavor
     instance.host = tables.get_host(instance)
     return instance