Hello community,
here is the log from the commit of package python3-ec2uploadimg for
openSUSE:Factory checked in at 2017-09-13 22:36:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-ec2uploadimg (Old)
and /work/SRC/openSUSE:Factory/.python3-ec2uploadimg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-ec2uploadimg"
Wed Sep 13 22:36:36 2017 rev:2 rq:523775 version:5.0.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python3-ec2uploadimg/python3-ec2uploadimg.changes
2017-08-24 18:49:15.587940625 +0200
+++
/work/SRC/openSUSE:Factory/.python3-ec2uploadimg.new/python3-ec2uploadimg.changes
2017-09-13 22:36:56.639782421 +0200
@@ -1,0 +2,8 @@
+Tue Sep 12 18:01:51 UTC 2017 - [email protected]
+
+- Update to version 5.0.1
+ + Add support for billing code addition during registration
+ ~ Introduces incompatibility in API
+ + Read VPC subnet information from ec2utils.conf
+
+-------------------------------------------------------------------
Old:
----
ec2uploadimg-4.0.0.tar.bz2
New:
----
ec2uploadimg-5.0.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-ec2uploadimg.spec ++++++
--- /var/tmp/diff_new_pack.4d2LJr/_old 2017-09-13 22:36:57.167708091 +0200
+++ /var/tmp/diff_new_pack.4d2LJr/_new 2017-09-13 22:36:57.171707527 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-ec2uploadimg
+# spec file for package python3-ec2uploadimg
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,17 +18,17 @@
%define upstream_name ec2uploadimg
Name: python3-ec2uploadimg
-Version: 4.0.0
+Version: 5.0.1
Release: 0
Summary: Upload an image to EC2
License: GPL-3.0+
Group: System/Management
Url: https://github.com/SUSE/Enceladus
Source0: %{upstream_name}-%{version}.tar.bz2
+Requires: python-ec2utilsbase < 4.0.0
+Requires: python-ec2utilsbase >= 3.0.0
Requires: python3
Requires: python3-boto3 >= 1.4.1
-Requires: python-ec2utilsbase >= 3.0.0
-Requires: python-ec2utilsbase < 4.0.0
Requires: python3-paramiko
BuildRequires: python3-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ ec2uploadimg-4.0.0.tar.bz2 -> ec2uploadimg-5.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2uploadimg-4.0.0/ec2uploadimg
new/ec2uploadimg-5.0.1/ec2uploadimg
--- old/ec2uploadimg-4.0.0/ec2uploadimg 2017-08-09 17:33:16.882810570 +0200
+++ new/ec2uploadimg-5.0.1/ec2uploadimg 2017-09-12 16:51:20.472834548 +0200
@@ -49,6 +49,12 @@
metavar='EC2_BACKING_STORE'
)
argparse.add_argument(
+ '--billing-codes',
+ dest='billingCodes',
+ help='The BillingProduct codes, only available to some accounts',
+ metavar='BILLING_CODES'
+)
+argparse.add_argument(
'--boot-kernel',
dest='akiID',
help='AWS kernel ID (aki) to boot the new image (Optional)',
@@ -256,6 +262,7 @@
if not os.path.isfile(config_file):
print('Configuration file "%s" not found.' % config_file)
sys.exit(1)
+
try:
config = utils.get_config(config_file)
except Exception as e:
@@ -331,7 +338,10 @@
root_volume_size = args.rootVolSize
regions = args.regions.split(',')
-if len(regions) > 1 and (args.amiID or args.akiID or args.runningID):
+if (
+ len(regions) > 1
+ and (args.amiID or args.akiID or args.runningID or args.vpcSubnetId)
+):
print(
'Incompatible arguments: multiple regions specified',
file=sys.stderr
@@ -403,7 +413,7 @@
sys.exit(1)
else:
print(
- 'Could not reliable determine the ',
+ 'Could not reliably determine the ',
end=' ',
file=sys.stderr
)
@@ -468,9 +478,30 @@
print('Could not determin ssh user to use', file=sys.stderr)
sys.exit(1)
+ vpc_subnet_id = args.vpcSubnetId
+ if not vpc_subnet_id and not (args.amiID or args.runningID):
+ # Depending on instance type an instance may possibly only
+ # launch inside a subnet. Look in the config for a subnet if none
+ # is given and the AMI to use was not specified on the command line
+ try:
+ vpc_subnet_id = utils.get_from_config(args.accountName,
+ config,
+ region,
+ 'subnet_id_%s' % region,
+ '--vpc-subnet-id')
+ if args.verbose and vpc_subnet_id:
+ print('Using VPC subnet: "%s"' % vpc_subnet_id)
+ except:
+ if args.verbose:
+ msg = 'Not using a subnet-id, none given on the '
+ msg += 'command line and none found in config for '
+ msg += '"subnet_id_%s" value' % region
+ print(msg)
+
uploader = ec2upimg.EC2ImageUploader(
access_key=access_key,
backing_store=args.backingStore,
+ billing_codes=args.billingCodes,
bootkernel=bootkernel,
ena_support=args.ena,
image_arch=args.arch,
@@ -491,7 +522,7 @@
use_grub2=args.grub2,
use_private_ip=args.usePrivateIP,
verbose=args.verbose,
- vpc_subnet_id=args.vpcSubnetId,
+ vpc_subnet_id=vpc_subnet_id,
wait_count=args.waitCount
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2uploadimg-4.0.0/lib/ec2utils/ec2uploadimg.py
new/ec2uploadimg-5.0.1/lib/ec2utils/ec2uploadimg.py
--- old/ec2uploadimg-4.0.0/lib/ec2utils/ec2uploadimg.py 2017-08-09
17:33:16.866810874 +0200
+++ new/ec2uploadimg-5.0.1/lib/ec2utils/ec2uploadimg.py 2017-09-12
16:51:20.472834548 +0200
@@ -23,8 +23,8 @@
import time
-from .ec2utils import EC2Utils
-from .ec2UtilsExceptions import *
+from ec2utils.ec2utils import EC2Utils
+from ec2utils.ec2UtilsExceptions import *
class EC2ImageUploader(EC2Utils):
@@ -33,6 +33,7 @@
def __init__(self,
access_key=None,
backing_store='ssd',
+ billing_codes=None,
bootkernel=None,
config=None,
ena_support=False,
@@ -60,6 +61,7 @@
self.access_key = access_key
self.backing_store = backing_store
+ self.billing_codes = billing_codes
self.bootkernel = bootkernel
self.ena_support = ena_support
self.image_arch = image_arch
@@ -731,10 +733,12 @@
'RootDeviceName': root_device_name,
'VirtualizationType': self.image_virt_type
}
- if self.sriov_type:
- register_args['SriovNetSupport'] = self.sriov_type
+ if self.billing_codes:
+ register_args['BillingProducts'] = self.billing_codes.split(',')
if self.image_virt_type == 'paravirtual':
register_args['KernelId'] = self.bootkernel
+ if self.sriov_type:
+ register_args['SriovNetSupport'] = self.sriov_type
ami = self._connect().register_image(**register_args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2uploadimg-4.0.0/lib/ec2utils/upload_VERSION
new/ec2uploadimg-5.0.1/lib/ec2utils/upload_VERSION
--- old/ec2uploadimg-4.0.0/lib/ec2utils/upload_VERSION 2017-08-09
17:33:16.866810874 +0200
+++ new/ec2uploadimg-5.0.1/lib/ec2utils/upload_VERSION 2017-09-12
16:51:20.472834548 +0200
@@ -1 +1 @@
-4.0.0
+5.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ec2uploadimg-4.0.0/man/man1/ec2uploadimg.1
new/ec2uploadimg-5.0.1/man/man1/ec2uploadimg.1
--- old/ec2uploadimg-4.0.0/man/man1/ec2uploadimg.1 2017-08-09
17:33:16.874810722 +0200
+++ new/ec2uploadimg-5.0.1/man/man1/ec2uploadimg.1 2017-09-12
16:51:20.472834548 +0200
@@ -52,6 +52,10 @@
.I mag,
or
.I ssd,mag.
+.IP "--billing-codes BILLING_CODES"
+Specifies the billing product codes to apply to the image during
+registration. This functionality is restricted to specific accounts
+within EC2.
.IP "--boot-kernel AWS_AKI_ID"
Specifies the
.I aki_id
@@ -146,7 +150,7 @@
option for a given region in the configuration file.
.IP "--use-private-ip"
Use the private IP of the helper instance to upload the new image. This is
-helful when an image is to be created and only a private VPC is available.
+helpful when an image is to be created and only a private VPC is available.
.IP "--use-root-swap"
Create the new image using the root swap method. The helper instance used
to upload the image will be stopped and the created image volume will be
@@ -171,8 +175,29 @@
.I --use-private-ip
command line option. The ID should start with
.I subnet-.
+Instance type and subnets are to a certain degree linked in that it may not
+be possible to launch the configured helper instance type outside a VPC
+subnet. Therefore, if the
+.I --vpc-subnet-id
+is not specified on the command line and neither
+.I --ec2-ami
+or
+.I --instance-id
+are specified on the command line an attempt will be made to retrieve the
+subnet-id from the configuration. The configuration is
+.I subnet_id_REGION
+where region is one of the known region identifiers such as
+.I us-east-1.
+The region given with the
+.I --regions
+command line argument is used. Specifying multiple regions with the
+.I --regions
+argument and using the
+.I --vpc-subnet-id
+argument is incompatible. When targeting multiple regions the subnet-id must
+be set in the configuration file.
.IP "--wait-count AWS_WAIT_COUNT"
-Specifies the number of times to wait for the AWS operation timout. The
+Specifies the number of times to wait for the AWS operation timeout. The
default value is 1 which is equivalent to 600 seconds.
.SH EXAMPLE
ec2uploadimg --account example -d "My first image" -m x86_64 -n my_linux_image
-r us-east-1 PATH_TO_COMPRESSED_FILE