| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
All of the other profiles have been moved but it looks like this
one was missed.
Depends-On: https://review.openstack.org/574746
Change-Id: I9efbc92ebb903378f492bf9b16d2e5beffbfea19
|
|
|
|
|
|
|
| |
These are testing that an underlying method is being called with a set
of parameters but the method isn't implemented in this library.
Change-Id: I29d354f7584d783104220a797ef9cf97bcc490a2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SaltStack's openstack cloud provider in current production release calls
os_client_config.vendors.get_profile after importing just
os_client_config:
https://github.com/saltstack/salt/blob/v2018.3.0/salt/cloud/clouds/openstack.py#L319
After 5c2eae8f8242332aff59d18b45a7d17f01524aaa vendors module is no
longer imported into os_client_config which results in
AttributeError: 'module' object has no attribute 'vendors'
Importing this manually in __init__.py fixes it, however I wasn't able
to write a working test case — testtools loader loads all submodules
recursively and test runs without throwing exception.
I hope someone more knowledgeable review this change and confirm it
doesn't break this use case anymore.
Thanks in advance.
Change-Id: I5a3cb6096a090c29e257079da7c3d07d5a9b3428
Signed-off-by: Alexander D <maniac@pzskc383.dp.ua>
|
|
|
|
|
|
|
|
|
| |
The upcoming changes to openstascksdk for supporting discovery properly
make these irrelevant ... and actually incorrect. Remove them so we can
land the discovery support. Also, update test_getters to account for
the volume to block-storage shift.
Change-Id: I485fe36e0f3a1ae97e8254a784c37b7fa641844d
|
|
|
|
| |
Change-Id: If4bf5d3e8b23fba75b487a28863b2ec14c5048c2
|
|
|
|
|
|
| |
These don't exist in sdk anymore. Add them back here for compat.
Change-Id: Iddba4809e1e6a949807426d46aa7701c2cd2b007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code has been moved into openstacksdk. Make os-client-config a
thin wrapper around that code.
The legacy client code needs to stay, as it was removed in openstacksdk.
We also have to plumb os_client_config.defaults and
os_client_config.cloud_region.CloudRegion in so that users get the
os-client-config versions from the openstacksdk methods that return the
relevant objects.
Support for per-service region_name has been dropped. This was never
used anywhere and was added for compatibility with openstacksdk Profile
objects. Since Profile objects are no more, we can remove it. It never
made any sense.
Change-Id: I7180e20aa675c0ccbe3718493a6eff2be7e1b8b6
|
|
|
|
|
|
|
|
| |
DataCentred's cloud service was shut down late 2017, and so this vendor
should be removed from the list.
Change-Id: Id10cbed6eaa02cafaf5d220032014b2a3f58ad82
Signed-off-by: Nick Jones <nick@stackhpc.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Adds the Limestone Networks provider info for the Dallas and
Salt Lake regions.
Change-Id: Id457ea68938aea955162dc42a112568b2e55b850
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
since keystoneauth 3.0.0 there is a proper 'none' auth plugin to
use for standalone services deployed w/o Keystone support.
Use this plugin instead of 'admin_token' for auth_type specified as
variants of 'None'.
Change-Id: I425f03574858dd582118d5544381af703134da72
|
|/
|
|
| |
Change-Id: I7d15abb4ee1cbe84f7d7b976bd665635018ed3dc
|
|
|
|
| |
Change-Id: I599156ee4e2ff52e4db5669fce6cacd22447c3b0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
get_one_cloud() and get_one_cloud_osc() iterate over config
values and try to expand any variables in those values by
calling value.format(), however some config values
(e.g. password) should never have format() applied to them, not
only might that change the password but it will also cause the
format() function to raise an exception if it can not parse the
format string. Examples would be single brace (e.g. 'foo{')
which raises an ValueError because it's looking for a matching
end brace or a brace pair with a key value that cannot be found
(e.g. 'foo{bar}') which raises a KeyError.
It is not reasonsable to try to escape any braces because:
1) Escaping all braces breaks valid use of the format string syntax.
2) Trying to determine exactly which braces should be escaped and
which should be preserved is a daunting task and likely would not be
robust.
3) Some strings might look like valid format syntax but still should
be escaped (e.g. "foo{bar}", if this appeared in a password we
wouldn't escape it and there would be a key error on the 'bar' key.
4) In general passwords should never be modified, you never want to
apply formatting to them.
The right approach is to maintain a list of config values which are
excluded from having formatting applied to them. At the moment that
list just includes 'password' but perhaps down the road other
exceptions might crop up. This patch follows this approach,
the list of excluded values can easily be updated if others are
discovered.
Change-Id: I187bdec582d4c2cc6c7fda47a1538194137c616b
Closes-Bug: 1635696
Signed-off-by: John Dennis <jdennis@redhat.com>
|
|/
|
|
|
|
|
|
| |
The service type overrides in get_service_type() fail if the
API version keys are not present in the config dict, which happens
when CloudConfig is created without reading defaults.
Change-Id: I8d035cfd1afc1cad01ceac7cd643568e94897e27
|
|
|
|
|
|
|
|
|
| |
In some more complex clouds there can not only be more than one valid network
on a server that NAT can attach to, there can also be more than one valid
network from which to get a NAT address. Allow flagging a network so that it
can be found.
Change-Id: I3d8dd6d734a1013d2d4a43e11c3538c3a345820b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using make_rest_client on clouds that put unversioned endpoints in the
catalog results in incorrectly set up adapters.
Add the plumbing to get_session_client to pass version args to
keystoneauth. Then use that from make_rest_client.
Change-Id: I69ad746f672ef0b12680e9db3c7b0c691c9f87e4
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
If there is only one cloud and that cloud is envvars, things work as
expected. If there is only one cloud in clouds.yaml and no envvars
cloud, we throw an error, even though it should be obvious which cloud
was intended.
Change-Id: Ia49d0fb2cc7dca36476d0e5ae3fe2b2aa1209e59
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In ansible/ansible#28746 it was reported that there are times
when a p_opt is getting here that does not have a prompt
attribute. Protecting against that is fairly easy to do.
Change-Id: Ia02528f4a107893e480135bc214aa156b8684507
Closes-Bug: #1717906
|
|/
|
|
|
|
|
| |
This isn't a required piece of the config, so it might be unset. Use get
instead of [].
Change-Id: I1bbbcb4ac63a4f6d4399c0fa8881c21264a03e4b
|
|
|
|
| |
Change-Id: Ia8c656e2c6b97c877f5028fef8a94a2c41909bc5
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The right way to update these globals is to use a lock
and ensure that nobody else is updating them at the same
time. Also update a temporary dictionary before setting
the global one so that nobody sees partial updates to the
global one.
This should help fix the thread-safety of shade (and other
tooling built ontop of this library).
Change-Id: Ie0e0369d98ba6a01edcbf447378a786eec3f13f9
|
|
|
|
|
|
|
| |
OSIC has been decommissioned, remove the now useless vendor data.
Change-Id: I57c6043018e96c0069c7db777b9f585cb7d535e7
Related-Change: I2d1b0710e875bd1ebc305fb5b184b68bf18f2ef7
|
|
|
|
|
| |
Change-Id: I18cdecec84f8dd5f11741ac1ffc35630f7eb64b8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unrevert the endpoint_type/interface patch. But this time around, put in
a check for API version 2.0 and only apply the interface arg if it's for
v3.
This reverts commit 4493871824839782846c3825c754895876f8d08e.
Change-Id: Ib347ec686d4d01788ee943c4c4f809aad06d9ccf
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
It's rude to other users and subsequent callers.
Change-Id: I7789f381c99311bfd1c1e0a9869cbacbc96b17d6
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We are destructive to os.environ in the OpenStackConfig constructor- so
it really should only ever be called once. Make sure get_config does
this.
Change-Id: I279bdf68408a807ec18fba634df3769c9b8fc4dc
Closes-Bug: #1691294
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I29db3c830759a80d8ea9f0d93a213b4bae4c8b59
|
|\ \ \ \
| |/ / /
| | | /
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| | |
Grabbing the catalog is weird. OCC should help.
Change-Id: I6e7176568311c1f0e644a8e8876f56c3e153d6e8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 38e5eba621e48d74c05315da2b89e6c801f4c43f.
This patch introduced a bug when using Keystone v2. With this patch, the
following works:
python -c "import os_client_config; print(os_client_config.make_client('identity', auth_url='http://localhost/identity_admin', username='admin', project_name='admin', password='testtest', identity_api_version='3').roles.list())"
But changing identity_api_version from 3 to 2.0 raises an exception.
Without this patch, both 3 and 2.0 works.
Change-Id: I8d2ad71ff51a08af1166d36805b740ea272939ed
|
|/
|
|
|
|
|
|
|
| |
keystoneauth in newton did not have app_name or app_version
as Session parameters. Although it isn't a super common combination,
user agent strings aren't a reason to break something. Add a
simple workaround.
Change-Id: Ib5774389fefdbc190a4b78dd6784c8006afbb270
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Python Argparse supports the 'append' action [1] which is super handy to allow
a user to repeat several times the same argument, each time with different
values.
This doesn't work with occ that tries to "fix argv" but raises this error:
os_client_config.exceptions.OpenStackConfigException: The following options
were given: '--foo,--foo' which contain duplicates except that one has _
and one has -. There is no sane way for us to know what you're doing.
Remove the duplicate option and try again
This patch tweak the _fix_argv() function so that it doesn't explode
if the duplicate option has no '_' not '-' in its name.
Change-Id: I4f06b6aff8d3ab1df45637399bc3a9b4b61764a9
Related-bug: #1685630
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
We've had this mapping over in shade for a while. No sense in keeping
the fun all to ourselves.
Change-Id: Icb2b98b621cfa8cff86c534bfba8f5de2c818e95
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
keystoneauth supports adding a user_agent info to the Session and
Adapter via app_name. Allow users to add app_name/app_name and versions as
desired. Also, add os-client-config into additional_user_agent.
As an example, once this is landed and plumbed through shade,
nodepool will set app_name='nodepool' and we'll have:
User-Agent: nodepool/0.4.0 os-client-config/1.26.1 shade/1.19.1
keystoneauth1/2.18.0 python-requests/2.13.0 CPython/2.7.12
Change-Id: I1eb4dbd2587dcbe297b5c060c3c34b68ef51ef5e
|
| |
| |
| |
| | |
Change-Id: I8a26f5952456a96429ff1413b90aef3091a8b5bf
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have a special case to work around a thing we're pretty sure
keystoneclient used to do but apparently doesn't do anymore. Remove the
workaround.
Co-Authored-By: Jamie Lennox <jamielennox@gmail.com>
Change-Id: I873ad91816150b593d4aef13dcd1520e8c91b22a
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At least for cinder for now, allow a consumer of get_legacy_client to
express the minimum version they find acceptable. This will use
cinder_client logic to figure out the version from the url.
As a follow on, expand this to all of the clients and make it support
microversions for the clients that support microversions. (Right now
it's just going to be major versions, so min_version=1 will throw an
exception if the cinder service returns a v1 endpoint.
Also, because we override the volume/volumev2/volumev3 service type
stuff, we need to do extra special logic in get_session_endpoint to try
all three in the case where do not have a configured api_version.
Change-Id: I7b6b3588fec9a6be892cf20d344667f0b9a62f0a
|