1689 Commits

Author SHA1 Message Date
Mark McLoughlin
9f1ee1249a Mention keystoneclient.Session use in docs
Jamie added some excellent "Using Sessions" docs to keystoneclient in
I5e44c1029ce160cb2798cfb8a535aa9f3311799a. These will be published to

  http://docs.openstack.org/developer/python-keystoneclient/using-sessions.html

once the version after 0.9.0 is released.

Let's add a brief example on how to use this API and reference the
keystoneclient docs.

Change-Id: Icbcef45f13c1f962c90aa3db9dde4360520166ff
2014-07-01 16:53:47 +01:00
Jamie Lennox
cc7364067f Allow us to use keystoneclient's session
The session object is a cross-client means of standardizing the
transport layer.

Novaclient's HTTPClient object has diverged significantly from other
clients. It is easier to simply replace it if a session is provided. If
a session is provided then users of the library need to be aware that
functions such as authenticate() will no longer have any effect/are in
error because this is no longer managed by nova.

Change-Id: I8f146b878908239d9b6c1c7d6cdc01c7e124f4e5
2014-07-01 16:53:47 +01:00
Jenkins
b9538d8280 Merge "Convert network tests to httpretty" 2014-07-01 00:25:37 +00:00
Chris Yeoh
6aa419b82e Adds clarification note for project_id vs tenant_id
The client __init__ method takes both a project_id and tenant_id which is
rather confusing as in the Nova API these terms are used interchangeably. The
comment clarifies the difference between a project_id and tenant_id
when using novaclient.

For backwards compatibility reasons we can't really change the names (though for V3
perhaps we should in the future).

Change-Id: I569fe9318335c8d686153b0936205cb190e01ef1
2014-06-30 09:26:13 +09:30
Jenkins
5a3ca61cfd Merge "Sync Oslo's apiclient" 2014-06-28 18:24:25 +00:00
Jenkins
9a48cf8063 Merge "Overhaul bash-completion to support non-UUID based IDs" 2014-06-28 18:24:18 +00:00
Jenkins
c0f45fdb74 Merge "Convert limit tests to httpretty" 2014-06-28 18:18:11 +00:00
Jenkins
2b946ea630 Merge "Convert keypair tests to httpretty" 2014-06-28 18:18:09 +00:00
Jenkins
6120158e62 Merge "Convert image tests to httpretty" 2014-06-28 18:18:07 +00:00
Jenkins
e84c4e5d95 Merge "Convert Hypervisor tests to httpretty" 2014-06-28 18:18:00 +00:00
Jenkins
bc453f0cb0 Merge "Convert hosts tests to httpretty" 2014-06-28 18:12:49 +00:00
Jenkins
a8c184362b Merge "Fix using a variable which is not defined" 2014-06-28 00:46:24 +00:00
Jamie Lennox
5d9537a02e Convert network tests to httpretty
Change-Id: I81a83c98b925a2bc7373dd17f2c2ecd78fa23a6d
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
Jamie Lennox
c4fa6648c8 Convert limit tests to httpretty
Change-Id: I10e0357e0f79c009a00759fd22e6148d10b5286d
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
Jamie Lennox
9348128d35 Convert keypair tests to httpretty
Change-Id: I6876d97dd6600a0a34b89d9f693078f495085622
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
Jamie Lennox
935219a6eb Convert image tests to httpretty
Change-Id: I3abc51ba4dcc641b72e3ac5e09955e4b22718451
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
Jamie Lennox
817ec0764c Convert Hypervisor tests to httpretty
Change-Id: I0dc0167af618e88f76ace9b893b2b26966903457
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
Jamie Lennox
448b807ccc Convert hosts tests to httpretty
Change-Id: Ib1cdb508ef04a86350d3890c14e181b6ed1177f2
blueprint: httpretty-testing
2014-06-27 10:02:52 +10:00
huangtianhua
65b0d36f3c Fix using a variable which is not defined
There is a variable which is not defined but used, we should define it
before using. Add a test for get_resource_manager_extra_kwargs_hook
function, and change the exception to a more detail instead broad
'Exception'.

Change-Id: I7a798dad55a65f06ebbe175925a00028940bb168
2014-06-26 11:32:55 +08:00
Jenkins
7d1cd188e0 Merge "Convert floating IP pool tests to httpretty" 2014-06-26 02:07:47 +00:00
Jenkins
614f9ebf2b Merge "'policy' should be required in server_group_create" 2014-06-25 05:06:47 +00:00
Jamie Lennox
98ef56332d Convert floating IP pool tests to httpretty
Change-Id: Ic9332ddd30a0bc3ffc5ed7c046f60ded3f940e85
blueprint: httpretty-testing
2014-06-25 10:46:16 +10:00
vagrant
2b54bbc8bb add disk bus and device type to volume attach
This change adds the optional parameters: disk bus and device type
to the volume-attach command for the V3 API.

DocImpact
Closes-Bug: #1303875

Change-Id: I4fd07726887d08e5b669139b559bdb2c2d21826e
2014-06-24 18:27:43 +00:00
Jenkins
37f02bde12 Merge "Look for all accessible flavors by default, not just public ones" 2014-06-24 11:07:11 +00:00
Jenkins
1a7f84cb46 Merge ""nova boot" should not log an error if subsidiary commands fail" 2014-06-24 06:33:10 +00:00
Jenkins
6e4823c07c Merge "Updated from global requirements" 2014-06-21 00:17:25 +00:00
Jenkins
c63dd3c6b8 Merge "Add some security group tests for the V1_1 API" 2014-06-20 22:33:49 +00:00
Rick Harris
298b06f7e0 Sync Oslo's apiclient
Oslo's version of apiclient fixes a bug where if `human_id` is `None` it
causes `novaclient` to crash, so lets sync it over to fix that bug.

Change-Id: I53f174a1d3356c4038dcbdf88f4f9c4ea179418c
References-Bug: 1288397
2014-06-20 16:37:34 -05:00
Rick Harris
4c8cefb98a Overhaul bash-completion to support non-UUID based IDs
There are a few things currently wrong with bash-completion as it stands now:

    1) IDs are currently required to be UUIDs. This is an arbitrary limitation
       and doesn't make sense for certain kinds of objects, like `Flavors`
       where a valid ID could be `performance-16gb`.

    2) The code is spread out between Oslo's `Resource` and Novaclient's
       `Manager` class. This makes it difficult to improve the code because it
       requires changes to two separate projects. We should centralize the
       code in Novaclient until the API is stable, then import the code into
       Oslo in its entirety, not partially like it is now.

    3) The completion code is handled by the `Manager` of which there is one
       per Resource-type. In the interest of centralizing this functionality,
       we should create a `CompletionCache` class and hang it off of `Client`
       of which there is one-per-session.

    4) The completion-code currently runs by default even in headless mode
       (e.g. novaclient without the shell). It'd be much more efficient to
       only write to the completion cache if we're accessing the `Client` from
       the novaclient shell. We can make this an option to support third-party
       CLI clients that want to use the completion-cache as well.

NOTE:
    * The corresponding Oslo patch is here:

        https://review.openstack.org/#/c/101376/

    * This patch was tested in multithreaded mode to prevent any regression
      from:

        https://bugs.launchpad.net/python-novaclient/+bug/1213958.

Change-Id: Idada83de103358974b739f81d4f392574f9e1237
Closes-Bug: 1332270
2014-06-20 16:37:28 -05:00
Jenkins
ef420300e2 Merge "Enable F841" 2014-06-20 19:06:00 +00:00
Abhishek Chanda
a20284ebe8 Add some security group tests for the V1_1 API
This patch adds a test for NoUniqueMatch exception
to the v1_1 API

Change-Id: Ic9947eaed34be100c529f021432f0c388a7c3ddb
Closes-Bug: #1250501
2014-06-20 11:22:42 -07:00
OpenStack Proposal Bot
fce7da4934 Updated from global requirements
Change-Id: I7645c469147b0ff235aaf96fd6f6f2df68505ea4
2014-06-20 03:38:52 +00:00
Matt Riedemann
3441007062 Allow updating fixed_ips quotas in quota-class-update (v2 shell only)
The quota-class-update command wasn't allowing updating quotas for
fixed_ips which is a supported key for the os-quota-class-sets API.

This change adds the support to update qoutas for fixed_ips and updates
the existing test to be more robust in (a) the quota keys it's testing
and (b) the request body it's asserting.

This is a v2-only change since the os-quota-class-sets API was removed
from the nova v3 API in Icehouse.

Closes-Bug: #1330571

Change-Id: Ifcca6d00551619b993b96f05134980a4ca2f2acf
2014-06-19 06:09:24 -07:00
Daniel P. Berrange
d17253b29a Look for all accessible flavors by default, not just public ones
The Nova server will restrict unprivileged user accounts to just
public images, while allowing administrator accounts access to
all. The Nova client shouldn't force the flavor name lookup to
be restricted to just public images, since that breaks the ability
to the flavor name when booting an instance

Fixes bug #1327212

Change-Id: I949aec52660242249b8cba51d77bfdc1acaf31d2
2014-06-19 12:35:43 +01:00
ChangBo Guo(gcb)
88d0b6f2d9 Enable F841
F841 detects local variable is assigned to but never used.
This commit fix the violations and enable F841 in gate.

Change-Id: I52419f5e17db70e511ff2d4d61c85458c958e9c3
2014-06-19 09:49:05 +08:00
OpenStack Proposal Bot
e6a51f47c4 Updated from global requirements
Change-Id: Iee04e0f6b62cb97824bef2217a3dbd42c15754f8
2014-06-18 14:10:23 +00:00
Jenkins
fa2f38a3b2 Merge "Remove quota-class-* commands from v3 shell" 2014-06-18 06:55:52 +00:00
Matt Riedemann
bdbc3afc51 Remove quota-class-* commands from v3 shell
Commit 1b15b23b0a629e00913a40c5def42e5ca887071c removed the
os-quota-class-sets v3 API from Nova in Icehouse.  This change removes
the corresponding client code.

Closes-Bug: #1331095

Change-Id: Iaa2f4063e0f671da5a54ff89d0f1c1780a2687c4
2014-06-17 12:42:20 -07:00
OpenStack Proposal Bot
aac82c4097 Updated from global requirements
Change-Id: I8b166da9845a1d791ca19ff6713769b83c0b4137
2014-06-17 13:57:02 +00:00
Jenkins
a4e033292d Merge "Fixes wrong value description for volume-detach" 2014-06-17 11:43:45 +00:00
Jenkins
f44c49d3c3 Merge "Bump hacking to 0.9.x series" 2014-06-17 10:30:42 +00:00
Jyotsna
b78c0d4f46 "nova boot" should not log an error if subsidiary commands fail
Fix:
Intially the cli was raising "CommadError" in case the requested
flavor or image were not present.
This error category was not approrpiate as it signifies an error
in the command syntax. When the requested resource (flavour/image)
does not exist, a ResourceNotFound error should be raised. So,
added a new error category "ResourceNotFound" to cater for this
scenario and updated the code to raise this new error.
"nova show <instance_name>" command has also been updated to raise
"ResourceNotFound" error when the requested vm for which details
have to be displayed does not exist.

Closes-Bug: #1258488
Change-Id: If64a087944586ef5792efe3baa62e455b9bbaa07
2014-06-17 14:48:11 +05:30
Jenkins
d07699de84 Merge "adjust to {SHA1} convention for token" 2014-06-17 07:10:45 +00:00
Jenkins
8aec8049b9 Merge "Add posargs support to flake8 call" 2014-06-17 03:59:22 +00:00
Jenkins
882627daf2 Merge "Convert Floating IP bulk tests to httpretty" 2014-06-16 20:03:22 +00:00
Joe Gordon
9f92301983 Bump hacking to 0.9.x series
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future
patches.

Change-Id: Ia3517e705f894b48585b957c21e7a3a6ed90e586
2014-06-16 09:30:52 -07:00
Jenkins
516b1a7692 Merge "add tox target for python 3.4" 2014-06-16 14:14:33 +00:00
Jenkins
96bc1d2344 Merge "Convert Floating IPs DNS tests to httpretty" 2014-06-16 08:22:27 +00:00
Jenkins
2d0af6ed02 Merge "Convert Floating IP tests to httpretty" 2014-06-16 08:20:46 +00:00
Joe Gordon
b4d0280f03 Add posargs support to flake8 call
Add posargs to flake8 call in tox.ini, with this you can pass arguments
directly into flake8 using the following notation
  tox -epep8 -- --FLAKE8-ARG

This can be used to pass arguments like '--statistics' to flake8

Change-Id: Ia820d62c4a1f428d60d88b04d8a4d9b1442baa09
2014-06-15 23:42:31 -07:00