901 Commits

Author SHA1 Message Date
Jenkins
0daa096939 Merge "Use a common decorator to log 'take_action' activation" 2015-09-11 02:43:54 +00:00
Jenkins
fa4b11a86f Merge "Add filtering by user for 'openstack server list'" 2015-09-10 20:19:43 +00:00
Jenkins
1e36b122f8 Merge "Add support for listing servers of other projects" 2015-09-10 20:18:45 +00:00
Jenkins
a591ab34c7 Merge "Use novaclient.client.Client for initialization Nova client" 2015-09-10 05:19:23 +00:00
Jenkins
46696f5ed5 Merge "Create log configuration class" 2015-09-09 20:15:54 +00:00
Jenkins
cd54db8741 Merge "Optimize log formatting" 2015-09-09 20:06:27 +00:00
Jenkins
535aac6c91 Merge "Extract log level from configuration file" 2015-09-09 20:06:24 +00:00
Jenkins
67387ba9cd Merge "Move options to log level out of shell.py" 2015-09-09 19:46:28 +00:00
Andrey Kurilin
c513f05ce9 Use novaclient.client.Client for initialization Nova client
`novaclient.client.Client` is a recommended entry point for novaclient.
It supports backward-compatibility and allows Nova-folks to change
interfaces of inner versioned clients classes.

Change-Id: Iaf20714f63c307f88a451759f041ca509fbcf6f8
2015-09-09 18:00:50 +03:00
Jenkins
1a2bb48432 Merge "Move set warnings filters to logging module" 2015-09-08 22:06:02 +00:00
Jenkins
b4421e3802 Merge "Properly handle port arguments for ICMP" 2015-09-08 21:18:06 +00:00
Jenkins
24ca952eb6 Merge "Set up every time record log in file" 2015-09-08 20:22:24 +00:00
Jenkins
7f24818994 Merge "Volume v2 list does not show server name" 2015-09-08 20:16:21 +00:00
kafka
10db0df857 Add filtering by user for 'openstack server list'
Add a new option to search by user when listing servers,
include support for domain scoped users, also update
docs

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Closes-Bug: #1483974
Change-Id: Ifdade6dc9ca8400fbd85f6b55793ab15ed17b97d
2015-09-08 18:36:56 +00:00
Ashish Singh
66010b41f1 Add support for listing servers of other projects
Added project and project-domain option to server list
command for listing servers based on project name or id

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Change-Id: Iaadfffe734ad8a72fa4b1eeb2222748c66f7fae0
Closes-Bug: #1488486
2015-09-08 13:27:50 -05:00
Dean Troyer
3abfea083a Fix compute API version snafu
novaclient 2.27.0 introduced the API microversion discovery and client.Client
now wants an api_version argument to properly work out the correct API
version in use.  OSC needs to provide this when required.

Letting the compute client plugin do the version validity checking makes more
sense than encoding it into shell.py, so I've added a new OSC plugin interface
function check_api_version() that is called from shell.py if it exists.  If it
either does not exist or it returns False the previous version checking using
API_VERSIONS is still performed.

compute.client.check_api_version() conditionally imports the new
novaclient.api_versions module and uses it if successful.  Otherwise
check_api_version() returns False and the previous code path is resumed.

One side-effect of this is that it is now valid to use --os-compute-api-version
with any valid microversion supported by the installed python-novaclient.

Closes-Bug: #1492467
Change-Id: I4535b38a5639a03a9597bf83f6394f9bb45c2b9e
2015-09-04 16:25:55 -05:00
Dean Troyer
e6706f2526 Properly handle port arguments for ICMP
The Compute API requires 'from_port' and 'to_port' to be -1 for
ICMP security group rules.  It happily accepts them empty or None
but the resulting rules do not work.  So we force the values for
ICMP rules.

Closes-bug: #1477629
Change-Id: Iba57211014caca16be7c9a28d15d4db2a6c51b8d
2015-09-03 13:06:45 -05:00
Jenkins
9210cac86a Merge "Ignore flavor and image find errors on server show" 2015-09-03 02:26:51 +00:00
Jenkins
be964cf409 Merge "Running 'limits show' returns nothing" 2015-09-02 15:20:26 +00:00
Joshua Harlow
e3c46ece4a Use a common decorator to log 'take_action' activation
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.

Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
2015-09-01 16:49:54 -07:00
Joshua Harlow
d751a21d2c Fix 'auhentication' spelling error/mistake
Change-Id: Iba58c188d2ae44170539534eea1415cf8eb65ac4
2015-09-01 15:51:58 -07:00
TerryHowe
14a714f2a2 Volume v2 list does not show server name
The volume v2 list was using the volume id rather than
the server id.

Change-Id: Ibe03d34b5b503af2d00202dabd640f796449cf9a
Closes-Bug: #1489954
2015-08-28 11:11:37 -06:00
TerryHowe
5171a427ac Ignore flavor and image find errors on server show
If there is an error finding an image or a flavor during
image show, ignore it and just print the id of the flavor
or image.  This code is also used during server create and
server rebuild, but only to display the results.

Change-Id: I5362158ab8ffc3e5a0800904d6ea15420c3a8627
Closes-bug: #1489901
2015-08-28 09:32:05 -06:00
TerryHowe
85a03945f0 Create log configuration class
Configuration of logging gets triggered twice.  The first time it
uses the CLI options when the application is started and second
it uses the configuration file after that is read.  The state of
the logging needs to be saved from the first to the second time,
so I created a class.

Implements: blueprint logging-migration

Change-Id: I7b8d1a3b6fd128e98cafd7c16009c7b694a52146
2015-08-26 10:23:53 +00:00
Steve Martinelli
f14251669f default OS_VOLUME_API_VERSION to v2
Cinder is trying to deprecate/remove support for v1, so we should,
as a client library default to v2 and keep support for v1.

Related-Bug: 1467589

Change-Id: I732448a57fc3fd06a8d82ec0f0d2ace671036ca2
2015-08-24 10:38:43 -05:00
Major Hayden
0f0d66f3f1 Running 'limits show' returns nothing
Running limits show without --absolute or --rate returns nothing and
the user is left to figure out what they need to provide to get the
correct data back.  This patch prints an error and help output by making
at least one of the arguments required.

Change-Id: I576cf8ec0e05524ee67d46c48b56da8d44258667
2015-08-14 10:31:53 -04:00
TerryHowe
6c46355734 Optimize log formatting
There is no way to change the configuration variables we want
printed in log messages, so format them in the constructor.
This will save us from overridding the format method and
a couple cpu cycles every log message.  This change also moves
the _LOG* variables into the formatter since they aren't really
globally needed.

Change-Id: I706e9db7da3daec20332f9d1533fe665f2739dea
Implements: blueprint logging-migration
2015-08-13 22:16:10 +00:00
TerryHowe
d828429d6a Extract log level from configuration file
Extract log_level from configuration file if the level was not
overridden by the command line option.  The default command line
option is 1 and there is no command line option to set the
verbose_level to 1, so if it is 1, it has not be set.

Change-Id: I1be04367c72f83c1181f92ca4c2c83165b66995c
Implements: blueprint logging-migration
2015-08-13 22:16:03 +00:00
TerryHowe
ca9965c328 Move options to log level out of shell.py
Move the conversion of command line options to log level out
of shell.py.

Change-Id: I86cb45a85cd63927aa1c87c1eed27542981df659
Implements: blueprint logging-migration
2015-08-13 16:11:25 -06:00
TerryHowe
9c3c336391 Move set warnings filters to logging module
This is the first step in moving logging out of shell.py

Change-Id: I3dcb4e17bb4687988ddf9b793ad1a308ef89b242
Implements: blueprint logging-migration
2015-08-13 16:05:01 -06:00
Jamie Lennox
0cc1e5aa2b Use correct domain to find project
When adding a role to a group and project OSC is mistakenly using the
group_domain to find the project which will fail if the group_domain !=
project_domain.

Change-Id: I4c1bec9b3b183c755be121b91f40e026d707192b
Closes-Bug: #1483520
2015-08-11 06:49:20 +00:00
Daisuke Fujita
e23dd6de58 Set up every time record log in file
This will allow users to record logs of all their commands into
a predefined log file, in clouds.yaml. The log should have a
format similar to that of oslo.log.

Change-Id: I1b334bf429d575fc25809c9706fc0b11116be3f1
Implements: blueprint every-time-record-log-in-file
2015-08-08 10:02:46 -06:00
Jenkins
ef33132c39 Merge "Inherited info/option when listing role assignment" 2015-08-08 09:09:26 +00:00
Jenkins
994e326c79 Merge "Fixes inherited role assignments CRUD calls" 2015-08-07 06:12:29 +00:00
Samuel de Medeiros Queiroz
94a8805a9a Inherited info/option when listing role assignment
Adds inherited information when listing role
assignments. In addition, it makes possible
to list only inherited ones by adding
--inherited option.

Change-Id: Idf889603d584716da95e2c7b4880142fbd8291c4
Closes-Bug: 1370546
2015-08-06 22:21:27 -07:00
Jenkins
35833c94ef Merge "Add set feature to volume type v2" 2015-08-07 05:00:18 +00:00
Jenkins
8affa0d1c3 Merge "Add list feature to volume v2" 2015-08-07 04:56:16 +00:00
heha
429ceef0c6 Add set feature to volume type v2
"volume type set" and "volume type unset" is not in the v2.

Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

implements bp: volume-v2

Change-Id: Ia804787d76d2029726c030b43c61eac3b411f66a
2015-08-06 19:35:01 -07:00
heha
dc6fe04895 Add list feature to volume v2
"volume list" is not in the v2.

Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

implements bp: volume-v2

Change-Id: I9f4585202f5f9ec5f4c091278fc6c4036efb1290
2015-08-06 17:02:46 -07:00
Samuel de Medeiros Queiroz
4097ec1d24 Fixes inherited role assignments CRUD calls
The paremeter to Keystone Client was passed as
'inherited', when it should be
'os_inherit_extension_inherited'.

Closes-Bug: #1482254

Change-Id: I1cb46add532223ef0b9620763b1047cc80e19ec0
2015-08-06 12:05:57 -03:00
Jenkins
d87403a7bf Merge "Fix quota set failed problem" 2015-08-06 07:34:08 +00:00
TerryHowe
fd61711585 Fix quota show when there is no project id
If no id is in the response, quota show fails.

Change-Id: I9905431b006404c9ba8453eba016cec9ebe19402
Closes-Bug: #1481803
2015-08-05 09:55:29 -06:00
lin-hua-cheng
701b59f651 Add domain scoping in 'role assignment list'
Add ability to set which domain the user, group or project
belong to.

Change-Id: Idf6c7f23ab96261a73682226fb10ce5f0133924e
Closes-Bug: #1472909
2015-07-31 18:56:34 -07:00
Jenkins
9c492b742d Merge "Add plugin interface version" 2015-07-29 15:46:34 +00:00
jiaxi
77214c56e7 Fix quota set failed problem
When using the command: openstack quota set, the compute quota below
can't be set successfully,the value of compute quota stay unchanged,
'fixed-ips', 'floating-ips', 'injected-files', 'key-pairs'.

What's more,I add a TODO comment in the code for two reason.
1. volume quota set works fine for the moment.
2. To indicate that this issue about volume needs
   discuss and report another bug, if it's confirmed.

This bug is only about compute quota.

Change-Id: Ic1028d561f5a0030cf65ac18fc117bf01e945478
Partial-Bug: #1420104
2015-07-28 23:21:28 -04:00
Jenkins
cc6c4e5c39 Merge "Add support for volume v2 commands" 2015-07-25 03:25:57 +00:00
Amey Bhide
96afb8b1b7 Add support for volume v2 commands
Adds the following commands:
openstack volume create
openstack volume set
openstack volume unset

Implements: blueprint volume-v2
Change-Id: Icb7404815763aa88550112fb42f5200ce05c2486
2015-07-24 13:16:38 -07:00
Jenkins
55d9eba093 Merge "Do not set default versions in parsed args" 2015-07-24 19:51:30 +00:00
Jenkins
46cc7d12ad Merge "Add configuration show command" 2015-07-24 03:32:51 +00:00
TerryHowe
43942871a9 Add configuration show command
Create a `configuration show` command that displays the current
configuration of the CLI.  Different configurations can be
displayed using options such as --os-cloud.  Passwords and
tokens are redacted by default unless the --unmask
option is specified.

Closes-Bug: #1476729

Change-Id: I0792365d0c5fa526cd09c0ed88c6bb1e2cb813a7
2015-07-23 13:00:59 -06:00