Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I8048746dbc2ef0cb582f68934734db4c1153d779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
It's time to move on with life.
(dtroyer) This requires sdk >= 0.10.0 (0.9.19 is in
global-requirements.txt) and osc-lib >= 1.8.0 (1.8.0 is already in g-r).
Once we have sdk bumped make_client() becomes just a pass-through for
the plugin interface and existing code compatibility.
Change-Id: Ie3d7c442da4257b11140c109e9df69b629336f42
We store the created conn on the instance, but we never pull it back off
if there is already one present.
Change-Id: I2d890dd206d4ddf67fa42d798e6fd2c652799785
network.client.make_client() has always put a copy of it's SDK Connection
directly into ClientManager, the new-style Connection create will move
into osc-lib ClientManager, do it here too until then.
Change-Id: I1edfd19c9e73320768fb9640931fafe857c980b4
Do a dummy import to determine which SDK is installed (Pre/post merge).
This solves the DevStack error "Cloud defaults was not found" in -tips jobs.
Depends-On: Ia111f127fbdceac2afe20fd9d1fe032145cdd72c
Change-Id: I60c2d418dd5a393eee2cc2a5c2fdebfffdabf2d3
SDK is removing Profile, but currently has compat code to support this
invocation in OSC. While the intent is to protect people from upgrade
breakage, it's python, and packaging things have a tendency to get
strange. By putting in a little belt and suspenders if block here, we
can hopefully protect folks who upgrade sdk for some reason without
upgrading python-openstackclient.
Change-Id: Id678e97a2b99dbbfc772acc8c6ba283db551723d
SDK commit Ie67c240e3caa5e100ce07db3862718195c894748 exposed lingering uses
of Proxy.session in OSC. Get rid of them.
Change-Id: Icab230f1897a446cf3deb0e3d0550d24e11a0ef3
Convert to using ClientManager and OpenStackShell from osc-lib.
* Change all internal uses of ClientManager private attributes that are
now public in osc-lib's ClientManager. Leave back-compat copies in
place in OSC's clientManager so we don't break plugins.
* Put some work-arounds in place for changes in osc-lib that we need until
a new release makes it through the g-r and u-c change process.
* Add a test for Unicode decoding of argv in shell.main() to parallel
the one in osc-lib.
Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c
Currently OS_ENDPOINT_TYPE and --os-interface are being ignored for
network commands. This means the public URL is always used.
Make sure that these are picked up correctly so we hit the correct
endpoint (internal/admin/etc.) for commands such as:
$ openstack --os-interface internal network list
Change-Id: Iac05204e3056e386d84d3644b5da1a2bb322bb0a
Closes-bug: 1592368
Currently network v2 commands don't support client certificate/key
because they were not passed to OpenStackSDK Connection which is used
by network v2 commands.
This changes corrects the integration with OpenStacKSDK to pass client
certificate/key.
Closes-Bug: #1569513
Related-Bug: #1569508
Depends-On: Ic093f8515e7b15931994e4516ebec8f4399d021e
Change-Id: Ie37e8e988ca695a09894c6c93560dacd83f17030
All clients except neutron are initialized with region name.
This makes unable to use network related commands of
openstackclient in multi-region configurations
Change-Id: I200dc9a2f938c3e69357f91c79810df167e4fccb
Closes-bug: 1570491
The network commands ignored the --insecure and --os-cacert
options and OS_CACERT environment variable which prevented
them from properly completing SSL/TLS verification. This
resulted in the network commands failing with
"An SSL error occurred."
Change-Id: I15167631ef58335e1476c16b828b079e3b0f13c1
Closes-Bug: #1560157
The previous patches have migrate all network commands to
the new version using sdk. This patch will remove the
temporary method, and implement a new make_client() to
create sdk network client.
And also, find() in openstackclient/network/common.py must
support sdk. The logic of this function will become much
easier than before, so this patch also removes two useless
test cases of find().
This patch will also remove the patched methods in tests.
Change-Id: Ic2f7bca073beb9757172d16f95d9b82c48cbbc12
Implements: blueprint neutron-client
Co-Authored-By: Terry Howe <terrylhowe@gmail.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
neutronclient expects 2.0 as the version if you go through the discovery
constructor. For that reason, 2.0 is the 'correct' version to set in
config files or environment variables for if you're using things that
are not OSC. However, if you do that, OSC prints a warning that 2.0 is
not in the supported network version list.
Let's support both so that users don't get a confuse.
Change-Id: I7412519693f75fcd29f5621ce9e5a2df2da92684
Setting default versions in parsed args makes it so OCC
cannot tell if the argument was parsed, an environment
variable was set or it is just defaulted. In order to
set api versions from OCC, it will have to be defaulted
after processing OCC.
Closes-Bug: #1453229
Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.
DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
api.network.APIv2 starts with network_list() support to flush out
the skeleton of the Network API.
list_dhcp_agent() supports the --dhcp option of 'network list'
Change-Id: I9a2b90cde84eced1f2ea6a014b769e2bae668211
python-openstack client is now using sessions to create clients. This
patch implements creating Network client using sessions.
Related to c3c6edbe8a083aef0fb6aea3cb461ff8e715fc59
Change-Id: If90ac705eb11dfc1e3abbe2ce18c3d8ccefdbdfb
Closes-Bug: 1411179
Anything that needs a service catalog can get it directly from
auth_ref.service_catalog, no need to carry the extra attribute.
ClientManager.get_endpoint_for_service_type() reamins the proper
method to get an endpoint for clients that still need one directly.
Change-Id: I809091c9c71d08f29606d7fd8b500898ff2cb8ae
Clients that can use ksc Session don't need the old junk to
fake auth anymore:
* compute
* volume
Clients that still need to be fed credentials can pick directly
from the auth object in clientmanager. The _token attribute is
removed, the token can be retrieved from the auth object:
openstackclient/tests/common/test_clientmanager.py
This change will break any plugin that relies on getting a token
from instance._token. They should be updated to use the above, or
preferable, to use keystoneclient.session.Session to create its
HTTP interface object.
Change-Id: I877a29de97a42f85f12a14c274fc003e6fba5135
In a cloud with AZs, you can get multiple entries back from the service
catalog - one for each AZ and then one that is AZ agnostic that's tied
to the region. If the region_name is plumbed all the way through, this
works as intended.
Change-Id: I3b365ea306e8111fc80830672ae8080a5d1dc8e0