649 Commits

Author SHA1 Message Date
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
Reedip
04ef8a41ac Allow PD as Subnetpool during Subnet creations
This commit now allows user to specify 'prefix_delegation'
as a Subnetpool during Subnet creation by using the new
--use-prefix-delegation option so that the IPv6
prefixes can be delegated to routers set up by the
cloud admins.

Change-Id: I67e5d81c4155db2e3c5c41ee1df77f2d77a17689
Closes-Bug: #1513894
2017-08-17 02:44:44 +00:00
zhanghongtao
470a1f1acf Add optional parameter "user_id" and "type" to list credentials
In keystone version 3.5, "type" optional attribute has been added
to list credentials. This patch add "user_id" and "type" optional
parameter in openstack client.

Change-Id: Ia09ee7c39204fdff2dfd7b9b606d888d007caac5
2017-07-25 09:56:50 -05:00
Akihiro Motoki
57e5840710 Network tag support
Neutron tag mechanism now supports network, subnet, port,
subnetpool and router. Tag support for more resources is planned.

This commit introduces a common mixin class to implement
tag operation and individual resource consumes it.

To support tag remove, network unset command is added.

Implements blueprint neutron-client-tag
Change-Id: Iad59d052f46896d27d73c22d6d4bb3df889f2352
2017-07-23 21:54:32 +00:00
Dean Troyer
1f2295cf65 Release note cleanup for 3.12.0
Change-Id: I1fab42256e7b01d2efc23af686554e0325a48af6
2017-07-23 16:51:47 +00:00
Kristi Nikolla
77ff011ced Add domain parameter to Identity Provider
Identity providers are now associated with domains. This change
allows a user to specify a domain by ID or by name when creating
an identity provider. [0]

This also adds the column for Domain ID in listing.
Updating a domain for an identity provider is not supported, so
that isn't changed.

[0]. Id18b8b2fe853b97631bc990df8188ed64a6e1275

Closes-Bug: 1698390

Change-Id: Icc408e2fe88f257d5863bd3df716a777d52befcc
2017-07-21 11:28:57 -04:00
Jenkins
e954fe4eed Merge "Add support for virtio-forwarder VNIC type" 2017-07-20 17:15:53 +00:00
Jenkins
ac8cac4b63 Merge "Network L3 Router Commands for OSC" 2017-07-20 16:35:14 +00:00
Jenkins
39673217dc Merge "Fix 'domain' filter not work well in some commands" 2017-07-20 06:16:09 +00:00
Jenkins
b9daff23b9 Merge "Fix column names for server list --no-name-lookup" 2017-07-20 05:17:53 +00:00
Jan Gutter
cf5dfa77e1 Add support for virtio-forwarder VNIC type
* This patch adds support for the virtio-forwarder VNIC type.
  * The virtio-forwarder VNIC type has been added as another option for
    setting the --vnic-type property on the "port set" and
    "port create" commands. This requests a low-latency virtio port inside
    the instance, likely backed by hardware acceleration. Currently the
    Agilio OVS external plugin provides support for this, with support from
    other vendors following soon.
  * Corresponding neutron-lib change:
    https://review.openstack.org/#/c/483530/
  * Nova spec for Agilio OVS enablement:
    https://specs.openstack.org/openstack/nova-specs/specs/pike/approved/netronome-smartnic-enablement.html

Change-Id: Idbc8071afe95f8594b40e2f93e5411e7185f946f
Signed-off-by: Jan Gutter <jan.gutter@netronome.com>
2017-07-19 14:41:04 +02:00
jiangpch
a01bf55d20 Fix 'domain' filter not work well in some commands
The 'domain' filter not work well in commands 'project show',
'user show' and 'user set'.

Depends-On: I490900d6249f01654d4cba43bddd3e7af7928a84
Closes-Bug: #1704097
Change-Id: Ib4f47cbaba27eb56c4a41d187fee74a995e62dc7
2017-07-18 23:01:22 +00:00
Dean Troyer
2689984ba7 Fix column names for server list --no-name-lookup
When --long is not present change the 'Image Name' column to
'Image' and add the 'Flavor' column.  These columns will contain
Names unless --no-name-lookup is specified when they will contain IDs.

Change-Id: I92cfb22136aee32616894e60e9227b4da185da99
2017-07-17 16:51:10 -05:00
Jenkins
894df67c67 Merge "Add 'data_plane_status' option to Port classes" 2017-07-13 02:44:35 +00:00
nidhimittalhada
bca8d57eb3 image-list should support filters 'name','status'
nova api support parameters like 'name', 'server', 'status',
etc in image-list(). So openstackclient should support this too.

DocImpact
Closes-Bug: #1698742
Change-Id: Ice66b409f989e6785aa3b2d42f2fdbf6e23fa0aa
2017-07-12 22:50:17 +00:00
Carlos Goncalves
1ae904a491 Add 'data_plane_status' option to Port classes
Adds 'data_plane_status' option to SetPort and UnsetPort classes.

Closes-Bug: #1684989
Change-Id: I26e23b551afb8c37e6babdea1655efb7c5c6873b
2017-07-12 22:50:09 +00:00