Created_at also uses a different time format that needs to be
addressed.
Change-Id: I5618a5f1ce3fdf0d49ce01cbad47683cf8e02762
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
print("ERROR: volume not found.")
sys.exit(1)
- if (datetime.strptime(volume.created_at, '%Y-%m-%dT%H:%M:%SZ')
+ if (datetime.strptime(volume.created_at, '%Y-%m-%dT%H:%M:%S.%f')
>= datetime.utcnow() - timedelta(minutes=minutes)):
print('WARN: volume "{}" is not older than {} minutes.'.format(
volume.name, minutes))