Skip to content

Commit 10481b9

Browse files
author
guido tijskens
committed
LINUX-11093 oci-network-config man pages contains incorrect command line format
LINUX-11099 compatibility issue: oci-iscsi-config --destroy-volume has new prompt to confirm deletion (-y option)
1 parent 8ce1aa0 commit 10481b9

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

bin/oci-iscsi-config

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,24 @@ do
4040
cmd_line="${cmd_line} --compat"
4141
else
4242
# display information after operation. Used to be an option
43-
# change thiso to call ourself again with the show command
43+
# change this to call ourself again with the show command
4444
post_operation_show=1
4545
fi
4646
shift
4747
;;
48-
-C | --compartment) COMMAND="show" ; COMPS[${COMMAND}]+="$2," ; shift 2 ;;
49-
-i | --interactive) cmd_line="${cmd_line} --interactive" ; shift ;;
50-
-A | --all) cmd_line="${cmd_line} --all" ; shift ;;
51-
-f | --force) cmd_line="${cmd_line} --force" ; shift ;;
52-
-y | --yes) cmd_line="${cmd_line} --yes" ; shift ;;
53-
--attach-volume) cmd_line="${cmd_line} --attach-volume" ; shift ;;
54-
-d | --detach) COMMAND="detach" ; IQNS[${COMMAND}]+="$2," ; shift 2 ;;
55-
-a | --attach) COMMAND="attach" ; IQNS[${COMMAND}]+="$2," ; shift 2 ;;
56-
-c | --create-volume) COMMAND="create" ; cmd_line="${cmd_line} --size=$2" ; shift 2 ;;
57-
--destroy-volume) COMMAND="destroy" ; OCIDS[${COMMAND}]+="$2," ; shift 2 ;;
58-
--volume-name) cmd_line="${cmd_line} --volume-name=$2" ; shift 2 ;;
59-
--username) cmd_line="${cmd_line} --username=$2" ; shift 2 ;;
60-
--password) cmd_line="${cmd_line} --password=$2" ; shift 2 ;;
48+
-C | --compartment) COMMAND="show" ; COMPS[${COMMAND}]+="$2," ; shift 2 ;;
49+
-i | --interactive) cmd_line="${cmd_line} --interactive" ; shift ;;
50+
-A | --all) cmd_line="${cmd_line} --all" ; shift ;;
51+
-f | --force) cmd_line="${cmd_line} --force" ; shift ;;
52+
-y | --yes) cmd_line="${cmd_line} --yes" ; shift ;;
53+
--attach-volume) cmd_line="${cmd_line} --attach-volume" ; shift ;;
54+
-d | --detach) COMMAND="detach" ; IQNS[${COMMAND}]+="$2," ; shift 2 ;;
55+
-a | --attach) COMMAND="attach" ; IQNS[${COMMAND}]+="$2," ; shift 2 ;;
56+
-c | --create-volume) COMMAND="create" ; cmd_line="${cmd_line} --size=$2" ; shift 2 ;;
57+
--destroy-volume) COMMAND="destroy" ; OCIDS[${COMMAND}]+="$2,"; ASSUMEYES=True ; shift 2 ;;
58+
--volume-name) cmd_line="${cmd_line} --volume-name=$2" ; shift 2 ;;
59+
--username) cmd_line="${cmd_line} --username=$2" ; shift 2 ;;
60+
--password) cmd_line="${cmd_line} --password=$2" ; shift 2 ;;
6161
--help)
6262
if [ -z ${COMMAND} ]
6363
then
@@ -68,7 +68,7 @@ do
6868
fi
6969
break
7070
;;
71-
# end of parsing , everything getopt did not understood is after that , we do not care in our case
71+
# end of parsing , everything getopt did not understood is after that, we do not care in our case
7272
--) shift; break ;;
7373
*) COMMAND="usage" ; break ;;
7474
esac
@@ -96,8 +96,14 @@ then
9696
for i in "${COMPS[${COMMAND}]}"; do cmd_line="${cmd_line}$i,"; done
9797
fi
9898

99+
# add assumeyes to old destroy-volume command
100+
if [ ${ASSUMEYES} ]
101+
then
102+
cmd_line="${cmd_line} --yes"
103+
fi
104+
99105
# apply defaults to have the same behavior as before
100-
if [ ${COMMAND} == "create" ]
106+
if [ ${COMMAND} = "create" ]
101107
then
102108
cmd_line="${cmd_line} --attach-volume"
103109
fi

buildrpm/oci-utils.spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ rm -rf %{buildroot}
178178
/opt/oci-utils/tests/__init__*
179179

180180
%changelog
181+
* Tue Jun 1 2021 Guido Tijskens <guido.tijskens@oracle.com> -- 0.12.4-3
182+
- LINUX-11099 compatibility issue: oci-iscsi-config --destroy-volume has new prompt to confirm deletion (-y option)
183+
- LINUX-11093 oci-network-config man pages contains incorrect command line format
184+
- LINUX-11085 remove requirement for python3-requests package
185+
181186
* Wed May 12 2021 Guido Tijskens <guido.tijskens@oracle.com> -- 0.12.4
182187
- LINUX-10886 oci-network-config/oci-iscsi-config failures: __init__.py, line 58 in _oci_utils_exception_hook
183188
- LINUX-10964 oci-network-inspector test fails

0 commit comments

Comments
 (0)