852 Commits

Author SHA1 Message Date
Jenkins
38759f3edd Merge "Add "server group show" command" 2016-04-20 20:43:07 +00:00
Jenkins
e78113a5fc Merge "Fix mutable default arguments in tests" 2016-04-20 20:22:55 +00:00
Rui Chen
a0d79968ca Add "server group show" command
Support compute v2 "server group show" command in OSC.

Implements: blueprint nova-server-group-support
Closes-Bug: #1542171

Change-Id: I1a6d103151c704bda5b67cb9a49cc43c7d9f1d6a
2016-04-20 03:26:13 +00:00
Rui Chen
4e22728013 Add "server group list" command
Support compute v2 "server group list" command in OSC.

Implements: blueprint nova-server-group-support
Partial-Bug: #1542171

Change-Id: I68b80e3c4458692472af671028cd1f939736bcb8
2016-04-20 03:25:57 +00:00
Rui Chen
7458c612ed Add "server group delete" command
Support compute v2 "server group delete" command in OSC.

Implements: blueprint nova-server-group-support
Partial-Bug: #1542171
Related-Bug: #1563301

Change-Id: I7d792d669b147b24dc774844cfc9dbacd60d017b
2016-04-20 03:25:38 +00:00
Rui Chen
a06bb28bcc Add "server group create" command
Support compute v2 "server group create" command in OSC.

Implements: blueprint nova-server-group-support
Partial-Bug: #1542171

Change-Id: I96ffb07764d3adb715e048943cfee3b879c280f6
2016-04-20 03:24:58 +00:00
Tang Chen
09c20b2b5c Fix mutable default arguments in tests
Python’s default arguments are evaluated only once
when the function is defined, not each time the
function is called. This means that if you use a
mutable default argument (like list and dict) and
mutate it, you will and have mutated that object
for all future calls to the function as well.

More details about this wrong usage here:
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

In unit tests, most FakeXXX classes' methods take
mutable arguments with default values [] or {}.
We should change them to None.

Change-Id: Iea833b66aa1379829511ad5c6d4432b72f3488e2
Closed-bug: #1550320
2016-04-20 11:15:17 +08:00
Jenkins
4639148b1d Merge "Rename --profile to --os-profile" 2016-04-19 23:37:52 +00:00
Jenkins
7f20efc57c Merge "Add provider network options to osc network set" 2016-04-19 16:19:30 +00:00
Dean Troyer
530fe42589 Rename --profile to --os-profile
* The --profile global option is deprecated but will be supported
  through at least April 2017.
* Update man page

Closes-bug: #1571812
Change-Id: I2e623411a56096b4cc352f4eedbf770632ae2cc3
2016-04-19 07:50:42 -05:00
Jenkins
4d05851d4e Merge "Add options to security group rule list" 2016-04-19 09:03:19 +00:00
reedip
aa1495e241 Add provider network options to osc network set
The following patch adds the provider network options
to OSC "network set".

Change-Id: I23b617077eda25d16164172a8e280082750eaf18
Partial-Bug: #1545537
2016-04-19 11:18:13 +09:00
Richard Theis
94c9cd5c66 Add options to security group rule list
Add the following options to the 'os security group rule list'
command:
  --long: Display direction and ethertype for Network v2
  --all-projects: Display information from all projects for Compute v2

Change-Id: If8a1cbd7669cdfa6577d6d2f6fffd9e999a39a82
Partial-Bug: #1519512
Implements: blueprint neutron-client
2016-04-18 14:03:22 -05:00
Jenkins
3f2ed7d19f Merge "Remove methods argument from vloume/v2/fakes.py" 2016-04-18 17:55:08 +00:00
Jenkins
e3a6fc27b0 Merge "Propagate AttributeErrors when lazily loading plugins" 2016-04-18 17:01:42 +00:00
Tang Chen
cc3a062529 Remove methods argument from vloume/v2/fakes.py
methods argument in FakeAvailabilityZone class
is not necessary. Remove it.

Change-Id: Idf136bf90bd94e7045b0d471b8e03cd843693251
2016-04-18 15:20:17 +08:00
Jenkins
8eade18624 Merge "Remove methods argument from FakeHypervisorStats" 2016-04-16 23:58:36 +00:00
Sheel Rana
92950b6f5f Add support for removing volume-type-access
OSC does not support to remove volume type access to project.
This feature will provide support to remove volume type access
from project.

Closes-Bug:#1554890

Implements: bp cinder-command-support

Change-Id: I029a4292da05f028e8937962cb845ec6e00b0279
2016-04-16 23:01:19 +05:30
Jenkins
e80048de09 Merge "Fix wrong attribute name and add functional test for --snapshot" 2016-04-15 21:01:10 +00:00
Jenkins
f66f989d83 Merge "Append existing information during port set" 2016-04-15 16:30:48 +00:00
Jenkins
881c836030 Merge "Add external network options to osc network set" 2016-04-15 16:26:44 +00:00
Jirayut Nimsaeng
e128370676 Fix wrong attribute name and add functional test for --snapshot
Change-Id: I91f2091ef06a55bcf5373d1beeea2dd81e9f1334
Closes-Bug: #1567895
2016-04-15 16:13:02 +00:00
Tang Chen
df3ee61be3 Remove methods argument from FakeHypervisorStats
methods argument is not necessary in FakeHypervisorStats class.
Remove it.

Change-Id: I288f71b412beb3e583e957a9fd99210bc6f3f543
2016-04-15 16:10:09 +08:00
Tim Burke
926330d372 Propagate AttributeErrors when lazily loading plugins
Previously, if an AttributeError was raised in a plugin's make_client
method, the plugin simply wouldn't be an attribute of the ClientManager,
producing tracebacks like

Traceback (most recent call last):
  File ".../openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)

  ...

  File ".../openstackclient/object/v1/container.py", line 150, in take_action
    data = self.app.client_manager.object_store.container_list(
  File ".../openstackclient/common/clientmanager.py", line 66, in __getattr__
    raise AttributeError(name)
AttributeError: object_store

This made writing minimal third-party auth plugins difficult, as it
obliterated the original AttributeError.

Now, AttributeErrors that are raised during plugin initialization will
be re-raised as PluginAttributeErrors, and the original traceback will
be preserved. This gives much more useful information to plugin
developers, as in

Traceback (most recent call last):
  File ".../openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)

  ...

  File ".../openstackclient/object/v1/container.py", line 150, in take_action
    data = self.app.client_manager.object_store.container_list(
  File ".../openstackclient/common/clientmanager.py", line 57, in __get__
    err_val, err_tb)
  File ".../openstackclient/common/clientmanager.py", line 51, in __get__
    self._handle = self.factory(instance)
  File ".../openstackclient/object/client.py", line 35, in make_client
    interface=instance._interface,
  File ".../openstackclient/common/clientmanager.py", line 258,
  in get_endpoint_for_service_type
    endpoint = self.auth_ref.service_catalog.url_for(
PluginAttributeError: 'NoneType' object has no attribute 'url_for'

Change-Id: I0eee7eba6eccc6d471a699a381185c4e76da10bd
2016-04-14 21:12:35 -07:00
reedip
67f8b898eb Add external network options to osc network set
The following patch adds the options "--external" & "--internal"
and the suboptions to "external": "--default" & "--no-default",
to "osc network set" CLI to provide the user an option to set
a network as an external network or remove the setting.

Change-Id: I3a7f2cb249bc8101cbb01322d7732e913237d6cd
Partial-Bug: #1545537
2016-04-15 00:28:09 +00:00
Jenkins
52a12e743e Merge "Add project options to security group rule create" 2016-04-14 21:45:03 +00:00
Jenkins
ef68f23de3 Merge "Add network options to security group rule create" 2016-04-14 19:55:54 +00:00
Jenkins
83fbce496a Merge "Remove fake methods code from compute network" 2016-04-14 16:47:00 +00:00
reedip
c92ac9d911 Append existing information during port set
Existing --fixed-ip and --binding-profile information is
currently overwritten when a user executes 'port set', but
actually that data should be appended.
This patch fixes the issue.

Closes-Bug: #1564453
Change-Id: I62500c10ccbbc68167f24e9d4fa49e85345d82c4
2016-04-14 00:48:09 +00:00
Jenkins
883f8208d3 Merge "Append existing information during subnet set" 2016-04-13 15:51:44 +00:00
Jenkins
1819edf733 Merge "Add --address-scope option "subnet pool create/set"" 2016-04-13 02:06:59 +00:00
Jenkins
85c47b76fb Merge "Add support for setting volume-type-access" 2016-04-12 22:27:07 +00:00
Richard Theis
3a4d53a93b Fix prefixes output for subnet pool list
Fixed "os subnet pool list" command to properly disply the
list of subnet pool prefixes in the "Prefixes" column. This
fix is consistent with the "os subnet pool create" and
"os subnet pool show" command output.

Change-Id: I431d85c3b7f5bf8a327500decf3a15063fc5b120
Closes-Bug: #1569480
2016-04-12 12:42:13 -05:00
Tang Chen
a281ef89a5 Remove fake methods code from compute network
Network objects don't have any method needs to fake.

keys() method is only used by _get_columns() helper
to obtain all attributes of an object. But in compute
network implementation, attributes are obtained from
obj._info directly, which is a dictionary itself. So
there is no need to fake this method.

Change-Id: Ie6a46ef6a3042641e55a7002573ef501db7b60e1
2016-04-12 13:41:52 +08:00
Richard Theis
a5a9caea2b Add project options to security group rule create
Add the --project and --project-domain options to the
'os security group rule create' command. These options
are for Network v2 only.

Change-Id: Ie3e136be076f0f2c22fbe7048d1d6eaebf5aa655
Partial-Bug: #1519512
Implements: blueprint neutron-client
2016-04-11 10:05:24 -05:00
Richard Theis
3a3f33b926 Add network options to security group rule create
Add the following network options to the "os security group rule"
command:
  (1) --ingress and --egress
  (2) --ethertype
These options enable egress and IPv6 security group rules for
Network v2.

Change-Id: Ie30b5e95f94e0c087b0ce81e518de72d2dda25ad
Partial-Bug: #1519512
Implements: blueprint neutron-client
2016-04-11 09:49:21 -05:00
Sheel Rana
be2d2a1b8d Add support for setting volume-type-access
OSC does not support to set volume type access to project.
This patch will provide support for adding volume type access
to existing project.

Closes-Bug:#1554889

Implements: bp cinder-command-support

Change-Id: Ie36e202bdde7de36eb263a476eb66699d82f7565
2016-04-11 12:53:15 +00:00
Tang Chen
827be8fb8c Move keys() methods in each resource class to FakeResource
FakeXXX classes in network don't need to fake any method,
except keys(). But keys() can be put in FakeResource since
it just returns all attributes in _info.

This patch moves removes all unnecessary fake methods code,
moves keys() method to FakeResource.

This patch also finds out some missing attributes in
network and router tests.

Change-Id: I799822c8715b9ac4f95b98f8350f196757d79d3e
2016-04-11 18:07:50 +08:00
Jenkins
cb8f757779 Merge "Refactor security group rule list to use SDK" 2016-04-11 03:01:13 +00:00
Tang Chen
b3649a54cd Add --address-scope option "subnet pool create/set"
This patch adds --address-scope option to "subnet pool create/set"
commands, and --no-address-scope option to "subnet pool set"
command to clear the address scope setting.

Change-Id: Ie2c370a50b52574fa6ec268083ad013b7544361e
Partial-Bug: #1544586
Partial-Bug: #1544591
2016-04-09 16:25:50 +08:00
Jenkins
6c73946623 Merge "Add Subnet add/remove support to router" 2016-04-09 04:52:09 +00:00
Jenkins
b70afef9d5 Merge "Add "router remove port" to osc" 2016-04-09 04:43:35 +00:00
Jenkins
5d2f4107b4 Merge "Add "router add port" to osc" 2016-04-08 18:24:46 +00:00
reedip
03d932ea0b Append existing information during subnet set
Existing values of --dns-nameserver, --allocation-pool and --houst-routes
is currently overwritten when a user executes 'port set', but
actually that data should be appended.
This patch fixes the issue.

Closes-Bug: #1564447
Change-Id: I3dba9afa68d869abb3960b55a6880401a10eebf7
2016-04-08 06:19:09 +00:00
Jenkins
9f2e7039e1 Merge "TrivialFix: Rename provider segment option" 2016-04-08 04:23:22 +00:00
reedip
a8c085fdd5 TrivialFix: Rename provider segment option
As per [1], provider-segmentation-id is changed to provider-segment
as segments may soon have a "name" support as well.

[1]: https://review.openstack.org/#/c/294422/12/doc/source/command-objects/network.rst

Change-Id: I74d4366301b41fa181faccbc12cff9530df60353
2016-04-08 01:46:06 +00:00
Jenkins
418793edbe Merge "Make snapshot and backup name optional" 2016-04-07 16:20:49 +00:00
reedip
73d15e3768 Add option to clear information from ports
This patch adds the option of "no-fixed-ip" and
"no-binding-profile" which is used to clear the
fixed-ip and binding:profile information from the
ports.

Change-Id: I946301eaf6c647bae55e4f416aa0d98e5f06e699
2016-04-07 10:59:15 +09:00
Jenkins
0edab95fd1 Merge "Support client certificate/key" 2016-04-06 21:42:56 +00:00
Ivan Kolodyazhny
311e775c81 Make snapshot and backup name optional
Cinder does not require snapshot and backup name. These arguments are
optional.

Change-Id: I05d59efc9642205a25684bf0b77758328296d959
2016-04-06 23:25:38 +03:00