Ask Your Question
0

netconf client normalize rpc-reply message failed.

asked 2015-03-13 03:31:01 -0700

surdomic gravatar image

updated 2015-03-13 04:13:33 -0700

Tony Tkacik gravatar image

I have a netconf server which reply a message to ODL as following

<rpc-reply message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <data> <root xmlns="urn:org:A:B:Root"> <rootid>1</rootid> <virtualcontext xmlns="urn:org:A:B:VirtualContext"> <contextid>local</contextid> <interface xmlns="urn:org:A:B:BaseInterface"> <interfaceid>s1</interfaceid> <ip xmlns="urn:org:A:B:Ipv4Interface"> <ipid>1</ipid> <primaryaddress> <primaryaddressid>1.1.1.1/24</primaryaddressid> </primaryaddress> </ip> </interface> </virtualcontext> </root> </data> </rpc-reply>

when normalize this message, following exception will be printed, who can tell me why it will be happended?

Caused by: org.opendaylight.controller.md.sal.common.impl.util.compat.DataNormalizationException: Supplied
QName (urn:org:A:B:Ipv4Interface)Ip is not valid according to schema list Interface,

potential children nodes: [LeafSchemaNodeImpl[qname=(urn:org:A:B:BaseInterface?revision=2012-09-27)interfaceId, path=AbsoluteSchemaPath{path=[(urn:org:A:B:Root?revision=2014-04-11)Root, (urn:org:A:B:VirtualContext?revision=2013-01-01)VirtualContext,(urn:org:A:B:BaseInterface?revision=2012-09-27)Interface, (urn:org:A:B:BaseInterface?revision=2012-09-27)interfaceId]}], LeafSchemaNodeImpl[name=(urn:org:A:B:BaseInterface?revision=2012-09-27)description, path=AbsoluteSchemaPath{path=[(urn:org:A:B:Root?revision=2014-04-11)Root, (urn:org:A:B:VirtualContext?revision=2013-01-01)VirtualContext, (urn:org:A:B:BaseInterface?revision=2012-09-27)Interface, (urn:org:A:B:BaseInterface?revision=2012-09-27)description]}]]

at org.opendaylight.controller.md.sal.common.impl.util.compat.DataNormalizationOperation.fromSchemaAndQNameChecked(DataNormalizationOperation.java:688)[92:org.opendaylight.controller.sal-cmmon-impl:1.1.2.Helium-SR2]

following is some part yang files

BaseInterface.yang module BaseInterface { namespace "urn:org:A:B:BaseInterface; prefix BaseInterface;

import VirtualContext {
    prefix VirtualContext;
}



import Root {
    prefix Root;
}

organization "";
description "Base Interface Mom\r\n";

revision "2015-01-27" {
    description "";
}

augment "/Root:Root/VirtualContext:VirtualContext" {
    list Interface {
        key interfaceId;
        uses "BaseInterface:Interface";
    }

}



typedef DescriptionType {
    type string {
        length "0..255";
    }

    description
    "Associate a text description (up to 255 ASCII characters) with an interface.";
}
typedef InterfaceName {
    type string {
        length "1..127";
    }

    description "Type of the Interface name.";
}
grouping Interface {
    description
    "Configure an interface.\r\n\r\nDo not configure more than one interface IP address in a virtualcontext on the same subnet.\r\n\r\n";
    leaf interfaceId {
        type "BaseInterface:InterfaceName";
        mandatory true;
        description "Configure the name of the interface.";

    }
    leaf "description" {
        type "BaseInterface:DescriptionType";
        description
        "Add descriptive text for the interface.\r\n\r\nYou can add text only on non-IPsec interface.";
    }   

}

}

Ipv4Interface.yang

module Ipv4Interface { namespace "urn:com:ericsson:ecim:Ipv4Interface"; prefix Ipv4Interface;

import BaseInterface {
    prefix BaseInterface;
}

import VirtualContext {
    prefix VirtualContext;
}

import Root {
    prefix Root;
}

organization "";
description "IPv4 Managed Object Model under Interface.";

revision "2012-09-27" {
    description "";
}

augment "/Root:Root/VirtualContext:VirtualContext/BaseInterface:Interface"
{
    list Ip {
        key ipId;
        max-elements 1;
        uses "Ipv4Interface:Ip";
        list PrimaryAddress {
            key primaryAddressId;
            max-elements 1;
            uses "Ipv4Interface:PrimaryAddress";
        }
    }

}


typedef MtuType {
    type uint32 {
        range "256..16384";
    }

    description
    "Specify the MTU size in bytes.\r\n\r\nThe range of values is 256 to 16384.\r\n";
}

typedef Ipv4AddressAndPrefixlength {
    type string {
        pattern
        "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9 ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-13 04:37:53 -0700

Maros gravatar image

updated 2015-03-13 04:38:14 -0700

Hi,

The most likely reason is that the required model could not be processed by ODL. Can you head to following URL and read the metadata for your mounted device ? Check if there is element unavailable-capabilities present and if your models are not mentioned there.

http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/

Maros

edit flag offensive delete publish link more
0

answered 2015-03-16 03:33:00 -0700

surdomic gravatar image

I have look through the ODL detail log, found in the original Ipv4Interface.yang, there is a invalid imports. which result in the Ipv4Interface.yang not loaded in the ODL, and caused the error.

edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2015-03-13 03:31:01 -0700

Seen: 339 times

Last updated: Mar 16 '15