forked from coliu19/sockshop-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete.sh
executable file
·22 lines (14 loc) · 953 Bytes
/
delete.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash
set -ex
org="some org name"
# service=bbc
# printf -v payload '{ "organization_id": "xxx", "product_tag": "Book Shop", "name_id": "%s", "title": "demo %s", "description": "%s API", "contact": {} }' "$service" "$service" "$service"
# apiregistryctl -H "$host" service create --data "$payload" --debug || true
# service=abc
# printf -v payload '{ "organization_id": "xxx", "product_tag": "Book Shop", "name_id": "%s", "title": "demo %s", "description": "%s API", "contact": {} }' "$service" "$service" "$service"
# apiregistryctl -H "$host" service create --data "$payload" --debug || true
apiregistryctl -H "$host" service list
apiregistryctl -H "$host" service list | grep "$org"
apiregistryctl -H "$host" service list | grep "$org" | awk '{print $2}'
apiregistryctl -H "$host" service list | grep "$org" | awk '{print $2}' | xargs -I {} apiregistryctl service delete --debug {}
apiregistryctl -H "$host" service list | grep "$org"