671 Commits

Author SHA1 Message Date
Zuul
cd27f0dd48 Merge "Improve help text for network create --external" 2022-09-30 12:23:17 +00:00
Zuul
38dda16639 Merge "network: Add tenant project filter for RBAC list" 2022-09-30 12:10:29 +00:00
Zuul
c7bb7f806c Merge "Fix missing closing brackets in metavar" 2022-09-30 12:01:22 +00:00
Bence Romsics
390f8135bd Improve help text for network create --external
Change-Id: Ie802fbb8a35e53dcb79b5581f64caa2db1609480
Closes-Bug: #1990285
2022-09-26 12:40:08 +02:00
Jan Hartkopf
4d7d7e627e network: Add tenant project filter for RBAC list
Implements a new parser argument "--target-project" to
list RBAC policies for a specific tenant project only.
This uses the already existing server-side query
parameter "target_tenant".

Story: 2009937
Task: 44824
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/834442
Change-Id: I83ff07041a022e8795e3c5550c6a7aabb0c0d8c8
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
2022-09-06 14:13:10 +02:00
Yang JianFeng
b36cd0f4c0 Add router ndp proxy commands
Depends-on: https://review.opendev.org/749036
Change-Id: I77e12cc2dfe4000bd5ae6511878c6591f52d9791
Related-Bug: #1877301
2022-08-26 08:15:43 +08:00
Takashi Kajinami
2093a5b681 Fix missing closing brackets in metavar
... to display the complete format in --help output.

Change-Id: I4d0f044072b206f6205b4b4f4992fd08f01729d6
2022-08-26 01:07:04 +09:00
Przemyslaw Szczerbik
6ccbcdde64 Add support for CRUD operations for QoS minimum packet rate rule
Closes-Bug: #1922237
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/810364
See-Also: https://review.opendev.org/785236
Change-Id: Ie7e1eb0575fd37121d5097ecbc318d0769ab3db0
2022-07-01 13:55:41 +00:00
Dr. Jens Harbott
604ceeedf9 Don't show tenant_id in network objects
Patch [0] dropped mapping the tenant_id attribute to project_id.
However, the Neutron API still returns the tenant_id attribute in
addition to the project_id and so we still need to discard it from
the output.

[0] I5f62f2a76592eaaaed6703624e959df41a6ecc8f

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Iba1e003bf587802f28928cb44d160b3b3fb1f840
2022-06-27 10:50:03 +02:00
Nurmatov Mamatisa
ccd84f8f2b Refactor network fakes to sdk properties PART 4
Included resources:
port
network_agent
network_flavor_profile
network_rbac

Change-Id: I2e71a3c0fefb56ddcc75865c95746550e2710aa3
2022-04-29 16:40:23 +03:00
Nurmatov Mamatisa
6fe0ae497c Refactor network fakes to sdk properties PART 2
Included resources:
ip_availibility
network

Change-Id: I141bcb43272594da75e776a84a74158fc866ac94
2022-03-15 11:48:33 +03:00
Nurmatov Mamatisa
23ad68264b Refactor network fakes to sdk properties PART 1
Included resources:
address_group
address_scope
auto_allocated_topology
availability_zone

Change-Id: I943f988588efbe68dd3ab17a18441b25ac8c8d4d
2022-03-15 11:28:44 +03:00
Zuul
91a963873f Merge "Fix metavars and typos in local_ip" 2022-03-09 13:44:26 +00:00
Nurmatov Mamatisa
3e61824d4a Fix metavars and typos in local_ip
Change-Id: I2094f343e3353da25f9c5057ea5444345e271665
2022-03-02 12:52:14 +00:00
Zuul
63452f362d Merge "Add support for setting extra DHCP options on existing ports" 2022-02-25 13:26:11 +00:00
Zuul
bf71727c55 Merge "Add support for 'remote-managed' vnic type" 2022-02-23 07:55:28 +00:00
Slawek Kaplonski
47fa9ba356 Add support for setting extra DHCP options on existing ports
It is now possible to set extra DHCP option for an existing port using
"port set" command. It works in the same way like during port creation.

Story: 2009095
Task: 42927
Change-Id: I3577d4e3a303137b708ae8687c44b486aa82e296
2022-02-21 22:52:38 +01:00
Frode Nordahl
d565f11093
Add support for 'remote-managed' vnic type
The 'remote-managed' vnic type will be used to support off-path
SmartNIC port binding with OVN, and it is expected that the user
will create ports with this vnic type as part of the workflow.

As such the client must allow users to interact with this
vnic type and this patch addresses that.

Partial-Bug: #1932154
Depends-On: I496db96ea40da3bee5b81bcee1edc79e1f46b541
Change-Id: I566c3da594d757dd62edcf7f9ea3077db8d6b11a
2022-02-08 07:26:46 +01:00
Nurmatov Mamatisa
26144743d9 Support Neutron Local IP CRUD
Add support for Neutron Local IP CRUD operations.

Partial-Bug: #1930200
Depends-On: https://review.opendev.org/c/openstack/neutron/+/804523
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/804988
Change-Id: I1095100efb27b8559412469f0a9d07fc0a3db9d5
2022-01-28 17:24:04 +03:00
Artem Goncharov
18dcd7c9f7 Get rid of tenant_id in the network commands
Finally drop tenant_id completely from the networking service.

Change-Id: I5f62f2a76592eaaaed6703624e959df41a6ecc8f
2022-01-17 09:31:16 +01:00
Zuul
0a887a4786 Merge "Add --security-group to port list" 2022-01-13 20:13:30 +00:00
Dr. Jens Harbott
90eb0ca4bb Hide location columns for network objects
Network objects returned from the SDK include a location column which
has a reference to the cloud to which the object belongs. We don't want
to include them in CLI output where they are useless.
The solution implemented in [0] was dropped as a sideeffect in [1].

[0] https://review.opendev.org/c/openstack/python-openstackclient/+/679445
[1] https://review.opendev.org/c/openstack/python-openstackclient/+/815032

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I9a408d9721c9c57d752afaab520cd6ee379a5184
2021-12-16 19:33:04 +00:00
Zuul
c10a4cd966 Merge "Allow unset port's host_id" 2021-12-13 10:26:18 +00:00
Dr. Jens Harbott
4e9b929842 Allow setting gateway when creating a router
These options are not only valid when modifying a router, but also when
one is created initially.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I3e12901f37cbd1639ac9dc9cc49b04114b80474c
2021-12-09 13:49:27 +00:00
Rodolfo Alonso Hernandez
c8c4f76498 Add --security-group to port list
The neutron API supports filtering ports by security group.

Closes-Bug: #1405057

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/804979
Change-Id: I0f626882716c21ac200c1b929ea04664d21874d8
2021-12-02 11:12:47 +00:00
Slawek Kaplonski
f462933113 Allow unset port's host_id
It is supported by Neutron and needs to be done like that when e.g.
admin wants to unbound port from the host.

Task: #44043
Story: #2009705
Change-Id: I08f1bb40f4dc72cfa7c62feeb5f513455de0ca45
2021-11-28 19:58:46 +01:00
Zuul
6fb71af243 Merge "Add --subnet-pool to subnet list" 2021-11-25 17:46:44 +00:00
Stephen Finucane
30612bf622 Remove 'get_osc_show_columns_for_sdk_resource' duplicates
There were a number of 'get_osc_show_columns_for_sdk_resource' defined
in-tree. However, osc-lib has provided this method for some time (since
2.2.0, June 2020 [1] - our minimum version is currently 2.3.0) so
there's no need to provide our own copies. Remove them.

[1] https://github.com/openstack/osc-lib/commit/29a0c5a5

Change-Id: I25695f4f9a379dd691b7eaa1e3247164668ae77e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-10-21 17:14:45 +01:00
Akihiro Motoki
02d6fe9be6 L3 conntrack helper: Use singular name consistently
We use singular form for delete command argument in all places.
This commit replaces conntrack-helper-ids with a singular form.
The only visible change is a fix for the help message below.

  openstack network l3 conntrack helper delete
      <router>
      <conntrack-helper-ids>
      [<conntrack-helper-ids> ...]

Change-Id: I50bbd9f6199071bb86cbb2f37c45ebda1de58433
2021-06-08 15:28:06 +09:00
Slawek Kaplonski
fa8c8d26a7 Add support for Neutron's L3 conntrack helper resource
Neutron has got CRUD API for L3 conntrack helper since some time.
This patch adds support for it in the OSC.
OpenStack SDK supports that since [1]

This patch also bumps minimum OpenStack SDK version to
the 0.56.0 as that version introduced support for the
Neutron's L3 conntrack helper.

[1] https://review.opendev.org/c/openstack/openstacksdk/+/782870

Change-Id: I55604182ae50b6ad70c8bc1f7efad8859f191269
2021-06-07 15:34:30 +02:00
Slawek Kaplonski
b26b7f3440 Allow to send extra attributes in Neutron related commands
To deprecate and drop support for neutronclient CLI and use only
OSC we need feature parity between OSC and neutronclient.
Last missing piece here is possibility to send in POST/PUT requests
unknown parameters to the Neutron server.
This patch adds such possibility to the OSC.

Change-Id: Iba09297c2be9fb9fa0be1b3dc65755277b79230e
2021-05-26 09:29:15 +02:00
Zuul
8e3dde03f9 Merge "network: Add support for vnic-type vdpa" 2021-03-31 18:40:32 +00:00
Zuul
23e7495d44 Merge "Hides prefix_length column in subnet show output" 2021-03-20 05:55:41 +00:00
James Denton
d769ff4393 Hides prefix_length column in subnet show output
When the openstacksdk is patched to properly support defining prefix
lengths when creating subnets, the resulting subnet show output
reveals a prefix_length column with a value of 'none'. This patch
hides the prefix_length column.

Change-Id: I59dfb0b1585ed624f9d82b3557df2ff5ff9d1b3e
Partial-Bug: 1754062
Depends-On: https://review.openstack.org/#/c/550558/
2021-03-19 18:43:35 +00:00
Stephen Finucane
c58f0277a7 network: Make 'network qos rule create --type' option required
When we create a network qos rule we need specify the type so that we
can call the corresponding API. It's not possible to use the command
without the type so mark it as required. This was already being done
but inline.

Change-Id: I559f884bac198d2c69e800620aef66b200473418
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-19 18:39:08 +00:00
Sean Mooney
6f82165979 network: Add support for vnic-type vdpa
Extend 'port create' to support vinc-type vdpa as introduced by neutron
in [1].

[1] https://review.opendev.org/c/openstack/neutron/+/760047

Change-Id: I635c5269f4e8fc55f234c98e85fced87b39fce81
2021-03-19 15:19:38 +00:00
Brian Haley
e4e9fb594d Add --subnet-pool to subnet list
The neutron API supports filtering subnets by subnet
pool id, but the CLI was missing support for it.

Change-Id: Ic230c2c5cda8255d8f2c422880aeac81670b2df3
2021-03-16 09:35:15 -04:00
Bharat Kunwar
ed731d6cd9 network: Add missing subnet unset --gateway <subnet-id>
Story: 2008695
Task: 42003
Change-Id: I9486a09531b11f27a9ff0d68fd4ad8c68a65cccf
2021-03-05 14:15:20 +00:00
Zuul
1c84b44ac2 Merge "Add --name to port list" 2021-03-03 17:03:02 +00:00
Brian Haley
16c72f8642 Add --name to port list
The neutron API supports filtering ports by name, but
the CLI was missing support for it like it does for
other networking resources.

Change-Id: I4ff339e18656013218a26f045b205cb7a02dd2fb
Story: #2008654
2021-02-23 18:58:24 -05:00
Miguel Lavalle
e8509d81ee Add 'address_group' type support to rbac commands
Depends-On: https://review.opendev.org/c/openstack/neutron/+/772460
Change-Id: Icd5e96d180364b979d1e93fcb39f9133a41a06e5
2021-02-10 17:40:39 -06:00
Zuul
01a53fa96f Merge "Add device profile to `port`" 2021-01-22 20:42:59 +00:00
Rodolfo Alonso Hernandez
0cc878e5b0 Add device profile to `port`
Added device profile parameter to ``port create`` command.

Related-Bug: #1906602

Change-Id: I4c222ac334d3a0a0ee568ed1e0bc8518baa375e1
2021-01-19 14:42:46 +00:00
Hang Yang
e01e59caeb Support remote-address-group in SG rules
Add support for using remote-address-group in security group rules.

Change-Id: Ib1972244d484839943bc3cda07519a6c6d4b945a
Implements: blueprint address-groups-in-sg-rules
Depends-On: https://review.opendev.org/755644
2021-01-12 10:55:24 -06:00
Stephen Finucane
dd89efd5ac network: Address nits for I3c313fc9329837dde67815901528a34dca98ebcc
Address comments left in the review for $subject.

Change-Id: I69449112027736152c9fb62f5fe427efd6a25107
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-12 10:07:58 +00:00
Hang Yang
f57e10b903 Support Neutron Address Group CRUD
Add support for Neutron address group CRUD operations. Subsequent patches
will be added to use address groups in security group rules.

Change-Id: I3c313fc9329837dde67815901528a34dca98ebcc
Implements: blueprint address-groups-in-sg-rules
Depends-On: https://review.opendev.org/738274
Depends-On: https://review.opendev.org/745594
2020-12-24 11:27:23 -06:00
Rodolfo Alonso Hernandez
8387b114e3 Add "fields" parameter to ListPort query
This new query parameter will allow to send a query to the Neutron
server filtering only by those parameters needed by the list
command: ID, name, MAC address, fixed IPs and status.

When using input parameter "long", security groups IDs, device owner
and tags will be added to the fields filter.

With 4500 ports, those are the execution times for the command
"openstack port list" (average values in a development environment):

                 Neutron API (seconds)  CLI (seconds)
Without filter:  3.05                   10.15
With filter:     2.76                   8.19

Depends-On: https://review.opendev.org/#/c/754113/

Change-Id: I1cccf0bc3533f8085e8dd61bf2fbe78c49b74b31
Closes-Bug: #1897100
2020-11-18 17:42:14 +00:00
Zuul
2eeab20eca Merge "Always display direction for security group rules" 2020-10-13 23:26:24 +00:00
Zuul
375fe31525 Merge "Add source_ip_prefix and destination_ip_prefix to metering label rules" 2020-10-13 12:21:15 +00:00
songwenping
c2df9215e1 Remove usage of six
With python3.x, classes can use 'metaclass=' instead of
'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can
be replaced by 'items' and 'keys', 'six.moves.urllib.parse'
can be replaced by 'urllib.parse', 'six.StringIO' and
'six.moves.cStringIO' can be replaced by 'io.StringIO',
'six.text_type' and 'six.string_type' are just 'str'.

Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
2020-10-07 02:15:25 +00:00