The i18n team has decided not to translate the logs because it seems
like it not very useful; operators prefer to have them in English so
that they can search for those strings on the internet.
Since we have removed log translations completely, we should add hacking
rule to prevent future mistakes.
Change-Id: Ia7524308ef2675f8d41ac80b37dfc7e3787efd90
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ib7ad61bac89e14561719434085b63cbad7e9a9be
security groups in default vpc only
changed check_and_create_default_vpc function to return default vpc
fix unit test of describe_security_groups
Change-Id: I50bad4a6a7152eb03599e3985a43162c81500049
1) fix bug with filtering
filters were applied before unpaired items is added to result
2) fix races in default security group creation
3) add waiter for associate/disassociate address
4) fix security group classic test
it should choose default group group only from classic groups
5) fix describe_vpc_with_filters test
it can run in parallel with other test with same CIDR
6) fix networks list for instance run at subnet creation/deletion
7) fix selective decsribe by names
it should not delete valid items from db
Change-Id: Iadadefb8b4abebbb3b8efc0e536e5de30ed23dab
Updating of db item's os_id should be disabled. But a special case (None
-> smth) should be allowed.
Change-Id: I9a38c99d1a5d024ef38339e8d41eff7856cb3ebe
Implement AWS feature which allows a user to adjust bdm specified in an
image. The feature is used with boot operation by specifying changed
device attributes with the device name.
Change-Id: Ifb9c215527cd84a60f21ab73fee672928b604300
Fixed exception for orphan "vpc-..."-named groups in describe.
Added check for not deleting default VPC group.
Added check for not deleting VPC if non-default groups exist.
Added check for not allowing creation of groups with existing names.
Change-Id: Ia205ff65409577d148c08b40a297d521d8a8acb1
Separate ancestors of ec2api internal and aws compliant exceptions.
EC2APIException - base exception class for ec2api with formatting
support
EC2MetadataException - still covers internal exception of ec2api
metadata service
EC2Exception - still covers AWS compliant exceptions
EC2xxxException - derive EC2Exception and are intended to group
exceptions by kind
Also remove unused attributes and code from base exception class.
Fix string constant style to be 'xxx' wherever it's possible.
Change-Id: I398c1e8e1816e0d4073fa5d3fdf0c0a939470399
Important features:
- Nova client with microversion support is required.
- Nova API server may not support microversion 2.3 (not tested).
- Attaching volumes are not displayed in an instance bdm. Because Cinder
volume doesn't yet contain attachment info (which contains a device
name), and Nova instance volumes_attached doesn't contain a device name
(mountpoint). But a bdm must contain it.
Other features:
- v2.3 is requested always
- RunInstance result is formatted w/o extra v2.3 info, so it doesn't
contain rootDeviceName and other such info
- if rootDeviceName property is empty it's omitted instead of
to report fake /dev/sda1 as Nova EC2 does it. This leads to omit
rootDeviceType property in this case as well.
Also the same is done for corresponding image's properties.
- deleteOnTermination volume property is omitted for volume at all, and
for instance bdm if Nova doesn't report it. Previously this volume
property contained 'False' only.
- DescribeVolumes isn't used in DescribeInstances (as opposed to
DescribeNetworkInterfaces), because both methods require actual state
of corresponding OS objects, so we prevent duplication of OS requests.
- Not merged Nova client is used
https://review.openstack.org/#/c/152569/
Also:
- fix multi-run instances for EC2 Classic mode
- safe getting of OS instance security groups
- ec2context module alias is renamed to ec2_context, as it is in other
code
- fakes.CinderVolume is renamed to local standard OSVolume
- fakes.OSInstance it transformed to be initialized from a dictionary,
as it is for other fakes.OSXxx objects
- fix code style
Depends-On: Icf2b9739aaf87b4c9af13ad64a310081a68f776e
Change-Id: Id65ea0f56ffd889286d5ca082e1daf2643205c52
It was necessary to:
- extend DB-layer API
- add ec2util functions to auto insert db items
- fix and improve Describer class
- use Describer class for volumes and snapshots
Change-Id: Ief0c3507fd1c7d7e3262a34cbd1d8bfa1d4a9ace