Commit Graph

98 Commits

Author SHA1 Message Date
Monty Taylor ab3f400064
Make OpenStackCloud a subclass of Connection
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
2018-07-13 06:17:25 -05:00
Monty Taylor 2b48637b67
Use openstack.config directly for config
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
2018-05-04 11:30:09 -05:00
OpenStack Proposal Bot 8d1902b33d
Updated from global requirements
Change-Id: Iffac9e32b35699a074b77f2f4460ac790b3cc0eb
2018-02-16 23:30:23 -06:00
Monty Taylor 44189e917e
Use openstacksdk for most transitive depends
This should get openstacksdk on to people's machines in advance of
porting ansible modules to use sdk directly. It also lets us just use
sdk for all of the transitive depends.

Leave os-client-config as openstacksdk doesn't depend on it and
transitioning to openstack.config is a better task for the rocky cycle.

Change-Id: I6d26785b3aa1fc75fb0ad2d45684d93e9628f61b
2018-02-07 11:07:37 -06:00
OpenStack Proposal Bot b081289e72 Updated from global requirements
Change-Id: Ie20ba5b4b93f701e2d9e76395b4f76af28b9f0f5
2018-01-17 20:27:06 +00:00
Julia Kreger b85cf134d9 Remove python-ironicclient
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
2017-12-04 04:06:16 +00:00
OpenStack Proposal Bot e63dd25b0f Updated from global requirements
Change-Id: I3507730266e5cab96bffbaf4cb635674256d9ac6
2017-11-16 10:58:17 +00:00
OpenStack Proposal Bot 1b92ba4dc1 Updated from global requirements
Change-Id: I9e25eaf73dac0a0d54459f37459c3eddc44034f5
2017-11-14 22:23:21 +00:00
Jenkins a81fbb2ab7 Merge "Remove keystoneclient dependency" 2017-09-12 14:45:51 +00:00
OpenStack Proposal Bot 25ef7bf244 Updated from global requirements
Change-Id: I3833b1f450b969e54a9869af9effe2c82a4b4a83
2017-09-11 21:34:25 +00:00
Samuel de Medeiros Queiroz 97b98c97e7 Remove keystoneclient dependency
Since all the keystone client calls have been moved to direct REST calls
to keystone server, the dependency can be removed.

If someone is getting a legacy keystone client from shade directly, they
will be warned to 'pip install keystoneclient' themselves.

Change-Id: I653dead3992be09c003aab911dda7cbf892cc9c1
2017-09-11 14:56:12 -03:00
OpenStack Proposal Bot 8dc051ce3f Updated from global requirements
Change-Id: I2b75a24df0ad5779ac9b2f0a87453ffcc49b3dbe
2017-09-01 12:34:00 +00:00
OpenStack Proposal Bot 85d8adaec6 Updated from global requirements
Change-Id: I2da0ea1c58865c47396b001f1aa66c54ece57bfb
2017-07-27 20:19:00 +00:00
OpenStack Proposal Bot 67accb5b09 Updated from global requirements
Change-Id: I96229428c485ca9ea9af79c3b5d5dbb43840f169
2017-07-19 17:59:42 +00:00
Monty Taylor 3aee4f5e6e
Remove novaclient from shade's dependencies
All calls to nova are now done via REST. This means we can remove the
dependency.

Only two more to go ...

Change-Id: I01a0afef5986b7452fd73e04c48568ebb9817681
2017-06-18 12:57:21 -05:00
OpenStack Proposal Bot ebedf176c7 Updated from global requirements
Change-Id: I363e82513bb504ee7691c9283ab9763c40471fb6
2017-06-10 21:35:01 +00:00
Sławek Kapłoński 10cb4f2d59 Remove designate client from shade's dependencies
All calls to Designate API are now done with REST calls made
via keystoneauth1
Shade don't require python-designateclient package since now.

Change-Id: I55393dc04ec9eeaba885fee849e6466f199be479
2017-06-02 16:48:03 +00:00
OpenStack Proposal Bot aad00aa01e Updated from global requirements
Change-Id: I1a52a58baccd8dd3b6f04bd8baa8d20654ce366d
2017-05-24 23:11:29 +00:00
Monty Taylor 072001a628
Allow a user to submit start and end time as strings
get_compute_usage currently requires a user to provide a datetime
object. That's actually fairly unfriendly. Also, it turns out if you
happen to produce one of those with timezone offset information, Nova
will return a 400 error. It's pretty easy to convert a datetime with
timezone info to a datetime in UTC without it - so do that first.

Now a user can submit a fully compliant ISO 8601 datetime with whatever
info they want and we'll make it meet nova's standards. They can also
supply a datetime if they prefer.

Also - do date parsing before project get - to avoid an API call if the
validation that doesn't need an API call fails.

Finally, supply a default for 'start' of the first day OpenStack
existed.

Change-Id: I53989d47f0d24695c19c1023e35acb315bec9eea
2017-05-23 14:05:59 -05:00
Rosario Di Somma 3f76b25798
Remove cinder client
Change-Id: I585da9a60757da8020b8e1086ae8d8375a9ce364
Signed-off-by: Rosario Di Somma <rosario.disomma@dreamhost.com>
2017-05-12 11:57:29 -05:00
Sławek Kapłoński 81239f6742 Remove neutronclient from shade's dependencies
All calls to Neutron API are now done with REST calls made
via keystoneauth1.
Shade don't require python-neutronclient package for now.

Change-Id: I0aa6f32b10986e99d6f86cad9640d9d95b5d2cef
2017-05-07 22:15:15 +00:00
OpenStack Proposal Bot 81d39a9ea0 Updated from global requirements
Change-Id: I3e7455e3f1bed53cbb3e9d64351d1536c82dc650
2017-05-06 19:23:35 +00:00
OpenStack Proposal Bot c21447733a Updated from global requirements
Change-Id: I1318331dd1b8bae151416b35016e11e7223c34e8
2017-04-23 20:41:20 +00:00
Monty Taylor 4f807b8c60
Include two transitive dependencies to work around conflicts
For people installing released shade from pip and then trying to use it
somehow through entrypoints, 1.20.0 is currently broken because of some
transitive dependencies, ordering issues and conflicting exclusion
ranges.

While this is by no means a comprehensive or sustainable solution to the
problem, it does unbreak the end users currently broken and is not
terribly onerous. Both of these additions are tracked in g-r and both
can be removed when the dependencies that pull in conflicting ranges of
things are removed.

Change-Id: I6a4a1ab5ab109f0650873201868e0f1c4d09c564
2017-04-21 13:30:31 -05:00
OpenStack Proposal Bot 15d64f2af5 Updated from global requirements
Change-Id: I84c807adf93913bc411954c59040ab780e2eb04e
2017-04-17 17:11:00 +00:00
OpenStack Proposal Bot 7e92e93104 Updated from global requirements
Change-Id: I87c2f41a041ebf80a97f1f4b6100800b68f4f137
2017-03-30 14:03:25 +00:00
Monty Taylor 8aa8688ba8
Move futures to requirements
Wow. We had futures in our test-requirements so we never noticed it
wasn't in our regular requirements.

Change-Id: I6ae3434effc778524908d009627e9c0da6258f7c
2017-03-28 07:52:38 -05:00
Monty Taylor c8c098b3f5
Remove python-heatclient and replace with REST
The changes in the unittests are because testtools does explicit
exception matching, not subclass matching. Also the first GET call is
actually supposed to be a 302 redirect. I do not understand why the
first form worked with heatclient.

Change-Id: I4b23304c09a1b985cc595a75587dbbc0472d450a
2017-03-27 15:28:00 -05:00
Monty Taylor 204fb73dcd
Get rid of magnumclient dependency
One more client library down.

Note there is a change to one of the tests. That's mainly because
testtools is not matching the exception the way an end user would. We'll
follow up on it, but it's not a real issue.

Change-Id: Ic6d7a37799e72bfb1bef7aeaf8f4894aed27dcea
2017-03-21 19:09:33 -05:00
Monty Taylor f29624aced
Cleanup some workarounds for old OCC versions
We don't need to pass constructor objects to os-client-config -
os-client-config is quite happy to do this for us.

We do need to bump the os-client-config version, because the magnum
container workaround didn't go in until then.

Change-Id: I6a7958eaf6745e6714a0c03b7e829c29c4059b07
2017-03-20 11:20:06 -05:00
Thanh Ha 2a8d0c57b2
Depend on pbr>=2.0.0
Several of shade's dependencies now require pbr>=2.0 however the cap
is preventing `pip install shade` from just working after install
completes. Update shade to also require pbr>=2.0.0.

Change-Id: I5aa5081c200d24f9f43253d409f7b80e52c8841f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2017-03-11 00:06:16 -05:00
Monty Taylor 1dfe5e54fb Remove troveclient from the direct dependency list
We don't even actually use troveclient in shade other than the
constructor. Make it an optional import.

Change-Id: I60b924eb8dfb48c53da0befb39cf84e6c1ea8863
2017-02-01 02:58:15 +00:00
Monty Taylor b7ea6c7150
Replace SwiftService with direct REST uploads
SwiftService uploads large objects using a thread pool. (The pool
defaults to 5 and we're not currently configuring it larger or smaller)
Instead of using that, spin up upload threads on our own so that we can
get rid of the swiftclient depend.

A few notes:
- We're using the new async feature of the Adapter wrapper, which rate
  limits at the _start_ of a REST call. This is sane as far as we can
  tell, but also might not be what someone is expecting.
- We'll skip the thread pool uploader for objects that are smaller than
  the default max segment size.
- In splitting the file into segments, we'd like to avoid reading all of
  the segments into RAM when we don't need to - so there is a file-like
  wrapper class which can be passed to requests. This implements a
  read-view of a portion of the file. In a pathological case, this could
  be slower due to disk seeking on the read side. However, let's go back
  and deal with buffering when we have a problem - I imagine that the
  REST upload will be the bottleneck long before the overhead of
  interleaved disk seeks will be.

Change-Id: Id9258980d2e0782e4e3c0ac26c7f11dc4db80354
2017-01-21 16:21:28 +01:00
Monty Taylor 24acc1888b
Remove glanceclient and warlock from shade
We've removed the uses - remove both from requirements.

Change-Id: Ie3f2354d2034a695ae9086f84f5d6c7f3698d90b
2016-12-12 14:01:54 -06:00
Monty Taylor 873ad6e84d
Create and use a Adapter wrapper for REST in TaskManager
Adding a TaskManager aware wrapper around Adapter gets us a natural
interface for migrating one call at a time away from python-*client and
to direct REST calls. The Adapter shares the Session with the clients,
but it returns munches and throws exceptions that match the exceptions
we're expecting outside of shade.

Also, move compute_client calls out of their own tasks

Putting compute_client calls in a Task will cause them to be doubly
enqueued. This has to be combined with this patch because otherwise the
double-invocation fails functional tests.

Change-Id: If2d42af5fde1334b3b99ec3a9bbade38b19adbee
2016-11-15 08:31:05 -06:00
Monty Taylor e888d8e5cd
Add support for jmespath filter expressions
ansible upstream recently added a filter using jmespath to allow for
arbitrary querying of complex data structures. While reviewing that
patch, it seemed quite flexible and lovely. It's also apparently also
used in boto for similar reasons, so we're following a pretty well
tested solution - and since it's now a depend on ansible, the extra
depend shouldn't be too much of a burden for most folks.

Change-Id: Ia4bf455f0e32f29a6fce79c71fecce7b0ed57ea5
2016-09-07 13:51:15 -05:00
Monty Taylor 6832f734d0
Support dual-stack neutron networks
It is totally possible for a neutron network to have a network with a
globally routable IPv6 subnet and an RFC-1918 IPv4 subnet. In fact, the
existing OSIC Cloud1 does this, and the original region of Dreamhost did
this.

The trouble is, it's not possible in a reasonable way to _infer_ this
setup, so we rely on brand-new config functions in os-client-config to
allow a user to express that a network is external for ipv4 or for ipv6.

Depends-On: I40f5165d36060643943bcb91df14e5e34cd5e3fa
Change-Id: I12c491ac31b950dde4c1ac55860043fd9d05ece8
2016-08-29 08:15:54 -05:00
Jenkins bde6ad8436 Merge "Add new test with betamax for create flavors" 2016-08-06 08:08:18 +00:00
David Shrewsbury 1a1107ad73 Fix requirements for broken os-client-config
OCC 1.19.0 breaks all the things. Avoid it.

Change-Id: I721d7c937e4a7a5dd8b0d0abfae1bb696d2b2f00
2016-08-05 10:08:15 -04:00
Yolanda Robla bbd22abbe3
Add new test with betamax for create flavors
Change-Id: I0aaceb7633a27356e8eaabf70cadfe5e258cedee
2016-08-05 06:50:49 -05:00
Steve Baker 1a25bb249e Depend on python-heatclient>=1.0.0
The event_utils.poll_for_events function is only available from 1.0.0.
There have been reports of the ansible os_stack module failing due to
a too-old python-heatclient.

Depends-On: Ie10099430481ffa76f5a19557e3693189544df6b
Change-Id: I0843c377409b71d808a7f096f2daa28c655add3c
2016-08-03 13:15:53 +00:00
Jenkins 21d5680860 Merge "Use keystoneauth.betamax for shade mocks" 2016-07-12 19:24:37 +00:00
Yolanda Robla 5f5c925631 Use keystoneauth.betamax for shade mocks
Instead of mocking the clients, use keystoneauth1.betamax
fixture to intercept keystoneauth.construct_session, and provide
our own recorded fixtures.

Change-Id: I7b2973b0f89b66c19d6bf10571c3c93692107aa3
2016-06-10 08:11:01 +02:00
Yolanda Robla 02e4d1dc85 Add initial setup for magnum in shade
Start by adding the client, following same structure
as the other ones.

Change-Id: I499f9fdda08743f7b67afcc1c2f9b07df471a041
2016-05-10 12:53:37 +02:00
Jenkins 898bc436e8 Merge "Add support for Designate zones" 2016-04-22 14:36:47 +00:00
Ricardo Carrillo Cruz 40a50918bd Add support for Designate zones
This is the first commit to add initial support for Designate.
Starting with zones objects, more to come.

Depends-On: Ieaddeb4a0b317f85a2161e67bc5c202cc1b01464
Change-Id: I1109f89075ed663620ecb11d18507e8a5d7351b4
2016-04-21 22:21:54 +02:00
Monty Taylor 3f79e8db53
Consume config values for NAT destination
In a cloud that has multiple private networks and that requires
floating IPs for public access, it's not possible to know which private
network the floating IP should NAT to without the user providing
some configuration. os-client-config added support for expressing
such a thing in 1.17.0, so start consuming that.

Change-Id: Iee634bcdc933a4c8d793ab9b25b27d9ecd77cdcc
2016-04-11 14:39:58 -05:00
David Shrewsbury c10566cc0a Fix shade tests with OCC 1.13.0
The latest os-client-config, 1.13.0, breaks the shade tests as the
client instantiations are slightly different. Since I'm not sure we
can modify our tests to use against different OCC versions (there
doesn't appear to be a version attribute anywhere), I upped the
minimum requirements.txt value as well as fixed the tests for the
latest version.

Change-Id: I18292ca39789c41caea74901754d66d3301bb420
2015-12-22 17:12:30 -05:00
Monty Taylor 1700e197c1 Remove cinderclient version pin
We had put this in because of the v2 version negotiation breaking public
clouds. That has since been fixed, and the pin here causes conflicts
with python-openstackclient.

Change-Id: I9ee2d9bfad36160ba41f65dcd657cbbca9f26050
2015-12-02 06:24:03 -08:00
Monty Taylor c84179154d Bump os-client-config requirement
The 1.11.0 release of os-client-config contains a bugfix for the
swift api timeout paramter issue. Be explicit that this version
of os-client-config is required for proper operation of shade.
The 1.11.1 release contains a bugfix for the 1.11.0 release.

Change-Id: Iabcb62593143473a7459ad01122a734d4230ab77
2015-11-20 17:27:41 -05:00