Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

netconf client normalize rpc-reply message failed.

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

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-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

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]

netconf client normalize rpc-reply message failed.

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

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-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 printedprinted, 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]}]] (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][0-9]|2[0-4][0-9]|25[0-5])){3})/([1-9]|[1-2][0-9]|3[0-2])$";
    }

    description
    "Type of the Network address given by an IPv4 address and prefix length.\r\n";
}
typedef DefaultKey {
    type string {
        length "1";
        pattern "1";
    }

    description "Type of the Default Key, It\'s value has to be 1.\r\n";
}
grouping Ip {
    description "Configure IP parameters.";
    leaf ipId {
        type "Ipv4Interface:DefaultKey";
        mandatory true;
        description "Set the default identifier to 1.";

    }



    leaf mtu {
        type "Ipv4Interface:MtuType";
        description
        "Set the MTU size, in bytes, for traffic sent on the circuit to which the interface is bound.\r\n\r\nThe range of values is 256 to 16384.\r\n";
    }



}

grouping PrimaryAddress {
    description "Assign a primary IP address to an interface.";
    leaf primaryAddressId {
        type "Ipv4Interface:Ipv4AddressAndPrefixlength";
        mandatory true;
        description "Configure the primary interface subnet.";

    }

}

}

netconf client normalize rpc-reply message failed.

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

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-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][0-9]|2[0-4][0-9]|25[0-5])){3})/([1-9]|[1-2][0-9]|3[0-2])$";
    }

    description
    "Type of the Network address given by an IPv4 address and prefix length.\r\n";
}
typedef DefaultKey {
    type string {
        length "1";
        pattern "1";
    }

    description "Type of the Default Key, It\'s value has to be 1.\r\n";
}
grouping Ip {
    description "Configure IP parameters.";
    leaf ipId {
        type "Ipv4Interface:DefaultKey";
        mandatory true;
        description "Set the default identifier to 1.";

    }



    leaf mtu {
        type "Ipv4Interface:MtuType";
        description
        "Set the MTU size, in bytes, for traffic sent on the circuit to which the interface is bound.\r\n\r\nThe range of values is 256 to 16384.\r\n";
    }



}

grouping PrimaryAddress {
    description "Assign a primary IP address to an interface.";
    leaf primaryAddressId {
        type "Ipv4Interface:Ipv4AddressAndPrefixlength";
        mandatory true;
        description "Configure the primary interface subnet.";

    }

}

}