Files
threshold/internal/tests/cli/boundary/_host_catalogs.bash
T

27 lines
596 B
Bash
Raw Normal View History

2020-10-12 14:56:23 -07:00
function create_host_catalog() {
2020-10-12 16:44:45 -07:00
local name=$1
local sid=$2
echo "sid $sid"
boundary host-catalogs create static \
-scope-id $sid \
-name $name \
-description 'test host catalog'
2020-10-12 14:56:23 -07:00
}
function read_host_catalog() {
2020-10-12 16:44:45 -07:00
boundary host-catalogs read -id $1
2020-10-12 14:56:23 -07:00
}
function delete_host_catalog() {
2020-10-12 16:44:45 -07:00
boundary host-catalogs delete -id $1
2020-10-12 14:56:23 -07:00
}
function list_host_catalogs() {
boundary host-catalogs list -scope-id $1 -format json
}
function host_catalog_id() {
local id=$1
local sid=$2
strip $(list_host_catalogs $sid | jq -c ".[] | select(.name | contains(\"$id\")) | .[\"id\"]")
}