Two objects Trait and TraitList are added for operating single or
a list of traits.
The 'get_all' method of TraitList supports two filters 'name_in'
and 'prefix'. Those two filters are for implement the trait REST
API "/traits?name=in:TRAIT_A,TRAIT_B" and
"/traits?name=startswith:CUSTOM".
Part of implementation blueprint resource-provider-traits
Change-Id: I61d3fea4f8580affd482d424a1e39096354c8ec8
Previously we regenerated the RequestSpec from details in the Instance
before we had the full original object available to us. That is no
longer necessary and means we will not honor some of the original
request. Remove that now.
Change-Id: I195d389ac59574724a5e7202ba1a17d92c53a676
Closes-Bug: #1675607
This reverts commit f0153fa4c8.
This broke a whole set of FS-based volume drivers since it
didn't change the method signatures in those drivers to take
the new instance argument.
I was working on adding them but then just decided this
isn't even used right now so it's faster to revert.
When this is added back in, I want to see the
LibvirtBaseVolumeDriver class turned into an ABC and
the connect_volume and disconnect_volume methods turned
into abstractmethods in LibvirtBaseVolumeDriver so this
kind of thing does not happen again.
Change-Id: If1ee6d6e4004750f80424ec54d7dabc564ec9e06
Closes-Bug: #1675584
The 'discoverable' policy is not documented as it will be removed
in a future change.
blueprint policy-docs
Change-Id: I25eb7b34490f7a113bcaf6e95ee65986943e418d
The 'discoverable' policy is not documented as it will be removed in a
future change.
blueprint policy-docs
Change-Id: Ie31ee38c6f36fae21c8b8b88ef6722f4a6e5aa6b
This would be an upcall from the cell to the api db, which we don't
want. We store the availability_zone on the instance now, and even
use it for pre-scheduled instances, so just use that instead of
the extra lookup.
Related to blueprint cells-aware-api
Change-Id: I73c3b10e52ab4cfda9dacc0c0ba92d1fcb60bcc9
This ensures that instance.availability_zone reflects what AZ the
instance is actually in. In the case where no AZ was requested at
boot, previously this would always be some default value, which
isn't as useful to the things that need to consider what AZ the
instance is actually in (without doing all the aggregate math to
determine it on the fly).
Related to blueprint cells-aware-api
Change-Id: I8d426f2635232ffc4b510548a905794ca88d7f99
When microversioned request handling was added to placement some
comparisons were added that treat the microversions as floats. This
will break as soon as the right hand side of the version chnages
from one digit to two. A float of 1.1 and 1.10 is the same. A
version string of '1.1' and '1.10' is not.
This patch changes the internals of version handling to always use
Version objects which represent the versions using a name tuple
(major=1, minor=10). It also changes the externals to expect versions
as strings ('1.10'). Where floats were present before, these have
been changed to strings. Where tuples have been accepted, these are
still accepted, but strings are as well.
This is an internal only change, users shouldn't notice any
difference as their versions (in the openstack-api-version header)
were always strings and we haven't made it to version 1.10, sorry
'1.10', yet.
If developers try to version_handler with something other than a
version string, test runs will fail very early (at import time).
Change-Id: Ic2b655ac4c75c6104eddecd174f193413a0764d2
Closes-Bug: #1675143
Since Idcfdaf3b removed the use of this flag in the libvirt port filter
and I188fc2c removed the use in injected network templates, the only
remaining use of this option is in nova-network. As a result, we can
deprecate this like nova-network itself.
Change-Id: Ibbcd1fd11c3563b4ddef7c128b714402beac7e3d
Implements: blueprint centralize-config-options-pike
Nova supports file injection of network templates. Putting these in a
config drive is the only way to configure networking without DHCP.
At present, setting the 'use_ipv6' config option to False prevents the
generation of IPv6 network info, even if there are IPv6 networks
available. This was fine when using nova-network, where the same config
option is used to control generation of these subnets. However, a
mismatch between this nova option and equivalent IPv6 options in neutron
would result in IPv6 packets being dropped.
Seeing as there is apparent reason for not including IPv6 network info
when IPv6 capable networks are present, we can ignore this option.
Instead, we include info for all available networks in the template, be
they IPv4 or IPv6.
Change-Id: I188fc2cd1b26fe7a71804f7e7d66b111d6f15e30
Implements: blueprint centralize-config-options-pike
This patch adds sane minimum and maximums to the fields for an inventory
posting, which will quickly return a 400 error if invalid values are
passed instead of proceeding, only to fail at the DB layer.
Partial-Bug: #1673227
Change-Id: I6296cee6b8a4be1dd53c52f6290ebda926cf6465
This patch adds a check for the amounts in allocations passed to the
placement API, and returns an error if any amount is not greater than
zero.
Partial-Bug: #1673227
Change-Id: I2a8dc038d6489e82ad51fdc27d22cf0ab2d66322
This method is no longer used, nor should it be. Instead, the
AllocationList.create_all() method should be used to create allocations
in the DB. Tests have been updated to use create_all() instead, and as
create_all() enforces inventory/allocation relationships, several tests
had to be modified so that they properly accounted for this.
Change-Id: I0bccfee155c871babf507cdd1117b5023d5a1361