def get_initial(self): try: resource_types = glance.metadefs_namespace_resource_types( self.request, self.kwargs["id"]) except Exception: resource_types = [] msg = _('Error getting resource type associations.') exceptions.handle(self.request, msg) return {'id': self.kwargs["id"], 'resource_types': resource_types}
def get_initial(self): try: resource_types = glance.metadefs_namespace_resource_types( self.request, self.kwargs["id"]) except Exception: resource_types = [] msg = _('Error getting resource type associations.') exceptions.handle(self.request, msg) return {'id': self.kwargs["id"], 'resource_types': resource_types}