* Strict namespace setting can be a problem when upgrading existing database files, such as startup-db or persistent running-db, or any other saved XML file.
* For backward compatibility, load of startup and running set CLICON_XML_NS_STRICT to false temporarily. * Added three-valued return values for several validate functions where -1 is fatal error, 0 is validation failed and 1 is validation OK. * This includes: `xmldb_put`, `xml_yang_validate_all`, `xml_yang_validate_add`, `xml_yang_validate_rpc`, `api_path2xml`, `api_path2xpath` * Added new xml functions for specific types: `xml_child_nr_notype`, `xml_child_nr_notype`, `xml_child_i_type`, `xml_find_type`.
This commit is contained in:
parent
861300d6c0
commit
0baebc93fd
71 changed files with 2679 additions and 1573 deletions
|
|
@ -50,9 +50,6 @@ EOF
|
|||
|
||||
xml='<config><x xmlns="urn:example:clixon"><y><a>1</a><b>2</b><c>first-entry</c></y><y><a>1</a><b>3</b><c>second-entry</c></y><y><a>2</a><b>3</b><c>third-entry</c></y><d/><f><e>a</e><e>b</e><e>c</e></f><g>astring</g></x></config>'
|
||||
|
||||
# Without xmlns
|
||||
xmlxxx='<config><x><y><a>1</a><b>2</b><c>first-entry</c></y><y><a>1</a><b>3</b><c>second-entry</c></y><y><a>2</a><b>3</b><c>third-entry</c></y><d/><f><e>a</e><e>b</e><e>c</e></f><g>astring</g></x></config>'
|
||||
|
||||
run(){
|
||||
name=$1
|
||||
mydir=$dir/$name
|
||||
|
|
@ -72,7 +69,7 @@ run(){
|
|||
expectmatch "$ret" $? "0" ""
|
||||
|
||||
new "datastore $name get"
|
||||
expectfn "$datastore $conf get /" 0 "^$xmlxxx$"
|
||||
expectfn "$datastore $conf get /" 0 "^$xml$"
|
||||
|
||||
new "datastore $name put all remove"
|
||||
expectfn "$datastore $conf put remove <config/>" 0 ""
|
||||
|
|
@ -87,7 +84,7 @@ run(){
|
|||
# expectfn "$datastore $conf put merge $xml" 0 ""
|
||||
|
||||
new "datastore $name get"
|
||||
expectfn "$datastore $conf get /" 0 "^$xmlxxx$"
|
||||
expectfn "$datastore $conf get /" 0 "^$xml$"
|
||||
|
||||
new "datastore $name put all delete"
|
||||
expectfn "$datastore $conf put remove <config/>" 0 ""
|
||||
|
|
@ -100,7 +97,7 @@ run(){
|
|||
expectmatch "$ret" $? "0" ""
|
||||
|
||||
new "datastore $name get"
|
||||
expectfn "$datastore $conf get /" 0 "^$xmlxxx$"
|
||||
expectfn "$datastore $conf get /" 0 "^$xml$"
|
||||
|
||||
new "datastore $name put top create"
|
||||
expectfn "$datastore $conf put create <config><x/></config>" 0 "" # error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue