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
Due to the change in behavior in dogpile.cache > 0.7.0 where bound
methods can no longer be passed to the cache_on_arguments decorator,
openstackSDK now explicitly provides a non-method wrapper for all
elements passed to cache_on_arguments. This is handled via an explicit
no-op decorator. functools.wraps is used to preserve data from the
original method.
Needed-By: https://review.openstack.org/#/c/624993
Change-Id: Ied27fa1e834d145246815afcb67c59d48669ffb2
Story: 2004605
Task: 28502
There are multiple different cloud entries in clouds.yaml now. That
means that doing an inventory across all configured clouds gets weird,
especially when we're tossing system scoped accounts in there.
Cherry-picked from https://review.openstack.org/622373/
Change-Id: I0530ca35da0cc3baebab2c3bc53eea70028ceed5
Access to the object separate from parsing allows us to use
argparse-manpage to generate a man page in the Debian package
automatically. We also need to set 'prog' explicitly rather
than let it be picked up via argv[0] so that when we load
the parser via argparse-manpage it produces the right value.
Change-Id: I654b4408444f804f900951333a6ebc3372d5037e
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
This replaces the deprecated (in python 3.2) unittest.TestCase method
assertRaisesRegexp() with assertRaisesRegex().
Change-Id: I1f20db33e3acfc87c0e7a5c8cf45dc1b3121619e
Signed-off-by: Chuck Short <chucks@redhat.com>
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
Keystone has changed the default role during bootstrap from 'Member'
to 'member' therefore the tests which operated under the assumption
of having the 'Member' role assigned are no longer passing.
This patch addresses this issue, however, long term, it's probably
better to create a role and assign it during the test rather than
assuming one already exists, but that's probably for another patch.
Change-Id: I6e4b7665ab046661dd763a1ff8c8e54e6db2dc18
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
For instance on call to cloud.node_set_provision_state(uuid, 'dummy')
the API currently only returns:
(400) Client Error for url: http://127.0.0.1:6385/v1/nodes/<UUID>\
/states/provision Bad Request
whereas the HTTP request also contains some more valuable information
in the body:
The requested action "dummy" can not be performed on node "<UUID>" \
while it is in state "enroll".
Change-Id: I8412a2fd4ba78ad4f43ac2f13b1404dd3c151ce5
The change to look for floating ips first when looking for the public
address exposed a latent bug in the private ip finding
code. When we get the mac address of the floating ip, we then look for
the corresponding fixed ip to return for private_v4. However, we weren't
specifying fixed before, so we were just getting the first one that
matched. That *happened* to be the fixed ip by accident.
Add in ext_tag='fixed' so that we look for the matching MAC from a fixed
interface.
We have to also add a second pass through the loop without the fixed
tag, as old nova network dicts do not have the fixed/floating tag like
that.
Includes a test which shows the breakage.
Story: 2001619
Change-Id: I60562a99f78c0c363f49106c285935448f804084
In TestNetwork._cleanup_networks, pass network id instead of network name.
Task: 6594
Story: 2001617
Change-Id: I696d6b9a8abf3e2d064bd276d1865452ef1e4fea