Revert "Warn about invalid date when collecting logs"
This reverts commit 59450af179bb67c3784b916b5eba38fc08531a05. Reason for revert: Collect will fail unless an end date is specified. The end date defaults to 'any' and that is caught as an invalid time in the newly added error check. Change-Id: I614add5409ba974d00b83d8af5d2911b28533acd
This commit is contained in:
parent
59450af179
commit
73aec913ae
@ -759,23 +759,6 @@ while [[ ${#} -gt 0 ]] ; do
|
||||
done
|
||||
|
||||
|
||||
date -d $STARTDATE > /dev/null 2>/dev/null
|
||||
rc_start_date=${?}
|
||||
date -d $ENDDATE > /dev/null 2>/dev/null
|
||||
rc_end_date=${?}
|
||||
|
||||
if [ $rc_start_date != 0 ] ; then
|
||||
report_error "the start date is invalid" ${FAIL_INVALID_START_DATE}
|
||||
collect_exit ${FAIL_INVALID_START_DATE}
|
||||
elif [ $rc_end_date != 0 ] ; then
|
||||
report_error "the end date is invalid" ${FAIL_INVALID_END_DATE}
|
||||
collect_exit ${FAIL_INVALID_END_DATE}
|
||||
elif (( $STARTDATE > $ENDDATE )) ; then
|
||||
report_error "the start date is greater than the end date" ${FAIL_INVALID_DATE_RANGE}
|
||||
collect_exit ${FAIL_INVALID_DATE_RANGE}
|
||||
fi
|
||||
|
||||
|
||||
# startup state debug logs
|
||||
dlog "${TOOL_NAME} ver ${TOOL_REV}.${TOOL_REV} (pid:$$)"
|
||||
dlog "USERNAME = ${USER}"
|
||||
|
@ -54,10 +54,6 @@ FAIL_CONTINUE=51
|
||||
FAIL_SUBCLOUDNAME=52
|
||||
FAIL_NO_SUBCLOUDS=53
|
||||
FAIL_NOT_SYSTEMCONTROLLER=54
|
||||
FAIL_NAME_TOO_LONG=55
|
||||
FAIL_INVALID_START_DATE=56
|
||||
FAIL_INVALID_END_DATE=57
|
||||
FAIL_INVALID_DATE_RANGE=58
|
||||
|
||||
|
||||
# Warnings are above 200
|
||||
|
@ -767,22 +767,6 @@ while [[ ${#} -gt 0 ]] ; do
|
||||
shift # past argument or value
|
||||
done
|
||||
|
||||
date -d $STARTDATE > /dev/null 2>/dev/null
|
||||
rc_start_date=${?}
|
||||
date -d $ENDDATE > /dev/null 2>/dev/null
|
||||
rc_end_date=${?}
|
||||
|
||||
if [ $rc_start_date != 0 ] ; then
|
||||
report_error "the start date is invalid" ${FAIL_INVALID_START_DATE}
|
||||
collect_exit ${FAIL_INVALID_START_DATE}
|
||||
elif [ $rc_end_date != 0 ] ; then
|
||||
report_error "the end date is invalid" ${FAIL_INVALID_END_DATE}
|
||||
collect_exit ${FAIL_INVALID_END_DATE}
|
||||
elif (( $STARTDATE > $ENDDATE )) ; then
|
||||
report_error "the start date is greater than the end date" ${FAIL_INVALID_DATE_RANGE}
|
||||
collect_exit ${FAIL_INVALID_DATE_RANGE}
|
||||
fi
|
||||
|
||||
|
||||
# startup state debug logs
|
||||
dlog "${TOOL_NAME} ver ${TOOL_REV}.${TOOL_REV} (pid:$$)"
|
||||
|
@ -55,9 +55,6 @@ FAIL_SUBCLOUDNAME=52
|
||||
FAIL_NO_SUBCLOUDS=53
|
||||
FAIL_NOT_SYSTEMCONTROLLER=54
|
||||
FAIL_NAME_TOO_LONG=55
|
||||
FAIL_INVALID_START_DATE=56
|
||||
FAIL_INVALID_END_DATE=57
|
||||
FAIL_INVALID_DATE_RANGE=58
|
||||
|
||||
|
||||
# Warnings are above 200
|
||||
|
Loading…
x
Reference in New Issue
Block a user