pyflake8 was updated and not properly constrainted by hacking, update
to hacking 3.1.0 and fix the problems found.
py27 failed since global upper-constraints includes py3 only packages.
Use lower-constraints for this test.
The functional jobs run on master with py27, remove the py27 master job,
change the jobs so that py3 is used everywhere.
Change-Id: I695d60e53857e03f206dcd7cf10c06c76c8d6cc0
To allow non-py27 supporting repos to use shade job templates, this
breaks out the py27 and py3 jobs into separate templates. Relevant repos
can then continue to use the existing template names without picking up
the unsupported job runtimes they no longer need.
Remove the py27-tips jobs - they just don't make any sense any more.
Change-Id: Ia211e31723ede592f19a8df6c18e45699ca25788
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Swift containers and objects can contain any kind of characters.
If a container or name contains special characters, shade was failing to
access them.
We need to url encode containers and objects when creating the url to access
them.
Story: 2005828
Task: 33585
Change-Id: I170277293eb4ed1a12cf62bcf863707cb3d918eb
novaclient supports v4-fixed-ip and v6-fixed-ip as aliases for fixed_ip.
As shade used to use novaclient and passed this content through the
switch to REST resulted in a behavior regression for shade users. That's
bad, mmkay?
Add in support for the same aliases to create_server, so that users
upgrading to newer shade are hosed.
Closes-Bug: #1798489
Change-Id: I55bc88e9b2cfa5ad1b6a27640db11bc848584c21
Revert the openstacksdk subclassing from shade. The idea was to
reduce the workload, but trying to make sure that the Cloud abstraction
in openstacksdk doesn't break shade's contract while we update things is
a ton of work to meet the contract that's not really valuable to people.
Instead, we'll put shade on lifesupport and only accept bugfix patches.
Revert "Make OpenStackCloud a subclass of Connection"
This reverts commit ab3f400064.
Revert "Use openstack.config directly for config"
This reverts commit 2b48637b67.
Revert "Remove the task manager"
This reverts commit 28e95889a0.
Change-Id: I3f5b5fb26af2f6c0bbaade24a04c3d1f274c8cce
The underlying openstacksdk library is shifting how task manager works,
so stop trying to send it a task manager. This is a feature basically in
place just for nodepool which is being expanded to be more usable by
everyone. The likelihood that anyone other than nodepool is using it is
... very low.
Change-Id: I04be3937589a805a5f9686c91a78933eebcfa022
The networking API v2 specification, which is implemented by OpenStack
Neutron, features an optional routes parameter - when updating a router
PUT requests). Static routes are crucial for routers to handle traffic
from subnets not directly connected to a router. This patch adds the
routes parameter to the OpenStackCloud.update_router method as a list of
dictionaries with destination and nexthop parameters.
Example:
[
{
"destination": "179.24.1.0/24",
"nexthop": "172.24.3.99"
}
]
Change-Id: I14205b6bb071d0b46967f29b6287f74d8796add8
The networking API v2 specification, which is implemented by
openstack neutron, features an optional MTU parameter - when
creating a network, this allows operators to specify the value
for the maximum transmission unit value.
Change-Id: I288f02551555fff3e8b350fc6d7c6ae8f60c405c
Shade used 'attached' as a filter for listing floating IPs,
but this is not a supported parameter in neutron. In before, the test
passed because neutron server ignored this parameter and returned
all the floating IPs. However, neutron is planing to employ a strict
validation on the list endpoint [1]. As a result, neutron will reject
the request with 400 response if the request contains unknown filter.
This patch fixes the usage of neutron API. It passes filters to neutron
API only if they are known supported filters. The list of supported
filters for listing floating IPs can be found in the neutron API
reference [2].
[1] https://review.openstack.org/#/c/574907/
[2] https://developer.openstack.org/api-ref/network/v2/#id130
Change-Id: I124adfc5e9cdd5bc20aacf23f9dcc10c55b0870b
The wait arg in create_stack have
a mistake in doc description
Change-Id: I402a4586e5edee50fb3bfbc9b14429d9c1fd14bc
Signed-off-by: Valentin Boucher <valentin.boucher@kontron.com>
The shade code lives in openstacksdk now and is a part of Connection.
Start making shade a subclass of that for backwards compat.
Mostly only deal with the constructor for now, but go ahead and do
list_flavors and get_flavor_by_id while we're looking at the extra
config override. Also remove list_projects because of its use of the
_normalize module.
keystoneauth lower-constraint needs to be bumped because of
status_code_retries.
Change-Id: Ibbe6e167d6285b30a9adbd0c5a89bc679c5645f3
We let some of these slip through originally. Fix them so we can do
other things.
Guess what? There were bugs in the v1 codepath.
Change-Id: Ia51598548cde0ddb4f9e96b166274e9a104cf649
There are two improvements in this patch:
1. Add alias to rename xxx_cluster_template to xxx_coe_cluster_template.
This a pre clean so that we can support xxx_coe_cluster to avoid conflits
with Senlin's functions.
2. Support new Magnum API endpoints, /clustertemplates and /clusters.
Those two endpoints added in Newton.
Change-Id: I78c37f0df8f63a13c534f3dcaca2e27073f0d730
The original code did not allow someone to set enable_snat to True.
Turns out on some clouds the default is the opposite.
Change-Id: Ic3bbfa35f7c6184faa60922b4dd796708de57136
This adds a new server listing mechanism that will yield back each server
block that is returned; it is useful for large clouds with projects with
a large number of active or deleted instances.
For example, in the current list servers it builds up a few lists which can grow
quite big (and consume a lot of memory) making it hard to list projects servers
that have existed for a long time, but with an iterable verion those lists do
not grow (since they just consume the current chunk).
Also the iterable version is more easily used in programs with progress bars
or anything like that that can take advantage of the knowledge that the listing
is at a given chunk (of many).
Change-Id: I84c15e664fb2f72f563618483f9df1c99d215faf
The latest version of pycodestyle got stricter with undefined objects
pulled in via * imports. It's a nice check and actually found a bug, so
instead of disabling it, fix the places where we're using a * import.
W503 on the other hand is terrible.
Change-Id: Id73599ca494545b0f6d2345236190fc13cf2a326
shade depends on openstacksdk already. Let's go ahead and start
consuming it directly rather than through the os-client-config compat
layer. We have to leave the os-client-config depend for the legacy
client functions.
Change-Id: Ibe2176c16e29960e9cc2b569325e41d1a4e297a8
This setting of the name is currently a hack and is mucking about
behing the OCC scenes. We need to be able to step out of it, but to
do that we need to muck about behind the SDK scenes for a second too.
Change-Id: I772a3d99c354f32c6341d8f409a8e839461af736
The connect_as method tried overlaying things directly on top of the
'defaults' cloud config, but things get all messed up and it's actually
never what you want.
Instead, pull the existing CloudRegion from the local config object and
pass it in.
Change-Id: I54593bd8f6dd2124df854e923456c390e0d6a147
Add the ability for a user (nodepool) to get the volume limits of a
cloud.
Change-Id: Id568d3ad408dd8976211c0576c45e8c9471d1849
Depends-On: https://review.openstack.org/564279
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
If we want to list the servers of a deployment with more servers than
nova.conf max_limit, currently we only return max_limit. This patch
makes it behave as expected, getting you all the servers.
Change-Id: I58844125ba37d81f1611e4e8ec641c1b8573884d
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
Added a new property, 'port_security_enabled' which is a boolean to
enable or disable port_secuirty during network creation. The default
behavior will enable port security, security group and anti spoofing
will act as before. When the attribute is set to False, security
group and anti spoofing are disabled on the ports created on this
network.
Change-Id: If984a82ca5f6fb69ee644f4fa84333df09d7f8bc
Our other API calls allow timeout=None to mean "no timeout". Heat does
not have an equivalent for "no timeout", but None will mean to use the
heat server default. Allow for this value in the orchestration calls.
Change-Id: Iae775676e9bb7d3f58d7041537f3a3b15ba52593
Depending on the stack complexity, resolving outputs of a Heat stack can
be fairly expensive. The API has a parameter to disable output
resolution: this adds this parameter to the get_stack call, and use it
in places where outputs are superfluous.
Change-Id: I779e451c9f058a954a0526404489a4fb1b39ee9c
servers are different and are avoinding the underlying infrastructure.
Update the server methods to work right.
Change-Id: I1d783093084ad2bf05527980a61de95ec5a9ae31
We've finally gotten out of the business of wrapping exceptions. Since
we don't do that anymore, we don't need the log_inner_exceptions logic.
Change-Id: Id1f709daa2e61c13efeeeffc2a08578c27265e56
It is useful for operators to be able to check if a cloud supports
certain extensions to know whether they can perform some API actions.
Change-Id: Ie99668173d4dc6e6b3992e496560b5b7598181a2
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
This function currently does not allow getting of a server
from all projects, and it can be quite useful to do so (for
various admin/operator activities) so allow get_server to
pass through 'all_projects' to the internally called
'search_servers' (and default it to false to retain the old
behavior).
Change-Id: I7b7534a044cfa0ccbaa11a635edcca388db27f0f
Since the list_nics* methods were changed to use raw HTTP client rather
than the ironic client, they return a dict rather than a list. Instead
of getting this:
[{'address': '00:11:22:33:44:55', ...}, ...]
We get this:
{'ports': [{'address': '00:11:22:33:44:55', ...}, ...]}
This change removes this outer dict and returns to the old behaviour of
returning a list. This affects list_nics and list_nics_for_machine.
Change-Id: I3cb9ef5d97cf911cb4897b00ab4cef77b76efaa4
When cache settings are in place for ports and floating ips, we should
be doing full list calls and filtering locally. This is done to prevent
things lke nodepool from crushing clouds under the weight of our immense
need for information.
Change-Id: I304ff1c0e355bcfc00398316a296417c19e9b74f