From 93ce302db370315873fad49970e3f6395233aa7a Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 23 May 2012 12:03:48 -0700 Subject: [PATCH] Added a category declaration for CiscoNexus (I put it in the Network category) and improved the exception. --- setup/apidoc/gen_toc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/apidoc/gen_toc.py b/setup/apidoc/gen_toc.py index 630c8043c56..1c2f48c4c09 100644 --- a/setup/apidoc/gen_toc.py +++ b/setup/apidoc/gen_toc.py @@ -82,6 +82,7 @@ known_categories = { 'Zone': 'Zone', 'NetworkOffering': 'Network Offering', 'Network': 'Network', + 'CiscoNexus': 'Network', 'Vpn': 'VPN', 'Limit': 'Limit', 'ResourceCount': 'Limit', @@ -124,7 +125,8 @@ def choose_category(fn): for k, v in known_categories.iteritems(): if k in fn: return v - raise Exception(fn) + raise Exception('Need to add a category for %s to %s:known_categories' % + (fn, __file__)) for f in sys.argv: