-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.8.0
-
Component/s: None
-
Labels:None
-
Environment:
Defect: Post type is not same as get for union and for type empty is returning null.
Yang :
module simple-data-types {
yang-version 1;
namespace "urn:simple:data:types";
prefix smpdtp;
revision 2013-11-12;
typedef tpdfstring {
type string;
}
typedef tpdfbit {
type bits {
bit b1;
bit b2;
bit b3;
}
}
typedef tpdfun4 {
type boolean;
}
typedef tpdfun3 {
type union {
type tpdfbit;
type tpdfstring;
}
}
typedef tpdfun2 {
type union {
type tpdfun3;
type tpdfun4;
}
}
typedef tpdfun1 {
type union {
type uint8;
type decimal64 {
fraction-digits 2;
}
}
}
container cont {
container cont2 {
leaf lfint8Next {
type int8;
}
}
list list2 {
key "network-id";
leaf network-id {
type string;
}
leaf server-provided {
type string;
}
}
leaf lfint8Min {
type int8;
}
leaf lfint8Max {
type int8;
}
leaf lfint16Min {
type int16;
}
leaf lfint16Max {
type int16;
}
leaf lfint32Min {
type int32;
}
leaf lfint32Max {
type int32;
}
leaf lfint64Min {
type int64;
}
leaf lfint64Max {
type int64;
}
leaf lfuint8Max {
type uint8;
}
leaf lfuint16Max {
type uint16;
}
leaf lfuint32Max {
type uint32;
}
leaf lfuint64Max {
type uint64;
}
leaf lfstr {
type string;
}
leaf lfstr1 {
type string {
length "1..2";
}
}
leaf lfbool1 {
type boolean;
}
leaf lfbool2 {
type boolean;
}
leaf lfbool3 {
type boolean;
}
leaf lfdecimal1 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfdecimal2 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfdecimal3 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfdecimal4 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfdecimal6 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfenum {
type enumeration {
enum "enum1";
enum "enum2";
enum "enum3";
enum "enum4";
}
}
leaf lfbits {
type bits {
bit bit1;
bit bit2;
bit bit3;
bit bit4;
}
}
leaf lfbinary {
type binary;
}
leaf lfref1 {
type leafref {
path "../lfstr"; //reference to string type
}
}
leaf lfref2 {
type leafref {
path "../lfint8Max"; //reference to number type
}
}
leaf lfempty {
type empty;
}
leaf lfunion1 {
type union {
type uint16;
type string;
}
}
leaf lfunion2 {
type union {
type decimal64 {
fraction-digits 2;
}
type string;
}
}
leaf lfunion4 {
type union {
type boolean;
type string;
}
}
leaf lfunion5 {
type union {
type uint16;
type string;
}
}
leaf lfunion7 {
type tpdfun3;
}
leaf lfunion8 {
type union {
type uint16;
type string;
}
}
leaf lfunion9 {
type union {
type uint16;
type boolean;
}
}
leaf lfunion10 {
type union {
type bits {
bit bt1;
bit bt2;
}
type boolean;
}
}
leaf lfunion11 {
type union {
type tpdfun1;
type tpdfun2;
}
}
leaf lfunion12 {
type tpdfun2;
}
leaf lfunion13 {
type tpdfbit;
}
leaf lfunion14 {
type union {
type enumeration {
enum "zero";
enum "one";
}
type uint16;
}
}
}
}Defect: Post type is not same as get for union and for type empty is returning null. Yang : module simple-data-types { yang-version 1; namespace "urn:simple:data:types"; prefix smpdtp; revision 2013-11-12; typedef tpdfstring { type string; } typedef tpdfbit { type bits { bit b1; bit b2; bit b3; } } typedef tpdfun4 { type boolean; } typedef tpdfun3 { type union { type tpdfbit; type tpdfstring; } } typedef tpdfun2 { type union { type tpdfun3; type tpdfun4; } } typedef tpdfun1 { type union { type uint8; type decimal64 { fraction-digits 2; } } } container cont { container cont2 { leaf lfint8Next { type int8; } } list list2 { key "network-id"; leaf network-id { type string; } leaf server-provided { type string; } } leaf lfint8Min { type int8; } leaf lfint8Max { type int8; } leaf lfint16Min { type int16; } leaf lfint16Max { type int16; } leaf lfint32Min { type int32; } leaf lfint32Max { type int32; } leaf lfint64Min { type int64; } leaf lfint64Max { type int64; } leaf lfuint8Max { type uint8; } leaf lfuint16Max { type uint16; } leaf lfuint32Max { type uint32; } leaf lfuint64Max { type uint64; } leaf lfstr { type string; } leaf lfstr1 { type string { length "1..2"; } } leaf lfbool1 { type boolean; } leaf lfbool2 { type boolean; } leaf lfbool3 { type boolean; } leaf lfdecimal1 { type decimal64 { fraction-digits 2; } } leaf lfdecimal2 { type decimal64 { fraction-digits 2; } } leaf lfdecimal3 { type decimal64 { fraction-digits 2; } } leaf lfdecimal4 { type decimal64 { fraction-digits 2; } } leaf lfdecimal6 { type decimal64 { fraction-digits 2; } } leaf lfenum { type enumeration { enum "enum1"; enum "enum2"; enum "enum3"; enum "enum4"; } } leaf lfbits { type bits { bit bit1; bit bit2; bit bit3; bit bit4; } } leaf lfbinary { type binary; } leaf lfref1 { type leafref { path "../lfstr"; //reference to string type } } leaf lfref2 { type leafref { path "../lfint8Max"; //reference to number type } } leaf lfempty { type empty; } leaf lfunion1 { type union { type uint16; type string; } } leaf lfunion2 { type union { type decimal64 { fraction-digits 2; } type string; } } leaf lfunion4 { type union { type boolean; type string; } } leaf lfunion5 { type union { type uint16; type string; } } leaf lfunion7 { type tpdfun3; } leaf lfunion8 { type union { type uint16; type string; } } leaf lfunion9 { type union { type uint16; type boolean; } } leaf lfunion10 { type union { type bits { bit bt1; bit bt2; } type boolean; } } leaf lfunion11 { type union { type tpdfun1; type tpdfun2; } } leaf lfunion12 { type tpdfun2; } leaf lfunion13 { type tpdfbit; } leaf lfunion14 { type union { type enumeration { enum "zero"; enum "one"; } type uint16; } } } }
-
Story Points:5