Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I4a5b1ec999110a50fc904f3ae93e3983efa64f88
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The insecure client options and timeout were bypassed
if auth token was given, as in case of Magnum UI.
This is causing SSL error even insecure is set to true
by Magnum UI and magnum client is unable to skip SSL check
becuase insecure option was not passed to HTTPClient.
This was caused due to this change :
a374b9f99c (diff-c8d8ebbd1f15e85c914906c6357e0a5f)
As a consequence, any HTTPS based connections to magnum endpoint
fail. With this patch, the missing options to HTTPClient are
correctly passed to and SSL checks are skipped safely if insecure
is set to True.
Change-Id: I885301d6eb69182f109cdfbfbc771bbbf13beb2a
Closes-Bug: #1634305
This patch adds 'OpenStack-API-Version' header for each
requests.
Change-Id: I49310f1b53447ce00e78e26661cc895ce4f1c4e5
Implements: blueprint api-versioning
Currently, magnumclient doesn't work with token and endpoint_override.
Due to cloud_config limitation. This issue breaks magnum horizon plugin.
This patch fixes it.
Change-Id: I0d0a41e72a1a806c4422c2dcde2b86e9889bc35f
Closes-Bug: #1616315
Use os-client-config[1] to process options and get the Session from
keystoneauth1. This adds support for reading clouds.yaml
files and supporting the OS_CLOUD env var for selecting named clouds
from a list of them.
[1]: https://github.com/openstack/os-client-config
Closes-Bug: #1599747
Change-Id: I23a6e80648e67c0b652693cd146bd9e94ad4fb23
After this patch [1], Magnum is no longer the "Container Service", it
became the "Container Infrastructure Management Service". Based on the
decision, this patch proposed to rename Magnum service type from
"container" to "container-infra". The old service type will be
deprecated and eventually not supported.
There is another patch [2] on Magnum server side for the renaming.
This patch should land first, then the server patch.
[1] https://review.openstack.org/#/c/311476/
[2] https://review.openstack.org/#/c/319300/
Change-Id: I55205ff2b304678d2b53bbd4d66403078c6baac8
Closes-Bug: #1584251
When trying to consume python-magnumclient from os-cloud-config,
it is failing with:
TypeError: __init__() got an unexpected keyword argument 'endpoint_override'
That is because this parameter is not supported in v1 from magnumclient. Add the
parameter, forcing to be the equivalent of magnum_url.
Change-Id: I3e9d41c3efabf23826f35fc8d1bb12c14770460b
Closes-Bug: 1573468
Adds insecure option and associated MAGNUMCLIENT_INSECURE environment
variable for skipping SSL certificate verifcation in the client.
Change-Id: I0396453e8315c5f24703161457c91f7640827b8d
All client interactions should actually flow through a keystoneauth
Session. Add the parameter for a user to pass one in, but support
the old style of direct parameters too. A followup patch will add
os-client-config support to the shell, so add that to requirements.txt
instead of keystoneauth directly to look forward.
Also, trim unneeded things from requirements.txt because we're adding
os-client-config which pulls in various things.
Closes-Bug: #1514733
Change-Id: I88b1d0e4e119429599dec75c5db24237a92edcec
This change removes homemade code to search magnum endpoint and uses
keystoneclient url_for method.
Closes-Bug: #1444409
Change-Id: Ida5fc20bd4ee46ec2d6846a31c3ec79e216b73f2
Currently get_keystoneclient uses a side effect (keystone_client
attribute) to cache keystone client instance but it's not more required
as get_keystoneclient is called at most once, thanks to parent changes.
Closes-Bug: #1444405
Change-Id: I832f4ef90fd9ec32ebf4d97675379b73620b0646
This change adds unittests for magnumclient.v1.client module in order to
check its behavior and avoid regressions.
Closes-Bug: #1444398
Change-Id: Ib41563bdcd83620930a866f2c184d8c1e0994762