Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python3-ec2imgutils for
openSUSE:Factory checked in at 2021-08-28 22:29:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-ec2imgutils (Old)
and /work/SRC/openSUSE:Factory/.python3-ec2imgutils.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-ec2imgutils"
Sat Aug 28 22:29:01 2021 rev:14 rq:914684 version:9.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-ec2imgutils/python3-ec2imgutils.changes
2020-12-12 20:36:07.390087348 +0100
+++
/work/SRC/openSUSE:Factory/.python3-ec2imgutils.new.1899/python3-ec2imgutils.changes
2021-08-28 22:29:13.989981871 +0200
@@ -1,0 +2,8 @@
+Fri Aug 20 14:37:01 UTC 2021 - Robert Schweikert <[email protected]>
+
+- Update to version 9.0.2 (bsc#1189649)
+ + In addition to tagging images in AWS also set them to deprecated
+ in EC2. This allows the framework to hide the images from new users
+ when images are no longer supposed to be used.
+
+-------------------------------------------------------------------
Old:
----
ec2imgutils-9.0.1.tar.bz2
New:
----
ec2imgutils-9.0.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-ec2imgutils.spec ++++++
--- /var/tmp/diff_new_pack.myNPUi/_old 2021-08-28 22:29:15.501983439 +0200
+++ /var/tmp/diff_new_pack.myNPUi/_new 2021-08-28 22:29:15.505983444 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-ec2imgutils
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define upstream_name ec2imgutils
Name: python3-ec2imgutils
-Version: 9.0.1
+Version: 9.0.2
Release: 0
Summary: Image management utilities for AWS EC2
License: GPL-3.0-or-later
@@ -27,12 +27,11 @@
URL: https://github.com/SUSE-Enceladus/ec2imgutils
Source0: %{upstream_name}-%{version}.tar.bz2
Requires: python3
-Requires: python3-boto3 >= 1.4.1
+Requires: python3-boto3 >= 1.18.7
Requires: python3-dateutil
Requires: python3-paramiko
-BuildRequires: python3-boto3 >= 1.4.1
+BuildRequires: python3-boto3 >= 1.18.7
BuildRequires: python3-dateutil
-Requires: python3-paramiko
BuildRequires: python3-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
++++++ ec2imgutils-9.0.1.tar.bz2 -> ec2imgutils-9.0.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2imgutils-9.0.1/lib/ec2imgutils/VERSION
new/ec2imgutils-9.0.2/lib/ec2imgutils/VERSION
--- old/ec2imgutils-9.0.1/lib/ec2imgutils/VERSION 2020-12-12
13:19:51.632172408 +0100
+++ new/ec2imgutils-9.0.2/lib/ec2imgutils/VERSION 2021-08-27
21:46:17.765008858 +0200
@@ -1 +1 @@
-9.0.1
+9.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2imgutils-9.0.1/lib/ec2imgutils/ec2deprecateimg.py
new/ec2imgutils-9.0.2/lib/ec2imgutils/ec2deprecateimg.py
--- old/ec2imgutils-9.0.1/lib/ec2imgutils/ec2deprecateimg.py 2020-12-12
13:19:51.632172408 +0100
+++ new/ec2imgutils-9.0.2/lib/ec2imgutils/ec2deprecateimg.py 2021-08-27
21:46:17.765008858 +0200
@@ -1,4 +1,4 @@
-# Copyright 2018 SUSE LLC
+# Copyright 2021 SUSE LLC
#
# This file is part of ec2imgutils
#
@@ -114,17 +114,8 @@
# ---------------------------------------------------------------------
def _format_date(self, date):
"""Format the date to YYYYMMDD"""
- year = date.year
- month = date.month
- day = date.day
- date = '%s' % year
- for item in [month, day]:
- if item > 9:
- date += '%s' % item
- else:
- date += '0%s' % item
- return date
+ return date.strftime('%Y%m%d')
# ---------------------------------------------------------------------
def _get_all_type_match_images(self, filter_replacement_image=None):
@@ -249,6 +240,7 @@
'Replacement image {}'.format(self.replacement_image_tag)
)
+ ec2 = self._connect()
for image in images:
existing_tags = image.get('Tags')
tagged = False
@@ -277,12 +269,23 @@
removal_date_data,
replacement_image_data
]
- self._connect().create_tags(
+ ec2.create_tags(
Resources=[image['ImageId']], Tags=tags
)
self.log.debug(
'\t\ttagged:%s\t%s' % (image['ImageId'], image['Name'])
)
+ # There is a difference in terminology. In EC2 deprecated means
+ # an image cannot be used anymore by new users, this is similar
+ # to a deletion. For ec2imgutils deprecation means an image should
+ # no longer be used. Therefore we set the calculated deletion
+ # date as the deprecation date in AWS
+ ec2.enable_image_deprecation(
+ ImageId=image['ImageId'],
+ DeprecateAt=datetime.datetime.strptime(
+ self.deletion_date, '%Y%m%d'
+ )
+ )
# ---------------------------------------------------------------------
def print_deprecation_info(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2imgutils-9.0.1/man/man1/ec2deprecateimg.1
new/ec2imgutils-9.0.2/man/man1/ec2deprecateimg.1
--- old/ec2imgutils-9.0.1/man/man1/ec2deprecateimg.1 2020-12-12
13:19:51.636172372 +0100
+++ new/ec2imgutils-9.0.2/man/man1/ec2deprecateimg.1 2021-08-27
21:46:17.781008736 +0200
@@ -8,16 +8,20 @@
.B ec2deprecateimg [option]
.SH DESCRIPTION
.B ec2deprecateimg
-Deprecate images in EC2 by adding tags to an image. The EC2 platform does
-not support a formal deprecation mechanism. The mechanism implemented by this
-tool is a convention. Unfortunately the tags are not sticky, i.e. not visible
-to others if the image is shared.
+Deprecate images in EC2 by adding tags to an image and enabling AWS image
+deprecation. Image tagging is retained for backwards compatibility. The
+tagging mechanism is an implementation based on convention. Tags are not
+sticky, i.e. not visible to others if the image is shared.
Images are tagged with:
- Deprecated on -> today's date in YYYYMMDD format
- Removal date -> today's date plus the deprecation period specified
- Replacement image -> The AMI ID and name of the replacement image
+In EC2 a deprecated image is set into a state that makes it invisible to
+new users. This can be considered equivalent to a deletion. As such the tool
+sets the deprecation data in EC2 to the removal date set for the tag.
+
The image set as the replacement is removed from the list of potential images
to be deprecated before any matching takes place. Therefore, the deprecation
search criteria specified with
@@ -218,4 +222,4 @@
.I exampleimage_v16
name exactly.
.SH AUTHOR
-Robert Schweikert ([email protected])
+SUSE Public Cloud Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2imgutils-9.0.1/man/man1/ec2removeimg.1
new/ec2imgutils-9.0.2/man/man1/ec2removeimg.1
--- old/ec2imgutils-9.0.1/man/man1/ec2removeimg.1 2020-12-12
13:19:51.636172372 +0100
+++ new/ec2imgutils-9.0.2/man/man1/ec2removeimg.1 2021-08-27
21:46:17.781008736 +0200
@@ -70,7 +70,7 @@
image that matches the name fragment will be removed. This
option is mutually exclusive with
.IR --image-id ,
-.IR --image-name-name ,
+.IR --image-name ,
and
.IR --image-name-match .
.IP "--image-name-match REGEX"
@@ -78,7 +78,7 @@
regular expression will be removed. This option is mutually
exclusive with
.IR --image-id ,
-.IR --image-name-name ,
+.IR --image-name ,
and
.IR --image-name-frag .
.IP "--no-confirm"