11 Commits

Author SHA1 Message Date
ChangBo Guo(gcb)
c8bb1a2755 Remove copy of incubated Oslo code
The Oslo team has moved all previously incubated code from the
openstack/oslo-incubator repository into separate library repositories
and released those libraries to the Python Package Index. Many of our
big tent project teams are still using the old, unsupported, incubated
versions of the code. The Oslo team has been working to remove that
incubated code from projects, and the time has come to finish that work.

As one of community-wide goals in Ocata, please see:
https://github.com/openstack/governance/blob/master/goals/ocata/remove-incubated-oslo-code.rst

Note: This commit also fix pep8 violations.
Change-Id: I03288adb94c702d1d63df88ef9ba33a2ff59eaa3
2016-09-28 10:06:45 +08:00
Marc Koderer
f387243e36 Add validation for token and bypass_url
Specifying only token or only bypass_url leads to a client error.
Better to have a corresponding sanity check on shell level to
include the needed parameters/env variables.

Change-Id: I55dac599d4dadc273eacab14746bf449d3495f2b
Closes-bug: #1604820
2016-08-12 15:48:47 +02:00
Marc Koderer
65996e210f Use consistent env variable naming
Old env variables are still supported but the default ones should
consistently use OS_ as prefix.

Change-Id: Idd26a587cade7f6a27115c4e8cf220cd43b1703e
Closes-bug: #1603387
2016-07-18 09:54:12 +02:00
Jenkins
cdbbba7019 Merge "Fix "single_alias" action for CLI commands" 2016-05-27 14:27:51 +00:00
Valeriy Ponomaryov
5a3ef94c5b Add possibility to provide auth token via CLI
Python part of Manilaclient does support auth by token, but
CLI part does not. Therefore, add two new optional args
with related env vars:
--os-token [OS_TOKEN]
--bypass-url [MANILACLIENT_BYPASS_URL]

Also, disable checks for other auth data if these two are provided.

Change-Id: I567294dfb61e702410c3f0fadc15a04667075434
Closes-Bug: #1572095
2016-05-16 20:02:06 +03:00
Valeriy Ponomaryov
ea5c3e7b28 Fix "single_alias" action for CLI commands
For the moment if default value for CLI option with
"single_alias" action is different than None we cannot redefine it.
Fix it and cover with unit tests.

Also, fix existing aliases and add some where good to have.

Change-Id: Ic61426d9bd894b01f9b035d6d19bb7bd113f96ad
Closes-Bug: #1552771
2016-05-16 13:24:37 +03:00
John Spray
6bad71c9e6 Add 'cephx' authentication type
This duplicates the validation that is
done server side, as is the case for
the existing auth types. This auth type
is supported for cephfs protocol.

Also a unit test that was unnecessarily
testing a helper text was removed.

Co-Authored-By: Ramana Raja <rraja@redhat.com>

Change-Id: If33e6d847d3c1e6a72ce334b645b45538576058d
2016-03-04 01:05:14 +05:30
cFouts
c34e3b7d2c Nova Style API Version Support for Client
The Manila client needs the following changes to support microversions:

*   Maintain backwards compatibility with Kilo. When the client detects
    that the server doesn't support microversions it will fall back to
    using the v1 API.
*   The --os-share-api-version option supports overriding the version.
*   If 1.0 is specified as the version the client will load the v1
    client and use the server's v1 API.
*   The client will send a request for the server's API version and
    determine if the client's supported versions and the server's
    supported versions overlap. If not the client will display an error
    and quit. See diagram 1 below.
*   The client supports the @wraps annotation. The annotation is used
    with the v2/shell.py commands and any class that inherits from
    the Manager class in manilaclient/base.py.
*   If an appropriate command version isn't found for commands using
    @wraps then the client will display an error and quit.

following commit: ab49d645befd04c84272f0d24e1b604012d191dd.

Diagram 1:
  Client:
         2.5           2.8
          |-------------|

  Server1:
     2.0           2.5
      |-------------|
     Client uses version 2.5

  Server2:
               2.7           2.10
                |-------------|
               Client uses version 2.8

  Server3:
                  2.9           2.12
                   |-------------|
                  Client displays error and quits

  Server4:
     1.0 (Kilo Server)
      |-|
     Client detects pre-microversion server and loads v1 client

Example usage of wraps annotation:
*   Support 2.0 - 2.4: @api_versions.wraps("2.0", "2.4")
*   Support 2.5 - latest: @api_versions.wraps("2.5")

Implements: blueprint manila-client-advanced-microversion-support

Change-Id: I3733fe85424e39566addc070d42609e508259f19
2015-11-16 19:03:55 +00:00
Valeriy Ponomaryov
997cc43433 Add Keystone v3 API support
Keystone is used for authentication in Manila and the latter's
client does not support latest version of it that exists for long time.

So, add support of Keystone v3 API and make Manila client to use it
at first priority if it is available.

Change-Id: I3e2f505f46f7ab60c66bcb0b1d65a38bea602df4
Closes-Bug: #1499260
2015-10-13 21:12:55 +03:00
Sun Jun
faaa07a722 Add hint for HDFS protocol while creating shares
Add hint for creating shares with HDFS protocol, Since HDFS
native protocol driver has been merged.

Change-Id: Ic8724b585d1bf0ee1f2b7f8eaa0ed79927b1a292
2015-02-14 10:53:13 +08:00
vponomaryov
745adb323f Move tests into manilaclient package
tests/__init__.py implies a package in the global namespace called tests.
That's not what these are, they are tests in the manilaclient namespace.

Also moved unit tests to dir 'unit', it is done so because 'functional' tests
are expected to be added.

Change-Id: I801214b865e9cef8db7511f209dcf3c26b75d70f
2014-10-20 15:41:18 +03:00