+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
module foo {
yang-version 1;
namespace "urn:opendaylight.foo";
revision "2013-10-08" {
}
+
+ typedef bits-ext {
+ type bits {
+ bit pc {
+ position 0;
+ }
+ bit bpc {
+ position 1;
+ }
+ bit dpc {
+ position 2;
+ }
+ bit lbpc {
+ position 3;
+ }
+ bit spc {
+ position 4;
+ }
+ bit sfmof {
+ position 5;
+ }
+ bit sfapc {
+ position 6;
+ }
+ }
+ }
+
+ typedef myenum {
+ type enumeration {
+ enum zero;
+ enum one;
+ enum seven {
+ value 7;
+ }
+ }
+ default one;
+ }
+
+ typedef int32-ext0 {
+ type int32;
+ }
+
typedef int32-ext1 {
type int32 {
- range "2..20";
+ range "2..2147483647";
}
}
typedef my-decimal-type {
type decimal64 {
fraction-digits 6;
+ range "1.5..5.5";
+ }
+ }
+
+ typedef my-decimal-type2 {
+ type decimal64 {
+ fraction-digits 18;
+ range "0..1";
}
}
type union-ext2;
type string;
}
+ units "object id";
}
typedef union-ext4 {
}
}
+
+ typedef a {
+ type int8;
+ }
+
+ typedef b {
+ type int16;
+ }
+
+ typedef c {
+ type int32;
+ }
+
+ typedef d {
+ type int64 {
+ range 0..max;
+ }
+ }
+
+ typedef e {
+ type uint8;
+ }
+
+ typedef f {
+ type uint16;
+ }
+
+ typedef g {
+ type uint32;
+ }
+
+ typedef h {
+ type uint64;
+ }
+ container cont1 {
+ leaf leaf1 {
+ type union-ext1;
+ }
+ }
+
}