You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/10 02:22:58 UTC
[3/7] libcloud git commit: Merge branch 'github-1020' into trunk
Closes #1020
Merge branch 'github-1020' into trunk
Closes #1020
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/359487cf
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/359487cf
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/359487cf
Branch: refs/heads/trunk
Commit: 359487cfd19d3add4ac58d85f610b54edaac75f4
Parents: f09734c f255f06
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 10 12:18:14 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 10 12:18:14 2017 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/ec2.py | 15 ++++++++++++++-
libcloud/test/compute/test_ec2.py | 3 ++-
2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/359487cf/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --cc libcloud/compute/drivers/ec2.py
index 839b889,a268a3e..7e52432
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@@ -3928,7 -3932,7 +3932,8 @@@ class BaseEC2NodeDriver(NodeDriver)
image_location=None, root_device_name=None,
block_device_mapping=None, kernel_id=None,
ramdisk_id=None, virtualization_type=None,
- ena_support=None, billing_products=None):
- ena_support=None, sriov_net_support=None):
++ ena_support=None, billing_products=None,
++ sriov_net_support=None):
"""
Registers an Amazon Machine Image based off of an EBS-backed instance.
Can also be used to create images from snapshots. More information
@@@ -3972,9 -3976,11 +3977,14 @@@
Network Adapter for the AMI
:type ena_support: ``bool``
+ :param billing_products: The billing product codes
+ :type billing_products: ''list''
+
+ :param sriov_net_support: Set to "simple" to enable enhanced
+ networking with the Intel 82599 Virtual
+ Function interface
+ :type sriov_net_support: ``str``
+
:rtype: :class:`NodeImage`
"""
@@@ -4009,10 -4015,9 +4019,13 @@@
if ena_support is not None:
params['EnaSupport'] = ena_support
+ if billing_products is not None:
+ params.update(self._get_billing_product_params(
+ billing_products))
+
+ if sriov_net_support is not None:
+ params['SriovNetSupport'] = sriov_net_support
+
image = self._to_image(
self.connection.request(self.path, params=params).object
)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/359487cf/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --cc libcloud/test/compute/test_ec2.py
index e51cf42,4a894bc..3e761a5
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@@ -565,7 -560,7 +565,8 @@@ class EC2Tests(LibcloudTestCase, TestCa
architecture='x86_64',
block_device_mapping=mapping,
ena_support=True,
- billing_products=['ab-5dh78019'])
++ billing_products=['ab-5dh78019'],
+ sriov_net_support='simple')
self.assertEqual(image.id, 'ami-57c2fb3e')
def test_ex_list_availability_zones(self):