components/openstack/horizon/patches/10-network-agents.patch
author david.comay@oracle.com
Wed, 09 Jul 2014 15:10:27 -0700
branchs11u2-sru
changeset 3201 6839f7d1f036
permissions -rw-r--r--
18686478 kstat warning every minute in nova-compute log on SPARC 19061438 checkboxes related with 'create volume from Image' in the Horizon don't work 19064962 power state mapping for incomplete zone is incorrect 19065445 Horizon doesn't deal well with shutdown zones 19130253 pausing/suspension "successful" in horizon, though nothing happens 19136473 ZFSSA iSCSI Cinder Attach Volume Failed 19146728 missing an upstream utility 'dhcp_release' needed by instance termination 19148389 jsonpointer package missing as a dependency for jsonpatch 19158668 associating a new floating ip removes existing ipnat rules and re-adds them 19161623 problem in SERVICE/KEYSTONE 19166348 cinder & nova should default signing_dir explicitly for consistency 19166359 minor pkgfmt(1) issues with OpenStack manifests 19168609 System Info page doesn't work properly 19173435 problem in SERVICE/HORIZON 19181971 OpenStack pkg.summaries should include service type

In-house patch to handle Resource Not Found exception while trying
to display the Network Agents panel. This is needed as our Neutron
doesn't support Agents extension.

--- horizon-2013.2.3/openstack_dashboard/api/neutron.py	2014-04-03 11:45:53.000000000 -0700
+++ NEW/openstack_dashboard/api/neutron.py	2014-07-08 09:35:42.219185826 -0700
@@ -33,6 +33,7 @@
 from openstack_dashboard.api import network_base
 from openstack_dashboard.api import nova
 
+from neutronclient.common.exceptions import NeutronClientException
 from neutronclient.v2_0 import client as neutron_client
 
 LOG = logging.getLogger(__name__)
@@ -718,7 +719,11 @@
 
 
 def agent_list(request):
-    agents = neutronclient(request).list_agents()
+    try:
+        agents = neutronclient(request).list_agents()
+    except NeutronClientException as nce:
+        if nce.status_code == 404:
+            return []
     return [Agent(a) for a in agents['agents']]