get_or_create_domain: simplify with "--or-show" argument

Similar to other functions, this uses "--or-show" to avoid double
calls.
Co-Authored-By: Jens Harbott <harbott@osism.tech>
Change-Id: I548f9acd812687838e04b705f86f3b70d2b10caf
This commit is contained in:
Ian Wienand
2019年09月24日 12:44:16 +10:00
committed by Dr. Jens Harbott
parent f0ad3e5f3f
commit e3bc6b5f57

View File

@@ -875,14 +875,9 @@ function policy_add {
# Usage: get_or_create_domain <name> <description>
function get_or_create_domain {
local domain_id
# Gets domain id
domain_id=$(
# Gets domain id
openstack --os-cloud devstack-system-admin domain show 1ドル \
-f value -c id 2>/dev/null ||
# Creates new domain
openstack --os-cloud devstack-system-admin domain create 1ドル \
--description "2ドル" \
--description "2ドル" --or-show \
-f value -c id
)
echo $domain_id
Reference in New Issue
openstack/devstack
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.