* Fixed extension/unknown problem shown in latest openconfig where other than a single space was used between the unknown identifier and string

* Removed skiplist of openconfig/yangmodels tests to inside the test
This commit is contained in:
Olof hagsand 2021-02-23 13:45:46 +01:00
parent 187da4dc47
commit ab18946880
13 changed files with 62 additions and 41 deletions

View file

@ -14,7 +14,8 @@ fyang=$dir/test.yang
new "openconfig"
if [ ! -d "$OPENCONFIG" ]; then
# err "Hmm Openconfig dir does not seem to exist, try git clone https://github.com/openconfig/public?"
if [ "$s" = $0 ]; then exit 0; else return 0; fi
echo "...skipped: OPENCONFIG not set"
if [ "$s" = $0 ]; then exit 0; else return 0; fi
fi
OCDIR=$OPENCONFIG/release/models

View file

@ -82,6 +82,21 @@ module $APPNAME{
ex:e4 arg1{
uses bar;
}
extension posix-pattern {
argument "pattern";
}
typedef dotted-quad {
description "Only present for complex parsing of unknown-stmt";
type string {
pattern
"[a-f]" + "[0-9]";
ex:posix-pattern
// Strictly this comment is not supported if you see RFC syntax with only a SEP
// in unknwon-stmt: identifier [sep string]
'[f-w]' + '[o-q]';
}
}
}
EOF
@ -110,7 +125,7 @@ new "Add extension bar (is implemented)"
expecteof "$clixon_netconf -qf $cfg -D $DBG" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><bar xmlns=\"urn:example:clixon\">a string</bar></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>"
new "netconf get config"
expecteof "$clixon_netconf -qf $cfg -D $DBG" 0 "<rpc $DEFAULTNS><get-config><source><candidate/></source></get-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><data><bar xmlns=\"urn:example:clixon\">a string</bar></data></rpc-reply>]]>]]>$"
expecteof "$clixon_netconf -qf $cfg -D $DBG" 0 "<rpc $DEFAULTNS><get-config><source><candidate/></source></get-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><data><bar xmlns=\"urn:example:clixon\">a string</bar></data></rpc-reply>]]>]]>"
if [ $BE -ne 0 ]; then
new "Kill backend"

View file

@ -17,6 +17,7 @@ fyang=$dir/test.yang
if [ ! -d "$YANGMODELS" ]; then
# err "Hmm Yangmodels dir does not seem to exist, try git clone https://github.com/YangModels/yang?"
echo "...skipped: YANGMODELS not set"
if [ "$s" = $0 ]; then exit 0; else return 0; fi
fi

View file

@ -18,6 +18,7 @@ fyang=$dir/test.yang
YANGMODELS=/home/olof/tmp/yang
if [ ! -d "$YANGMODELS" ]; then
# err "Hmm Yangmodels dir does not seem to exist, try git clone https://github.com/YangModels/yang?"
echo "...skipped: YANGMODELS not set"
if [ "$s" = $0 ]; then exit 0; else return 0; fi
fi