ec2-api/ec2api/tests/unit
Feodor Tersin 8282371da4 Get rid of Nova DB access
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
2015-03-20 15:33:05 +03:00
..
__init__.py move unit tests to subdirectory. part 2. 2015-02-06 22:01:40 +03:00
abs.tar.gz move unit tests to subdirectory. part 1. 2015-02-06 22:00:33 +03:00
base.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
fakes.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
fakes_request_response.py move unit tests to subdirectory. part 2. 2015-02-06 22:01:40 +03:00
matchers.py move unit tests to subdirectory. part 2. 2015-02-06 22:01:40 +03:00
rel.tar.gz move unit tests to subdirectory. part 1. 2015-02-06 22:00:33 +03:00
test_address.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_api_init.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_apirequest.py Do not use namedtuple to mock objects 2015-03-05 17:14:26 +03:00
test_availability_zone.py Rework fake action execute interface 2015-03-06 00:56:19 +03:00
test_common.py move unit tests to subdirectory. part 2. 2015-02-06 22:01:40 +03:00
test_context.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_db_api.py Bring more compatibility with oslo_db 2015-03-01 01:07:56 +03:00
test_dhcp_options.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_ec2_validate.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_ec2utils.py Simplify usage of db_api.get_items_by_ids 2015-03-01 00:46:25 +03:00
test_faults.py move unit tests to subdirectory. part 1. 2015-02-06 22:00:33 +03:00
test_image.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_instance.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_internet_gateway.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_key_pair.py Rework fake action execute interface 2015-03-06 00:56:19 +03:00
test_metadata.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_metadata_api.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_middleware.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_network_interface.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_route_table.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_security_group.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_snapshot.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_subnet.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_tag.py Rework fake action execute interface 2015-03-06 00:56:19 +03:00
test_tools.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
test_volume.py Get rid of Nova DB access 2015-03-20 15:33:05 +03:00
test_vpc.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00
tools.py Supress error logging for passed negative unit tests 2015-03-08 00:00:45 +03:00