-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sztp): git ignore generated_config.json
Signed-off-by: Boris Glimcher <[email protected]>
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sztp/generated-client/ | ||
sztp/generated-server/ | ||
sztp/generated_config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,10 @@ export SZTPD_NBI_PORT=$(awk '/SZTPD_NBI_PORT:/{print $2}' ../docker-compose.yml) | |
export SZTPD_SBI_PORT=$(awk '/SZTPD_SBI_PORT:/{print $2}' ../docker-compose.yml) | ||
|
||
# generate template | ||
envsubst "$(printf '${%s} ' ${names[@]})" < template.json > config.json | ||
envsubst "$(printf '${%s} ' ${names[@]})" < template.json > generated_config.json | ||
|
||
# check what changed | ||
diff template.json config.json || true | ||
diff template.json generated_config.json || true | ||
|
||
# client | ||
echo "Now COPY client files to the remote clients:" | ||
|
@@ -44,6 +44,6 @@ echo scp ./generated-client/opi*.pem [email protected]:/mnt/ | |
# server | ||
echo "Now CONFIG server:" | ||
echo curl --fail -i -X GET --user [email protected]:my-secret -H 'Accept:application/yang-data+json' "http://127.0.0.1:${SZTPD_INIT_PORT}/restconf/ds/ietf-datastores:running" | ||
echo curl --fail -i -X PUT --user [email protected]:my-secret --data @./config.json -H 'Content-Type:application/yang-data+json' "http://127.0.0.1:${SZTPD_INIT_PORT}/restconf/ds/ietf-datastores:running" | ||
echo curl --fail -i -X PUT --user [email protected]:my-secret --data @./generated_config.json -H 'Content-Type:application/yang-data+json' "http://127.0.0.1:${SZTPD_INIT_PORT}/restconf/ds/ietf-datastores:running" | ||
echo curl --fail -i -X GET --user [email protected]:my-secret -H 'Accept:application/yang-data+json' "http://127.0.0.1:${SZTPD_NBI_PORT}/restconf/ds/ietf-datastores:running" | ||
echo curl --fail -H Accept:application/yang-data+json "http://127.0.0.1:${SZTPD_NBI_PORT}/.well-known/host-meta" |