Skip to content

Commit 6b352aa

Browse files
committed
fix(sztp): git ignore generated_config.json
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
1 parent 4f0f1de commit 6b352aa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sztp/generated-client/
22
sztp/generated-server/
3+
sztp/generated_config.json

sztp/generate.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export SZTPD_NBI_PORT=$(awk '/SZTPD_NBI_PORT:/{print $2}' ../docker-compose.yml)
3232
export SZTPD_SBI_PORT=$(awk '/SZTPD_SBI_PORT:/{print $2}' ../docker-compose.yml)
3333

3434
# generate template
35-
envsubst "$(printf '${%s} ' ${names[@]})" < template.json > config.json
35+
envsubst "$(printf '${%s} ' ${names[@]})" < template.json > generated_config.json
3636

3737
# check what changed
38-
diff template.json config.json || true
38+
diff template.json generated_config.json || true
3939

4040
# client
4141
echo "Now COPY client files to the remote clients:"
@@ -44,6 +44,6 @@ echo scp ./generated-client/opi*.pem root@172.22.3.2:/mnt/
4444
# server
4545
echo "Now CONFIG server:"
4646
echo curl --fail -i -X GET --user my-admin@example.com:my-secret -H 'Accept:application/yang-data+json' "http://127.0.0.1:${SZTPD_INIT_PORT}/restconf/ds/ietf-datastores:running"
47-
echo curl --fail -i -X PUT --user my-admin@example.com: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"
47+
echo curl --fail -i -X PUT --user my-admin@example.com: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"
4848
echo curl --fail -i -X GET --user my-admin@example.com:my-secret -H 'Accept:application/yang-data+json' "http://127.0.0.1:${SZTPD_NBI_PORT}/restconf/ds/ietf-datastores:running"
4949
echo curl --fail -H Accept:application/yang-data+json "http://127.0.0.1:${SZTPD_NBI_PORT}/.well-known/host-meta"

0 commit comments

Comments
 (0)