Fix for broken show commands
diff --git a/cli/cli/cli.py b/cli/cli/cli.py
index 0f807ce..ab656fa 100755
--- a/cli/cli/cli.py
+++ b/cli/cli/cli.py
@@ -281,11 +281,11 @@
class SDNSh():
- debug = False # general cli debugging
- debug_backtrace = False # backtrace on failures
- description = False # help debug command descriptions
- display_rest = False # display rest call details
- display_reply_rest = False # display rest call replies details
+ debug = True # general cli debugging
+ debug_backtrace = True # backtrace on failures
+ description = True # help debug command descriptions
+ display_rest = True # display rest call details
+ display_reply_rest = True # display rest call replies details
command_dict = {}
mode_stack = []
diff --git a/cli/cli/climodelinfo.py b/cli/cli/climodelinfo.py
index 1f53a25..89ba58e 100755
--- a/cli/cli/climodelinfo.py
+++ b/cli/cli/climodelinfo.py
@@ -111,11 +111,11 @@
return obj_type_info['fields'].get(field_name, None)
# LOOK! Refactor - Should we merge this with model_info_list?
- if (onos == 1):
- # do nothing
- additional_model_info_dict = {}
- elif (onos==2):
#if (onos == 1):
+ # do nothing
+ # additional_model_info_dict = {}
+ #elif (onos==2):
+ if (onos == 1):
additional_model_info_dict = {
'switches' : {
# switches are now directly fetched via rest api.
diff --git a/cli/cli/modi.py b/cli/cli/modi.py
index 7ea14fb..4bb156d 100755
--- a/cli/cli/modi.py
+++ b/cli/cli/modi.py
@@ -107,6 +107,7 @@
for (k, d) in self.obj_type_info_dict.items():
if not 'fields' in d:
print '%s: Missing "fields"' % k
+ continue
candidate_keys = [f for f in d['fields'].keys()
if d['fields'][f].get('primary_key', False)]
if len(candidate_keys) > 0:
@@ -135,6 +136,9 @@
self.foreign_key_xref = {}
for (obj_type, obj_type_dict) in self.obj_type_info_dict.items():
+ if not 'fields' in obj_type_dict:
+ print '%s: Missing "fields"' % obj_type
+ continue
for (fn, fd) in obj_type_dict['fields'].items():
if 'type' in fd:
if fd['type'] == 'ForeignKey':
@@ -163,6 +167,9 @@
self.alias_obj_type_xref = {}
self.alias_obj_types = []
for (obj_type, obj_type_dict) in self.obj_type_info_dict.items():
+ if not 'fields' in obj_type_dict:
+ print '%s: Missing "fields"' % obj_type
+ continue
foreign_key_obj_type = None
foreign_key_count = 0
other_types = False
diff --git a/cli/sdncon/controller/models.py b/cli/sdncon/controller/models.py
index ca62e1c..a3db737 100755
--- a/cli/sdncon/controller/models.py
+++ b/cli/sdncon/controller/models.py
@@ -292,7 +292,7 @@
{'name': 'access_priority', 'rest_name': 'access-priority'},
{'name': 'core_priority', 'rest_name': 'core-priority'},
)
-
+"""
#
# ------------------------------------------------------------
class Controller(models.Model):
@@ -438,7 +438,7 @@
{'name': 'logging_level', 'rest_name': 'logging-level'},
)
-
+"""
#
# ------------------------------------------------------------
@@ -664,7 +664,7 @@
NAME = 'controller-domain-name-server'
FIELD_INFO = (
)
-
+"""
#
# ------------------------------------------------------------
@@ -863,7 +863,7 @@
class Rest:
NAME = 'switch-alias'
-
+"""
#
# ------------------------------------------------------------
@@ -1548,7 +1548,7 @@
)
#
# ------------------------------------------------------------
-
+"""
class HostConfig(models.Model):
host_id_length = 17
#
@@ -1595,7 +1595,7 @@
FIELD_INFO = (
#{'name': 'address_space', 'rest_name': 'address-space'},
)
-
+"""
#
# ------------------------------------------------------------
@@ -2902,7 +2902,7 @@
)
#
# ------------------------------------------------------------
-
+"""
class Tag(models.Model):
namespace_length = 64
name_length = 64
@@ -3010,7 +3010,7 @@
class Rest:
NAME = 'tag-mapping'
-
+"""
#
# ------------------------------------------------------------
class TechSupportConf(models.Model):