664 Commits

Author SHA1 Message Date
Harald Jensas
e8c731547d Allow setting network-segment on subnet update
To enable the possibility to migrate a non-routed network to a
routed network allow updating the segment_id of a subnet.

Change-Id: I3ebae2ff28d5d4e5373ebd1f52194f8c52071b88
Partial-Bug: bug/1692490
Depends-On: I1aee29dfb59e9769ec0f1cb1f5d2933bc5dc0dc5
2018-06-06 11:56:39 +02:00
Zuul
b59de7b849 Merge "Network: Add tag support for floating ip" 2018-04-23 08:12:25 +00:00
Dongcan Ye
09a0916dae Network: Add tag support for floating ip
Change-Id: I7a500a4ff6cec2442b4050df26c0b017d9f71903
Closes-Bug: #1750985
2018-04-17 15:52:52 +00:00
Zuul
972a345014 Merge "Add support to list image members" 2018-04-02 19:05:15 +00:00
Chen Hanxiao
447d5d9e34 Add --image-property parameter in 'server create'
add --image-property option, just like --image-with of novaclient did.

Change-Id: Ic1a8976559255529a8785b1b301a0307812433cb
Signed-off-by: Chen Hanxiao <chenhx@certusnet.com.cn>
2018-03-28 16:03:45 +08:00
Mohammed Naser
79577681d8 Add support to list image members
The OpenStack client presently has support to add or remove members
from an image, but no way to list image members.  This patch addreses
this issue.

Change-Id: Ie85c5de23c6beb21fd6b4c04c83ddf2a116606ef
2018-03-21 08:56:08 -04:00
Emilien Macchi
18563b4132 neutron: add --mtu for create/set network
Support Neutron network mtu configuration with a new argument, --mtu
that allows CLI users to set MTU for Neutron networks.

Change-Id: I93d23581c7e8c84eaf9bb3b293360036f60f456b
2018-03-15 13:50:59 +00:00
Zuul
e78c9bc00d Merge "Add CRUD support for application credentials" 2018-03-14 02:16:35 +00:00
Zuul
c24451e19c Merge "Add support for endpoint group commands" 2018-02-25 01:05:18 +00:00
Zuul
d6761f0936 Merge "Add project tags functionality" 2018-02-25 01:05:16 +00:00
Zuul
1b5cab40b5 Merge "Add support for "--dns-domain" argument" 2018-02-24 10:59:41 +00:00
Jose Castro Leon
1eae301c4f Add support for endpoint group commands
Implements the commands for endpoint group filter management.
Includes the CRUD management of the endpoint groups and the
association management between them and the projects that are
using this method.

Implements: blueprint keystone-endpoint-filter
Change-Id: I4265f7f8598d028191e90d76781b7b6ece6fef64
2018-02-23 20:36:04 +00:00
Tytus Kurek
4a9e84be99 Add support for "--dns-domain" argument
This patchset implements support for "--dns-domain" argument to the
following commands: "openstack port create" / "openstack port set".

Change-Id: I4bb001054b00a969b74db3bb310e567033bf589b
Depends-On: https://review.openstack.org/#/c/500660/
Closes-Bug: #1714878
Partial-Bug: #1704769
2018-02-23 20:30:37 +00:00
Gage Hugo
d32664150f Add project tags functionality
This change adds tags functionality for projects in keystone. A user
can add a single tag with "--tag", chain "--tag" to add multiple
tags, or clear tags with "--no-tag".

Change-Id: I31cfef3e76dcefe299dacb00c11bb1a10a252628
Partially-Implements: bp project-tags
2018-02-23 20:26:57 +00:00
Colleen Murphy
375964f270 Add CRUD support for application credentials
Add support for creating, retrieving, and deleting application
credentials. Application credentials do not support updates.

In order to provide a positive user experience for the `--role` option,
this patch also includes an improvement to the
`identity.common._get_token_resource()` function that allows it to
introspect the roles list within a token. This way there is no need to
make a request to keystone to retrieve a role object, which would fail
most of the time anyway due to keystone's default policy prohibiting
unprivileged users from retrieving roles.

bp application-credentials

Change-Id: I29e03b72acd931305cbdac5a9ff666854d05c6d7
2018-01-30 21:50:01 +01:00
Zuul
fba356b3e5 Merge "Check that Glance returns image data before processing it" 2018-01-22 17:56:29 +00:00
Zuul
8abf6bf5ba Merge "Add floating IP qos_policy actions" 2018-01-11 21:03:18 +00:00
LIU Yulong
cf91d7a2f4 Add floating IP qos_policy actions
Now we can associate a qos policy to the floating IP, and
dissociate it. The commands are:

  $ openstack floating ip create --qos-policy ...
  $ openstack floating ip set --qos-policy ...
  $ openstack floating ip set --no-qos-policy ...
  $ openstack floating ip unset --qos-policy

These commands are based on the neutron change:
I4efe9e49d268dffeb3df4de4ea1780152218633b

Partially-Implements blueprint: floating-ip-rate-limit

Change-Id: I932b32f78cc5a2b53926feaec1a0b392cf7e8b57
2018-01-11 18:10:11 +00:00
Mike Fedosin
ed1b59848f Check that Glance returns image data before processing it
Now if Glance v2 cannot find image data it returns an empty
response with 204 status code, instead of raising an error.

Glance client handles this situation and wraps the response
with a RequestIdProxy object, whose 'wrapped' attribute is
None.

But when openstack client tries to parse this object using
glanceclient's save_image util function, it fails with
"NoneType object is not iterable" message, for the
object doesn't contain any data.

This patch adds additional check to prevent such behaviour
and raises SystemExit exception if no data was returned from
the server.

Glance v1 is not affected, because it raises an error if can't
find an image data.

Change-Id: I016a60462ba586f9fa7585c2cfafffd7be38de7b
Closes-Bug: #1741223
2018-01-05 19:36:49 +01:00
Hongbin Lu
5fdd0730c8 Allow ports filtering with device_id
Right now, if a neutron port is owned by a container powered by
Kuryr, there is no way to list and filter those ports because
OSC assumed a neutron port is owned by either a server or router.
This patch adds support for that by introducing an option '--device-id'
to the 'port list' command.

Change-Id: Ib1fd27e8d843a99fb02ccabd8a12a24ac27cec9c
2018-01-03 21:11:02 +00:00
Zuul
8c5f755569 Merge "Send 'changes-since' instead of 'changes_since' query parameter" 2017-12-13 02:57:49 +00:00
Zuul
21b656ca4a Merge "Add support for endpoing filter commands" 2017-12-13 02:18:43 +00:00
Daniel Speichert
116526275d Send 'changes-since' instead of 'changes_since' query parameter
Per API reference, only 'changes-since' is accepted and the variant
with underscore is ignored, making the CLI functionality broken.

[dtroyer] added release note and fixed unit tests.

Change-Id: I0c596531a8af03da17d5ce39d75b12e941403aa5
Closes-Bug: 1732216
2017-12-11 18:07:45 -06:00
Zuul
58e5abf294 Merge "Fix credentials in create, update and list." 2017-12-11 22:45:54 +00:00
Carlos Konstanski
dab49df461 openstack subnet create fails when tags is None
In network/v2/_tag.py lines 105 and 110: obj.tags can be None, in
which case set(obj.tags) throws a NoneType exception.

Change-Id: I1e965ec947844cbf84676fab27a2261fc0c0ea49
Closes-Bug: #1735836
2017-12-01 15:17:03 -07:00
Dean Troyer
3a672eae7b Release note cleanup
Change-Id: Iea05a9b696a225b41bb5bf0c52498969e32acf66
2017-11-29 16:38:44 -06:00
Jose Castro Leon
12ee186108 Add support for endpoing filter commands
Implements the commands that allow to link and endpoint to
a project for endpoint filter management.

Implements: blueprint keystone-endpoint-filter

Change-Id: Iecf61495664fb8413d35ef69f07ea929d190d002
2017-11-21 07:58:48 +01:00
yangweiwei
0f749cacc2 Fix credentials in create, update and list.
Now, keystone has supported serverl auth method, like 'totp'.
Before we use this method, we should create the credential first.
And we need create it with type 'totp'. But now we cannot create
credential with this method.

Also, I think the type should not have constrains. We can create
any type in keystone project. So, we should do these actions too.
The type would be more which We cannot control.

Change-Id: Ie0482da3133fb515e4bb8e45f8c54f509589cc5e
Closes-bug: #1731848
2017-11-17 11:39:15 +08:00
Zuul
c161a76a5f Merge "Network: Add interfaces info in router show" 2017-11-16 01:45:55 +00:00
ycx
e7ef9e8556 Network: Add interfaces info in router show
Add a list of interfaces info in the output of
'openstack router show'.
The information of router interface are:
IP address, subnet ID and port ID.

Co-Authored-By: Dongcan Ye <hellochosen@gmail.com>

Change-Id: I1252986122122defffe795292b83dc4e84481c7e
Closes-Bug: #1675489
2017-11-15 22:28:46 +00:00
Hongbin Lu
809355894f Add RemoveNetwork command to server
This command will detach a server from a network. All server's
neutron ports that belongs to the specified networks will be removed.

Change-Id: I83a064ed62ab00c6f1016900b9cf30f1c15b8382
2017-11-14 00:13:08 +00:00
Zuul
c2ebe678f9 Merge "Network: Add supports rbac target-all-projects" 2017-11-07 00:20:07 +00:00
Zuul
e8a87e1478 Merge "Display Network QoS rule type details" 2017-11-06 04:04:54 +00:00
Sławek Kapłoński
07f0c7aa55 Display Network QoS rule type details
Neutron API now supports getting details of supported
QoS rule type.
This patch adds support for this feature to OpenStack client.

Change-Id: I74d16563ce2236a7c899f5994f1dab43ace02138
Depends-On: I448b5d4f8e4ef42eafe50d9d6c63d0be666f98fc
Related-Bug: #1686035
2017-11-05 17:52:08 -06:00
Dongcan Ye
9ca99b9919 Network: Add supports rbac target-all-projects
Add a boolean option "target-all-projects",
which allows creating rbac policy for all projects.

Change-Id: Ie3af83a1bba7dd66e83b0595bb276bf8fd105831
Closes-Bug: #1728525
Closes-Bug: #1704834
2017-11-05 01:16:48 -05:00
Zuul
a51ac0a889 Merge "Added AddNetwork command to server" 2017-10-30 04:21:41 +00:00
Zuul
d215982ce0 Merge "Add missing parameters on openstack server rescue" 2017-10-27 18:29:07 +00:00
Jose Castro Leon
fd23ebfbf3 Add missing parameters on openstack server rescue
Change-Id: I27afca9e826378dbcb7feb7528e0c65c528b04b0
Closes-Bug: #1703278
2017-10-27 14:52:04 +00:00
Hongbin Lu
e3ad82164d Added AddNetwork command to server
Currently, if users want to add another NIC to a running instance,
they need to (i) create a neutron port and (ii) add the port to the
server via teh AddPort command. It would be more convenient to have
a single command to achieve the equivalent.

Novaclient already support adding network to an instance via the
interface-attach command. This patch introduces a similar capability
in OSC.

Change-Id: Ia3e39c57ae7ecb96aae1b66adc52c289daccb6ec
2017-10-26 15:34:04 +00:00
Zuul
e83a0941a3 Merge "Allow creating security rules without protocol" 2017-10-21 17:20:10 +00:00
Zuul
3abba6ede9 Merge "Accept 0 for --min-disk and --min-ram" 2017-10-21 00:40:48 +00:00
ShogoAdachi
4464109c77 Accept 0 for --min-disk and --min-ram
The current openstackclient implementation cannot accept 0
for --min-disk and --min-ram with the "openstack image set" command.
If theses options get set to 0, the option parser in openstackclient
wrongly interprets 0 as no option value. The 0 is valid for these
options if administrators want to make it the default(no minimum
requirements).

This patch fix the parser so that it avoids only 'None'.

Change-Id: Ie8ee37484c02c26f54adc56263fcd167c0ce7eb3
Closes-bug: #1719499
2017-10-20 19:48:37 +00:00
Daniel Speichert
82f45d9bd2 Allow creating security rules without protocol
In order to create a rule for any protocol, the client
must not specify the protocol in the API call. This
is currently impossible because protocol defaults to TCP.

In order not to change the default behavior, a "new" protocol
name is added: "any", which makes this CLI skip sending the
protocol field altogether.

Change-Id: I58853d3745f3631007e5e9780c0c5c2526b730a3
Closes-Bug: 1712242
2017-10-17 13:36:40 -04:00
Jenkins
33403348a2 Merge "Optimize getting endpoint list" 2017-10-13 18:25:45 +00:00
Hongbin Lu
de23ab8d75 Support creating unaddress neutron port
Introduce an option '--no-fixed-ip' on port create command.
If this option is specified and '--fixed-ip' is unspecified,
OSC will send a request to neutron with 'fixed_ips' as an empty
list, which will create an unaddress neutron port.

Note: The use cases of unaddress port was outlined in:
https://specs.openstack.org/openstack/neutron-specs/specs/liberty/unaddressed-port.html

(dtroyer: add Depends-On for Zuul v3 test)

Depends-On: I39e8e49243ab0bda631600715c971c55a34e2fd9
Change-Id: Ibe38598acbbcd0d353c952fc2a6fa67780762151
Closes-Bug: #1717829
2017-09-29 18:49:22 +00:00
Jenkins
a452c9d825 Merge "Support icmp-type and icmp-code to be set as zero" 2017-09-27 05:49:50 +00:00
Anton Frolov
f6f5ce03c5 Optimize getting endpoint list
Currently ListEndpoint.take_action method unconditionally iterates
over all endpoints and issue GET /v3/services/<ep.service_id>
request for each endpoint. In case of HTTPS keystone endpoint this
can take significant amout of time, and it only getting worse in
case of multiple regions.

This commit change this logic to making just two GET requests: first
it gets endpoint list, then it gets service list, searching service
in the list instead of issuing GET /v3/services/<id> request.

Change-Id: I22b61c0b45b0205a2f5a4608c2473cb7814fe3cf
Closes-Bug: 1719413
2017-09-26 14:31:07 -07:00
gvrangan
221b7052ab Support icmp-type and icmp-code to be set as zero
When icmp-type or icmp-code are set to 0, the current implementation
ignores the value, this fix will allow the value to be copied and
displayed

Change-Id: I96133a57883d22e98fcbb9fe0328d9e050472469
Signed-off-by: gvrangan <venkatrangang@hcl.com>
2017-09-26 21:00:14 +00:00
lihaijing
254dbf3294 Fix 'project purge' deletes ALL images problem
Closes-Bug: #1717130
Change-Id: I33c6fc7897dfee85d1c197a1267bde4abfa5bbd9
2017-09-26 20:49:32 +00:00
Harry Rybacki
8cd3e258c5 Implied Roles
Allow the user to create an inference rule between
two roles. The first, called the prior role
is the role explicitly assigned to an individual.
The second, called the implied role, is one that
the user gets implicitly. For example:

Role B implies Role A.
User X is assigned Role B.
Therefore User X also assigned Role A.

The management and maintenance of the rules is
performed in the Keystone server.

Change-Id: If547c2f16e812bc7fffd742ec37e6a26011f3185
2017-08-22 17:08:30 +00:00