composer-cli: Only display the available compose types
The enabled bool is now being used so the cli should only show the types actually available on the architecture. Also modifies the test in test_compose_sanity.sh Related: rhbz#1751998
This commit is contained in:
parent
045bddb37a
commit
80dd997b9c
@ -197,7 +197,7 @@ def compose_types(socket_path, api_version, args, show_json=False, testmode=0):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
# output a plain list of identifiers, one per line
|
# output a plain list of identifiers, one per line
|
||||||
print("\n".join(t["name"] for t in result["types"]))
|
print("\n".join(t["name"] for t in result["types"] if t["enabled"]))
|
||||||
|
|
||||||
def compose_start(socket_path, api_version, args, show_json=False, testmode=0):
|
def compose_start(socket_path, api_version, args, show_json=False, testmode=0):
|
||||||
"""Start a new compose using the selected blueprint and type
|
"""Start a new compose using the selected blueprint and type
|
||||||
|
@ -11,8 +11,14 @@ CLI="${CLI:-./src/bin/composer-cli}"
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartTest "compose types"
|
rlPhaseStartTest "compose types"
|
||||||
rlAssertEquals "lists all supported types" \
|
if [ "$(uname -m)" = "x86_64" ]; then
|
||||||
"`$CLI compose types | xargs`" "alibaba ami ext4-filesystem google hyper-v live-iso liveimg-tar openstack partitioned-disk qcow2 tar vhd vmdk"
|
rlAssertEquals "lists all supported types" \
|
||||||
|
"`$CLI compose types | xargs`" "alibaba ami ext4-filesystem google hyper-v live-iso liveimg-tar openstack partitioned-disk qcow2 tar vhd vmdk"
|
||||||
|
else
|
||||||
|
# non-x86 architectures disable alibaba
|
||||||
|
rlAssertEquals "lists all supported types" \
|
||||||
|
"`$CLI compose types | xargs`" "ext4-filesystem live-iso liveimg-tar openstack partitioned-disk qcow2 tar"
|
||||||
|
fi
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
Loading…
Reference in New Issue
Block a user