Skip to content

Instantly share code, notes, and snippets.

@pcn
Last active August 29, 2015 14:10
Show Gist options
  • Save pcn/9684bde1f8c9bd965596 to your computer and use it in GitHub Desktop.
Save pcn/9684bde1f8c9bd965596 to your computer and use it in GitHub Desktop.
Horizon in opencontrail's horizon dashboard is broken WRT newer neutron Client objects
--- /usr/lib/python2.7/dist-packages/contrail_openstack_dashboard/openstack_dashboard/api/contrail_quantum.py 2014-12-05 10:34:36.263265972 -0500
+++ /usr/lib/python2.7/dist-packages/contrail_openstack_dashboard/openstack_dashboard/api/contrail_quantum.py.dist 2014-12-05 10:20:54.163429308 -0500
@@ -50,11 +50,8 @@
def ipam_summary(request, **params):
LOG.debug("ipam_summary(): params=%s" % (params))
- # ipams = neutronclient(request).list_ipams(**params).get('ipams')
- # return [ExtensionsContrailIpam(n) for n in ipams]
- # -PN 20141205 Fix for https://bugs.launchpad.net/juniperopenstack/+bug/1390315
- return []
-
+ ipams = neutronclient(request).list_ipams(**params).get('ipams')
+ return [ExtensionsContrailIpam(n) for n in ipams]
def ipam_summary_for_tenant(request, tenant_id, **params):
@@ -142,10 +139,8 @@
def policy_summary(request, **params):
LOG.debug("policy_summary(): params=%s" % (params))
- # policies = neutronclient(request).list_policys(**params).get('policys')
- # return [ExtensionsContrailPolicy(p) for p in policies]
- # -PN 20141205 Fix for https://bugs.launchpad.net/juniperopenstack/+bug/1390315
- return []
+ policies = neutronclient(request).list_policys(**params).get('policys')
+ return [ExtensionsContrailPolicy(p) for p in policies]
def policy_summary_for_tenant(request, tenant_id, **params):

Per https://bugs.launchpad.net/juniperopenstack/+bug/1390315 the first problem is that list_policys() isn’t part of the Client object anymore. After that is fixed, list_ipams() breaks so it needs to be removed as well.

Unfortunately doing this only exposes more broken operations relating to e.g. IPAM when creating networks in other parts of the UI, so this is only worth relating insofar as it shows where the rabbit hole starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment