Commit adebcb68 authored by Pavel Spirek's avatar Pavel Spirek

http-tests moved to backend repository

parent a86d9e4c
#!/bin/bash
CLIENT_CERT="/home/pspirek/sslclient/pavel_curl.pem"
echo "--- conf-start 1"
POST_DATA='{ "jetconf:input": {"name": "Edit 1", "options": "config"} }'
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-start"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST -d "$POST_DATA" "$URL"
echo "--- POST new album"
POST_DATA="@jb_album_input.json"
URL="https://127.0.0.1:8443/restconf/data/example-jukebox:jukebox/library/artist=New%20Artist"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST -d "$POST_DATA" "$URL"
echo "--- conf-commit"
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-commit"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST "$URL"
#!/bin/bash
CLIENT_CERT="/home/pspirek/sslclient/pavel_curl.pem"
echo "--- conf-start 1"
POST_DATA='{ "jetconf:input": {"name": "Edit 1", "options": "config"} }'
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-start"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST -d "$POST_DATA" "$URL"
echo "--- POST new artist"
POST_DATA="@jb_artist_input.json"
URL="https://127.0.0.1:8443/restconf/data/example-jukebox:jukebox/library"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST -d "$POST_DATA" "$URL"
echo "--- conf-commit"
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-commit"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST "$URL"
#!/bin/bash
CLIENT_CERT="/home/pspirek/sslclient/pavel_curl.pem"
echo "--- conf-start 1"
POST_DATA='{ "jetconf:input": {"name": "Edit 1", "options": "config"} }'
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-start"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST -d "$POST_DATA" "$URL"
echo "--- DELETE album Wasting Time"
URL="https://127.0.0.1:8443/restconf/data/example-jukebox:jukebox/library/artist=New%20Artist/album=Wasting%20Time"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X DELETE -d "$POST_DATA" "$URL"
echo "--- conf-commit"
URL="https://127.0.0.1:8443/restconf/operations/jetconf:conf-commit"
curl --http2 -k --cert-type PEM -E $CLIENT_CERT -X POST "$URL"
{
"example-jukebox:album": {
"name": "Wasting Time",
"genre": "example-jukebox:alternative",
"year": 2017,
"song" : [
{
"name": "Wasting Time",
"location": "/media/foo/a7/wasting-time.mp3",
"format": "MP3",
"length": 100
}
]
}
}
{
"example-jukebox:artist": {
"name": "New Artist"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment