Bug 1636: Config Netconf Connector did not serialize service type 45/10445/1
authorTony Tkacik <ttkacik@cisco.com>
Thu, 28 Aug 2014 11:20:58 +0000 (13:20 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Thu, 28 Aug 2014 11:46:35 +0000 (13:46 +0200)
Config Netconf connector did not serialized service type
in list of service dependencies properly, which resulted
in invalid string 'prefix:null'

Change-Id: I02cc56e2069b56737167d9b694f8cb8309bbd74d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/ObjectMapper.java

index 4d984acee0206c1cce11b23f6f4f0dd1415506f8..b50a035be2f20d2d1c850701a845b2f766b11443 100644 (file)
@@ -42,6 +42,9 @@ public class ObjectMapper extends AttributeIfcSwitchStatement<AttributeMappingSt
         if(attributeIfc instanceof DependencyAttribute) {
             serviceNameOfDepAttr = ((DependencyAttribute)attributeIfc).getDependency().getSie().getQName().getLocalName();
             namespaceOfDepAttr = ((DependencyAttribute)attributeIfc).getDependency().getSie().getQName().getNamespace().toString();
+        } else if (attributeIfc instanceof ListDependenciesAttribute) {
+            serviceNameOfDepAttr = ((ListDependenciesAttribute)attributeIfc).getDependency().getSie().getQName().getLocalName();
+            namespaceOfDepAttr = ((ListDependenciesAttribute)attributeIfc).getDependency().getSie().getQName().getNamespace().toString();
         }
 
         return switchAttribute(attributeIfc);