32 Commits

Author SHA1 Message Date
Jenkins
c70144aced Merge "Check tenant_id's format in "nova quota-update"" 2013-01-29 20:04:35 +00:00
Jenkins
dbc186aa88 Merge "make print_dict split strings with newlines into multiple rows" 2013-01-29 20:03:36 +00:00
Haiwei Xu
168636e744 Check tenant_id's format in "nova quota-update"
Fix bug 1088835
"nova quota-update" command is executed without checking the format of
the tenant_id argument. The tenant_id should be in the format of UUID.
The tenant_id of quotas should be in accord with the form of keystone's
tenant_id. So this patch checks the format of the tenant_id when "nova
quota-update" command is executed.

Change-Id: I47c4f2ff9adbab5da4697270dcf024ac88e24529
2013-01-24 08:04:28 +00:00
Melanie Witt
f9aa5ec834 make print_dict split strings with newlines into multiple rows
When printing a dict e.g. "nova show" one of the properties
is "fault". When the user is admin, "details" of the fault
is shown, which includes a backtrace. This causes the
printing of the table to be unreadable as the backtrace
overflows the table row. This patch adds a separate row
for each substring after splitting on newlines.

Change-Id: I4c1bc8725a2bb6970be2c884c5e044d9eade8302
2013-01-21 23:37:31 +00:00
zhiyanliu
3e190c5e49 Ensure list output function can support non-sorting printing
Ensure list printing function in utils can handle non-sorting
calls. Allow result list can be formatted and outputted without any
sorting field, keep natural order to the list printing. Adding necessary
checking to avoid prettytable (0.6.1 for me) exception: "Invalid field
name: None!".

Fix bug: #1099732

Change-Id: Ied869d987e608fff8b8b5f5a65d21e02f0cebeaa
Signed-off-by: zhiyanliu <lzy.dev@gmail.com>
2013-01-17 11:51:46 +08:00
Rohan Rhishikesh Kanade
9937419888 Fix find for alphanumeic flavor id/name
Fixes LP bug #1089299

Change-Id: Ia9cc756b85096532acfc9ecacd1330de8a765fba
2012-12-20 03:14:39 -08:00
Nikola Dipanov
7ddc2fdfcd Fixes utils.findresource checking for integer
Fixes the novaclient.utils.find_resource function to properly handle
non integer values and not break with an AttributeError.

Adds a test case to test a few more non valid inputs.

Fixes bug #1065367

Change-Id: Iaa2025f4eb580234f754596c3572e2f87872170e
2012-11-02 18:21:04 +01:00
Russell Cloran
7bf93a52f8 Validate that boolean parameters are boolean
Ensure that values which are supposed to be boolean look like correct
user input, instead of assuming that any non true-looking input is
False.

Also, update the flavor manager to raise a CommandError if is_public is
not a boolean value.

Fixes bug 1059414

Change-Id: I3275e4bba103b14081becf91f723f1be060391e5
2012-10-30 11:38:58 -07:00
unicell
f160a20fd9 Implement project specific flavors API, client bindings
blueprint project-specific-flavors

This change implements client bindings for the project specific flavor API in following change
https://review.openstack.org/#/c/11270/

Change-Id: Id8d559985f9369f53926e63ee5f5ce23a051e25b
2012-08-27 22:38:36 +08:00
Vishvananda Ishaya
576a64fbb5 Allow resources to use any field as 'name'
The 'name' field for some resources is called something different,
for example 'display_name' for volumes. There was a hack in our
find method to search for display_name as well.

This change adds a new class variable to a Resource to tell it
which attribute to use for searching by name. Volumes and snapshots
were switched to use 'display_name' and hypervisors were switched
to use 'hypervisor_hostname'.

Tests fixed and added.

Fixes bug 1034536

Change-Id: I1b4fb969d42c59d1ab8e3e275a563bbe158e9264
2012-08-08 12:01:40 -07:00
Josh Kearney
d4c9b12f39 Indicate unused variables and other misc. house cleaning.
Change-Id: I4529d8b6b27dddb1b79ee2167a054b471eaf0dbc
2012-06-27 11:55:36 -05:00
Sandy Walsh
a2a62a5f71 option to bypass managment endpoint and timings support
--timings = show timings for each call made to nova (including auth)
--bypass_url = api node endpoint to use instead of one from service catalog

For example:
nova --timings --bypass_url=http://10.24.31.37:8774/v1.1/nova-staging boot --image f304d266-0a49-4877-b34c-63aea8360297 --flavor 3 delete_me_2

Change-Id: Ib2a258b7e969ad56ce4ee2bd64c61310278cb856
2012-06-18 13:03:58 -03:00
Brian Waldon
7745b35b69 Lock prettytable dep at v0.6
Specifically set the prettytable dependency so we can reliably
align data in table cells.

Change-Id: I1787c4100248b2a75405df690931110c76803413
2012-06-11 09:57:03 -07:00
Ghe Rivero
d743f92dc2 Updated to new prettytable api. Fixes bug 995818
In 0.6, printt() (wrapper to get_string) has been removed.
Updated to use get_string(), backward available since 0.2 release.

Change-Id: Ica292757ec3de5004f27afbc5c8ee11d839421df
2012-05-07 18:45:57 +02:00
Vishvananda Ishaya
d43f172071 Don't force volume id to int and allow search by name
* required for change 6511 to merge

Change-Id: Ia8d28ca7cce4c00aa0b3f1fe1da6719ec99d6fe4
2012-05-02 15:06:55 +00:00
Rick Harris
0028eb4ac2 Request ID when name is ambiguous.
Fixes bug 931605

Change-Id: If0778915d964995dbb6647d56ed21075aec08baa
2012-04-09 21:13:57 +00:00
Rick Harris
b22ec22336 Add human-friendly ID support.
Allows a user to interact with certain models (image, flavors, and
servers currently) using a human-friendly identifier which is a
slugified form of the model name.

Example:

    nova boot --image debian-6-squeeze --flavor 256mb-instance myinst

Change-Id: I43dbedac3493d010c1ec9ba8b8bb1007ff7ac499
2012-03-08 04:53:47 +00:00
Vishvananda Ishaya
03f54c57e1 Makes novaclient use the volumes endpoint
* Depends on https://review.openstack.org/#change,4479
 * Adds support to change service type including tests
 * Adds decorator for methods that need to use another service type
 * Changes volume and snapshots to use the volume endpoint
 * These extensions will move into the volume client once it exists
 * Fixes bug 940017

Change-Id: I683e4ca6c67e278d8aa8a9acec3dc0f1872f43f2
2012-02-26 06:11:12 +00:00
Dave Walker (Daviey)
1ee77c7fe3 Allow UUID_CACHE_DIR overriding via env variable.
This is declared as NOVACLIENT_UUID_CACHE_DIR.
Resolves bug 932468 , defaulting to previous behaviour.
Added myself to AUTHORS

Change-Id: I154500517d7c882a4a090588a95f4b3bfee70595
2012-02-15 21:58:27 +00:00
Paul Voccio
cb9a7a37a8 adding credentials and endpoints output for debugging
Change-Id: I74e12172d8c05df257c4b908e3278712a66f795a
2012-02-06 11:14:16 -06:00
Jenkins
4c61a89457 Merge "Abstract Client building into novaclient.client" 2012-01-04 16:45:47 +00:00
Brian Waldon
e0174b51bd Abstract Client building into novaclient.client
This prevents clients of the pythonic api from having to know the
internal module structure.

Change-Id: Idd5c522ac3ff6c2d7915f96ed327323ec83d54fc
2011-12-29 15:40:49 -05:00
Julien Danjou
3758c260a0 utils.find_resource fixes + fix for volumes
Nova volumes do not have a name property but a displayName one, therefore we
modify find_resource() so it looks for this. Then, we modify the test suite
for utils.py so it uses the novaclient.base.ManagerWithFind class for its
FakeManager rather than implementing its own find() method. This way we are
sure that the utils.py functions work correctly with ManagerWithFind and its
way to search in objects list.

FakeResource class is now used, whereas it was not before.

Change-Id: I4c4838250e6987e05022e1607e8d099eb8fb7fff
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-12-22 12:03:59 +01:00
Rick Harris
88bdfdd12f Extensions can now modify resources.
Change-Id: I0d9c1050428d0ccf2e2b18053d75e0465463c08b
2011-12-21 19:25:39 +00:00
Ziad Sawalha
49284dc5cd Add 'discover' command for Keystone discovery and version listing
Added @unauthenticated decorator to mark subcommands that do not
need authentication. And checks to skip authentication for these
commands.
Added novaclient.keystone to setup.py

Change-Id: Id2fd60af305c30a950bdbae8f897192bfae4d797
2011-12-20 12:33:50 -06:00
Rick Harris
bb879dd10b Adding extension framework.
Change-Id: If882f7a822ef6b1e58666b3af6f7166ab0a230fe
2011-12-15 19:44:33 +00:00
Jason Straw
690f3d3866 PEP8 cleanups of utils, and the v1_?/shell.py files 2011-11-03 22:44:22 -05:00
Jason Straw
66d8bc49b7 Updated the novaclient shell to display the parent server id that the image came from. 2011-10-30 17:20:47 -05:00
Brian Waldon
79a532b910 cleaning up find_resource method to support str/int ids, uuids, and integer-like names 2011-08-22 15:13:26 -04:00
termie
536be15a87 whitespace cleanups 2011-08-08 13:25:29 -07:00
root
6b4e9c5c8b formatting updates 2011-08-04 18:39:21 +00:00
Brian Lamar
454daa2cba Tests working again...merged in some work we did earlier. 2011-08-03 17:41:33 -04:00