1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
| curl -s -i -X PUT -H "Accept: application/yang-data+xml" -d '<album xmlns="http://example.com/ns/example-jukebox"><name>Wasting Light</name><year>2031</year></album>' http://localhost/restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album=Wasting%20Light
curl -s -i -X POST -H "Accept: application/yang-data+xml" -d '<song xmlns="http://example.com/ns/example-jukebox"><name>song1</name><location>music</location><format>MP3</format><length>286</length></song>' http://localhost/restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album=Wasting%20Light
<album xmlns="http://example.com/ns/example-jukebox"><name>Wasting Light</name><genre>jbox:alternative</genre><year>2011</year></album>
<name>Wasting Light</name><genre>jbox:alternative</genre><year>2011</year>
<jukebox xmlns="http://example.com/ns/example-jukebox"> <library> <artist> <name>Foo Fighters</name> <album> <name>One by One</name> <year>2012</year> <song> <name>song1</name> <location>/home/music</location> <format>MP3</format> <length>286</length> </song> </album> </artist> </library> </jukebox>
[INF]: api_path2xml striped data: [<name>Wasting Light</name><genre>jbox:alternative</genre><year>2011</year>] [INF]: api_path2xml cxml: [<jukebox xmlns="http://example.com/ns/example-jukebox"><library><artist><name>Foo Fighters</name><album><name>Wasting Light</name><genre>jbox:alternative</genre><year>2011</year></album></artist></library></jukebox>]
curl -s -i -X PATCH -H "Accept: application/yang-data+json" -d '{ "example-jukebox:jukebox" : { "library" : { "artist" : [ { "name" : "Fighters", "album" : [ { "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting-light.mp3", "format" : "MP3", "length" : 286 } ] } ] } ] } } }' http://localhost/restconf/data
curl -s -i -X PATCH -H "Accept: application/yang-data+json" -d '{ "example-jukebox:album" : [ { "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting light.mp3", "format" : "MP3", "length" : 286 } ] } ] }' http://localhost/restconf/data/example-jukebox:jukebox/library/artist=Fighters/album=Light
{ "example-jukebox:album" : [ { "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting-light.mp3", "format" : "MP3", "length" : 286 } ] } ] }
{ "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting-light.mp3", "format" : "MP3", "length" : 286 } ] }
{ "example-jukebox:jukebox" : {
{ "example-jukebox:jukebox" : { "library" : {
{ "example-jukebox:jukebox" : { "library" : { "artist" : [ { "name" : "Fighters",
{ "example-jukebox:jukebox" : { "library" : { "artist" : [ { "name" : "Fighters", "album" : [ { "name" : "Light", "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting light.mp3", "format" : "MP3", "length" : 286 } ] } ] } ] } } }
{ "example-jukebox:jukebox" : { "library" : { "artist" : [ { "name" : "Fighters", "album" : [ { "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting-light.mp3", "format" : "MP3", "length" : 286 } ] } ] } ] } } }
{ "example-jukebox:jukebox" : { "library" : { "artist" : [ { "name" : "Fighters", "album" : [ { "name" : "Light", "genre" : "example-jukebox:alternative", "year" : 2011, "song" : [ { "name" : "Light", "location" : "/media/foo/a7/wasting-light.mp3", "format" : "MP3", "length" : 286 } ] } ] } ] } } }
|