This commit consists of:
1) Improved error handling
2) Return correct XML message for unimplemented rpcs
3) Clean up
Change-Id: Ia59d203840efc2e238a50d4f05e56f854cca9fc7
diff --git a/netconf/nc_rpc/rpc_response.py b/netconf/nc_rpc/rpc_response.py
index 150631b..a544598 100644
--- a/netconf/nc_rpc/rpc_response.py
+++ b/netconf/nc_rpc/rpc_response.py
@@ -41,6 +41,9 @@
voltha_xml_string = voltha_xml_string[len('<yang>'):]
if voltha_xml_string.endswith('</yang>'):
voltha_xml_string = voltha_xml_string[:-len('</yang>')]
+ # Empty response
+ elif voltha_xml_string.startswith('<yang/>'):
+ voltha_xml_string=''
# Create the xml body as
if request.has_key('subclass'):
@@ -151,6 +154,7 @@
# special case the xml contain a list type
if len(elms) == 1:
item = elms[0]
+ #TODO: Address the case where the content is a list of list
if item.get('type') == 'list':
item.tag = 'ignore'
self.add_node(self.process_element(item), top)