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
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 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
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
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
All calls to nova are now done via REST. This means we can remove the
dependency.
Only two more to go ...
Change-Id: I01a0afef5986b7452fd73e04c48568ebb9817681
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
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
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
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
Wow. We had futures in our test-requirements so we never noticed it
wasn't in our regular requirements.
Change-Id: I6ae3434effc778524908d009627e9c0da6258f7c
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
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
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
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>
We don't even actually use troveclient in shade other than the
constructor. Make it an optional import.
Change-Id: I60b924eb8dfb48c53da0befb39cf84e6c1ea8863
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
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
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
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
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
Instead of mocking the clients, use keystoneauth1.betamax
fixture to intercept keystoneauth.construct_session, and provide
our own recorded fixtures.
Change-Id: I7b2973b0f89b66c19d6bf10571c3c93692107aa3
This is the first commit to add initial support for Designate.
Starting with zones objects, more to come.
Depends-On: Ieaddeb4a0b317f85a2161e67bc5c202cc1b01464
Change-Id: I1109f89075ed663620ecb11d18507e8a5d7351b4
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
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
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
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