This patch eliminates bad test models, which use constructs which
are not valid YANG identifiers.
Change-Id: If0fbf08226d64b76def98421eb4d68e781e97b98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
result = provider.getTypeDefaultConstruction(leaf);
assertNotNull(result);
assertTrue(!result.isEmpty());
result = provider.getTypeDefaultConstruction(leaf);
assertNotNull(result);
assertTrue(!result.isEmpty());
- assertEquals("new org.opendaylight.yang.gen.v1.urn.opendaylight.org.test.type.provider.model.rev140912.TestTypeProviderData.RootBitsLeaf(false, true, false)",
+ assertEquals("new org.opendaylight.yang.gen.v1.urn.opendaylight.org.test.type.provider.model.rev140912.TestTypeProviderData.RootBitsLeaf(true, false, false)",
result);
leaf = provideLeafForGetDefaultConstructionTestCase("yang-bits");
result);
leaf = provideLeafForGetDefaultConstructionTestCase("yang-bits");
- result = provider.getTypeDefaultConstruction(leaf, "10-Mb-only");
+ result = provider.getTypeDefaultConstruction(leaf, "only-10-Mb");
assertNotNull(result);
assertTrue(!result.isEmpty());
assertNotNull(result);
assertTrue(!result.isEmpty());
- assertEquals("new org.opendaylight.yang.gen.v1.urn.opendaylight.org.test.base.yang.types.rev140914.YangBits(true, false, false)",
+ assertEquals("new org.opendaylight.yang.gen.v1.urn.opendaylight.org.test.base.yang.types.rev140914.YangBits(false, false, true)",
result);
leaf = provideLeafForGetDefaultConstructionTestCase("bar-id");
result);
leaf = provideLeafForGetDefaultConstructionTestCase("bar-id");
bit auto-sense-speed {
position 1;
}
bit auto-sense-speed {
position 1;
}
typedef yang-instance-identifier {
type instance-identifier;
}
typedef yang-instance-identifier {
type instance-identifier;
}
-}
\ No newline at end of file
bit auto-sense-speed {
position 1;
}
bit auto-sense-speed {
position 1;
}
-}
\ No newline at end of file
bit auto-sense-speed {
position 1;
}
bit auto-sense-speed {
position 1;
}
default invalid-prefix:my-derived-imported-identity;
}
}
default invalid-prefix:my-derived-imported-identity;
}
}
-}
\ No newline at end of file
organization "test.org";
revision "2017-06-08";
organization "test.org";
revision "2017-06-08";
container my-inner-cont {
leaf my-leaf {
type string;
container my-inner-cont {
leaf my-leaf {
type string;
anydata root-anydata {
description "I am root anydata";
}
anydata root-anydata {
description "I am root anydata";
}
-}
\ No newline at end of file
organization "test.org";
revision "2017-06-07";
organization "test.org";
revision "2017-06-07";
container my-inner-cont {
leaf my-leaf {
type string;
container my-inner-cont {
leaf my-leaf {
type string;
anyxml root-anyxml {
description "I am root anyxml";
}
anyxml root-anyxml {
description "I am root anyxml";
}
-}
\ No newline at end of file
-}
\ No newline at end of file
container my-inner-cont {
leaf my-leaf {
type string;
container my-inner-cont {
leaf my-leaf {
type string;
-}
\ No newline at end of file
organization "test.org";
revision "2017-02-06";
organization "test.org";
revision "2017-02-06";
-}
\ No newline at end of file
- container *my-import-%cont {
+ container _.my-import-.cont {
leaf test-leaf {
type string;
}
}
leaf test-leaf {
type string;
}
}
-}
\ No newline at end of file
-}
\ No newline at end of file