- bump version from 2 to 3 for cinderclient
- update aws ec2 interface for create_colume and
create_network_interface. add cilent_token param
- fix describe network interface - something was
changed in neutron ports output
- set metadata port for OVN conf file also
Change-Id: Ie3e5a5930d5a8159050ecc0900239935558dddd7
When ec2-api-metadata and nova-api are using the same
memcached server as a cache backend, the cached values
get intermixed due to the fact that the cache keys are
the same. The result is that either nova-api or
ec2-api-metadata will report cache value errors.
This commit fixes this potential problem by using
a different cache key prefix for the ec2-api metadata
entries.
Change-Id: Ibd26b33b3370d5c9c6cca0bb6e0d9c9eb03c0d50
Closes-Bug: #1717494
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
if configured adds the resulting metadata tree to the cache and
upon next request retrieves the data from the cache
reduces the time of the second and subsequent sequential requests
to the metadata approximately from 2.5 seconds to 0.1
Change-Id: Ia1408f6ef407eb97db1789b5b60d6b36b162ba4d
removed NovaEngine in addresses, availability_zones, instances, security_groups
removed unit tests for NovaEngine
disabled some unit tests using NovaEngine for further reworking
Closes-bug: #1691484
Change-Id: I662d5b57b9e46be80c1d2093038ada83897565eb
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.
See http://lists.openstack.org/pipermail/openstack-dev/2017-March/thread.html#113365.
Change-Id: I4418a388934ef58acb70c7f637b0236a6ccc7fe6
Closes-Bug: #1682101
Previously this was skipped because user keys were not accessible with
admin account. Since Nova v2.10 microversion provides admin access to
user keys's public data, this gap with legacy Nova EC2 could be fixed.
Change-Id: If0bb004eb894f6474fb0a65c8fb21dfbe43ae268
fix working with strings for metadata server,
for some instance properties and for errors.
do some magic with types/encoding.
Change-Id: I2446fc48b51dd903a719aa4dbb1a5556af19e5df
Port the solution for NSX VMware added into Nova during Liberty cycle by
https://review.openstack.org/#/c/147539
Change-Id: Id4ad1e1b6108818b99f769e9027800b1dafe1447
Move extraction of instance attributes from a request to a separate
function. This simplifies program logic, which eases adding of
processing of alternative alternative request source types.
Change-Id: I8bb1760cccf69161047a844a92704d0e734b8102
merged from Ifb5cb05b9cc2b8758d5a8e34f7792470a73d7c40
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
The dictionary constructor approach has two distinct disadvantages
from the proposed syntax though. First, it isn't as legible as a
dict comprehension. Second, it forces the programmer to create an
in-core list object first, which could be expensive.
Nova dropped python 2.6 support, we can leverage this now.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
This commit also adds a hacking rule.
[1]http://legacy.python.org/dev/peps/pep-0274/
[2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html
[3]http://paste.openstack.org/show/154798/
Change-Id: I1bc53e335b6c291da5c54f067f9fdfd5da6b2902
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
A preparation step to get rid of Nova DB usage.
Move a function of OS admin context initialization to context module to
use it in all of API.
We're going to use this function to initialize Nova client to get
instance object with an admin account (which is the only option to get
neccessary extended instance attributes).
Change-Id: I195d899ed245ea3489c7e97b56ee6aaff9a08be2