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>
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
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 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
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
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>
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
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
All of the current models return the creation date in created_at
with the exception of servers which are currently returned with
a created field instead.
This patch addresses this and gives the ability to get access to
both.
Change-Id: Ifbd59834080eea62dead19d18a9a11a851a4ce2e
This is the new hotness.
Add doc8 linting to the pep8 target while we're doing it. And, slim down
pep8 tox env. It doesn't need to install shade or any of the
requirements.
Change-Id: I1e73ee503c81f92b4fe84bdd384f856290b6d5dd
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
We can assume that floating IP is public IP address in clouds so
floating IPs should be checked first if they can be used to
connect to instance.
Change-Id: I1024d78e68a788bf5a92cb63d008c02180908dfa
Story: 2001475
Task: 6212
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
Added retry logic mechanism and added them to the API calls
where ironic presently attempts to pull an exclusive
lock on the baremetal node.
Change-Id: Ia6fbc9eec612793b3214d7883e0552913a088d5d
After an epic battle with time, the python-ironicclient has been
driven from the land of shade, and there will be joy!
Change-Id: I234e2fc9d1800607c22eb447dd3e77428221695e
Apparently, this method either never worked or was silently
broken at some point in the past, since we didn't have tests.
Added two tests and got the method back into working shape.
Change-Id: I26591549c082a2cd206f20fbcb7f1e3a1dde91c7
Update calls for numerous baremetal methods to utilize
the _baremetal_client calls instead of python-ironicclient.
Also corrected a minor baremetal port test and fixed the
base noauth test endpoint override as python-ironicclient
was previously injecting that for us.
Change-Id: I358a63a52067f7d48d71f0b23652491b2497fe43