Commit graph

775 commits

Author SHA1 Message Date
Zuul
a8751b00fe Merge "Add device ID and device owner to port unset" 2025-08-15 03:29:28 +00:00
Alexey Stupnikov
46b25c7c0b network: Add '--project' to SG rule list command
Include '--project' and '--project-domain' filtering options to the
'security group rule list'.

Closes-Bug: #1648317
Change-Id: I19e423906846073cfa1e45b4a295b3a8f5d11970
Signed-off-by: Alexey Stupnikov <aleksey.stupnikov@gmail.com>
2025-07-24 18:06:03 +02:00
elajkat
1b2dfeacf4 Add is_shared to security_groups
Change-Id: I1ff4aa9c6579699e6b479fdb429668de894cd012
Related-Bug: #1999774
Signed-off-by: elajkat <lajos.katona@est.tech>
2025-07-15 14:27:46 +01:00
elajkat
5f602475cd Security-groups: Temporarily ignore is_shared
[1] introduces is_shared field to SDK security-groups.
Till that is merged and released temporary skip the new field.

[1]: https://review.opendev.org/c/openstack/openstacksdk/+/950305
Related-Bug: #1999774

Change-Id: I71cdf96460bbb21ee61105ef9ccc23170b0b5460
2025-05-29 07:53:58 +00:00
Stephen Finucane
01c1b1e36f network: Allow multiple FIP filter opts
This is allowed by the neutron API. Allow it in OSC.

Change-Id: I7642ecd686d11c5af9e11cc80896243e853e33f3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 14:07:37 +01:00
Stephen Finucane
11495e655a Don't warn about unsupported version with SDK-based commands
This doesn't make sense: SDK (and the server) will handle this for us.

Change-Id: I31b84e09eca0dc2bc5316d6727620346ae519512
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2106760
2025-04-10 18:21:17 +01:00
Stephen Finucane
d96c81ff7f Refactor network fakes to sdk properties PART6
Included resources:
router
security_group
security_group_rule

Change-Id: I2423fc31d94f85aeefc7b0a205dfb38829417a29
2025-04-08 16:36:48 +00:00
Stephen Finucane
f870548c7f Refactor network fakes to sdk properties PART 5
Included resources:
qos_policy
qos_rule
qos_rule_type

Note: Parameters in unittests was modified
for compatibility with sdk

Change-Id: Iaa902d64ff1b29a07c28ed2100d437da506be475
2025-04-07 15:53:30 +01:00
Zuul
dd8e4740ec Merge "compute: Migrate to 'compute' client alias" 2025-04-03 18:08:17 +00:00
Stephen Finucane
dae2539490 compute: Migrate to 'compute' client alias
This is no longer assigned to novaclient, meaning we can use it for SDK.

Change-Id: I43d9ede39d36cc29301f94fa462b9b9d9441807c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-03 16:39:03 +01:00
Stephen Finucane
ac1ad1c4e4 Remove use of formatter function
We also update tests to use proper SDK fakes so we actually test this.

Change-Id: Ib98348cab613b7139f0faa0b5df90ff44353974f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-02 12:39:26 +01:00
Zuul
c9e4e5404f Merge "Permit use of tuple API_VERSIONS" 2025-04-01 12:02:24 +00:00
Zuul
77143f9bed Merge "typing: Resolve incompatible operand issues" 2025-04-01 11:50:55 +00:00
Zuul
28bd00a642 Merge "typing: Correct type for missing attributes" 2025-04-01 11:50:53 +00:00
Zuul
93da5f7af5 Merge "typing: Use consistent types" 2025-04-01 11:50:49 +00:00
Zuul
cf25526e94 Merge "Return the `port` column headers expected in the list command" 2025-04-01 10:48:10 +00:00
Stephen Finucane
b2eccdcb1a Permit use of tuple API_VERSIONS
The values of these dictionaries are not used when SDK is in use,
which should soon account for all use cases. Eventually we should
probably look for plugins to return a proper class or typeddict but
that's a job for another day.

This began as a fix for in openstackclient/object/client.py which
referenced a non-existent class and quickly snowballed.

Change-Id: I7b807ec3a97124b35828ffdecbb36f6fde11e7b5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:36:02 +01:00
Stephen Finucane
9de592ebaf typing: Resolve incompatible operand issues
Change-Id: I7f3dd908053b9ace5206d0a1bd3b8258fd0264ef
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:52:16 +01:00
Stephen Finucane
e28046cc19 typing: Correct type for missing attributes
Change-Id: I55652220ecd663fa024937646dfef92595e1cd0f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:52:16 +01:00
Stephen Finucane
2c0a3ba137 typing: Use consistent types
Resolve 'Incompatible types in assignment' errors.

Change-Id: I1ea186ff766e0f72cac384fab22d1c2f82e02ef0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:48:36 +01:00
Stephen Finucane
7380fbe300 typing: Add types for empty dicts, tuples
In some cases, simply remove them.

Change-Id: I24a311a24eb533325dda83005777bcb2e0afc320
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:48:36 +01:00
Stephen Finucane
bdd55d989d typing: Indicate tuples to be extended
Change-Id: Ie5907de8d60f2f39e98f6a88227cebb2e2ff565c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:48:36 +01:00
Stephen Finucane
9c7a5d4e51 pre-commit: Bump versions
Apply manual changes required by ruff. Automatic changes were done
separately.

Change-Id: I7db65bd2ac3f31b0479699946398752d8d729338
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:48:31 +01:00
Zuul
ab2e68f407 Merge "Prepare for ruff bump" 2025-03-31 10:37:30 +00:00
Zuul
5918b6b478 Merge "[Neutron] Add "qos-policy" parameter to router creation command" 2025-03-28 19:27:30 +00:00
Brian Haley
107c6b143f Fix neutron typos and formatting
Just trying to make things consistent in the neutron files.

TrivialFix

Change-Id: I9c0ac838f5a956f55161e1636472cca761b14781
2025-03-26 20:02:25 -04:00
Rodolfo Alonso Hernandez
4dbfc47552 Return the `port` column headers expected in the list command
In [1], it was added the ability to print in the "port list" command
any field not defined in the hardcoded column set for this command.

But in [2], it was added a filter list in the API call in order to
reduce the CLI execution time. The unintentional drawback of this
optimization was that is no longer possible to print any field outside
the "port list" column set.

Because the optimization if preferred and it is always possible to use
"port show" to see all the port fields, the code added in [1] is
removed.

[1]https://review.opendev.org/c/openstack/python-openstackclient/+/522901
[2]https://review.opendev.org/c/openstack/python-openstackclient/+/754117

Closes-Bug: #2098980
Related-Bug: #1707848
Related-Bug: #1897100
Change-Id: Ia944b8e108c454219d642cfa595ffafdf060a57f
2025-03-26 15:57:12 +00:00
Rodolfo Alonso Hernandez
07515cd160 [Neutron] Add "qos-policy" parameter to router creation command
This patch adds the parameter "qos-policy" to the router creation
command.

Closes-Bug: #2103774
Change-Id: I742b3273c5e9d3ec16e8018beddc8cdace8a57c6
2025-03-26 07:46:40 +00:00
Stephen Finucane
290bc580e6 Prepare for ruff bump
Change-Id: Ia9c402edebc8537d5019d18920b6679b05ea4378
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-19 12:04:39 +00:00
Tobias Urdin
f1bd417861 Add device ID and device owner to port unset
This adds support to unset the device_id and
device_owner property on a port.

Change-Id: I43b1ea63e3a119f57162948e128a85f8ba323d41
2025-03-12 19:39:03 +00:00
Zuul
966aede8ab Merge "Add four new network agent types to the list command filter" 2025-02-28 01:43:25 +00:00
Zuul
4b7e32ca37 Merge "handle 'router create --flavor' option" 2025-02-25 22:48:45 +00:00
Rodolfo Alonso Hernandez
762a3b10d1 Add four new network agent types to the list command filter
Added four new network agent types to the list method filter:
* ``ovn-controller``
* ``ovn-controller-gateway``
* ``ovn-metadata``
* ``ovn-agent``

These agents are represented in the OVN network agent classes defined
in [1]. The OVN agent names are defined in [2].

[1]86f94de99a/neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py
[2]86f94de99a/neutron/common/ovn/constants.py (L91-L94)

Closes-Bug: #2097124
Change-Id: I117be7e60f67fdd94677cbaa65a3aff01e57bb5e
2025-02-24 10:58:48 +00:00
Zuul
d22b7732ad Merge "[Neutron] Support `uplink-status-propagation-updatable` extension" 2025-02-24 09:05:05 +00:00
Zuul
12e264adc6 Merge "[Neutron] "uplink-status-propagation" enabled by default" 2025-02-24 08:53:02 +00:00
Rodolfo Alonso Hernandez
0ba77e6727 [Neutron] Fix the "port show" command for trunk details
In [1], the "port list --long" command received a new column, showing
the trunk subports related to a parent port. The problem of this patch
is that the ``_formatters`` definition, that is shared with the "port
show" command too, is changed. The "trunk_details" information presented
in both commands differ:
* In the "port list" command, only the subports are presented, in order
  to print a list of dictionaries without showing the ``trunk_id``.
* In the "port show" command, it is presented all the trunk information,
  including the ``trunk_id``.

This patch includes functional tests to validate the fix.

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

Closes-Bug: #2098950
Change-Id: Ib1107fb3dbb025b39a7c55f90f5fe51ae433a72f
2025-02-20 01:07:39 +00:00
Rodolfo Alonso Hernandez
426abbdc68 [Neutron] Support `uplink-status-propagation-updatable` extension
Added ``--enable-uplink-status-propagation`` option and
``--disable-uplink-status-propagation`` option to ``port update``
command.

Now the Neutron extension "uplink-status-propagation-updatable" allows
to update the related value in a port. That was implemented in the
following patches (during 2025.1 Epoxy release):
* https://review.opendev.org/c/openstack/neutron-lib/+/927820
* https://review.opendev.org/c/openstack/neutron-lib/+/936234
* https://review.opendev.org/c/openstack/neutron/+/931641

Related-Bug: #1722720
Change-Id: I99cdcf21438d6d85092c995b50cb10b26ae7c059
2025-02-18 12:09:37 +00:00
Doug Goldstein
1f407afe1c
handle 'router create --flavor' option
The '--flavor' option appears in the usage and arglist but is not
actually parsed. The '--flavor-id' option is what is silently parsed.
Since the goal is to allow the name or the id, this adds the '--flavor'
option to being parsed.

Closes-Bug: 2091731
Change-Id: Id83facd3825f472e7d864427699bd072d1c08779
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-15 14:04:28 -06:00
Rodolfo Alonso Hernandez
b50ac8d2a2 [Neutron] "uplink-status-propagation" enabled by default
Since [1][2], the port flag "uplink-status-propagation" is enabled
by default.

[1]https://review.opendev.org/c/openstack/neutron-lib/+/744208
[2]https://review.opendev.org/c/openstack/neutron/+/744210

Related-Bug: #1888487
Change-Id: I522707b36c73b3c5bfe0d644bd07774918660b68
2025-02-14 14:13:26 +00:00
Slawek Kaplonski
3412147372 Add "qinq-vlan" and "no-qinq-vlan" params to the "network create" cmd
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/939703

Related-Bug: #1915151
Change-Id: Icacf83c20c3650a9d75f665f020b8818e1b4a585
2025-02-13 10:10:42 +01:00
Slawek Kaplonski
e761ef8e32 Temporary ignore "is_vlan_qinq" column in the output
We need such temporary workaround until [1] in SDK will be merged, as
without that change here py{39,312}-tips jobs are failing on that SDK
patch.

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

Related-bug: #1915151
Change-Id: Id39a6482de54fe78e26fa33c9252253886cf1f3d
2025-02-12 16:40:37 +01:00
Fernando Royo
d2d7219231 Get "security_groups" when port list
Neutron API is accepting 'security_groups' field  in
order to return the list of security_groups attached
to a port, but openstackclient is parsing the output
over a Openstack Port object that has security_group_ids
to map. This patch sends to the Neutron API the expected
field value and replace the output key to allow the
mapping just in case '--long' argument is passed.

Closes-Bug: #2095414
Change-Id: I188edc3c620ce29d7b16497ca24fd7d972a06618
2025-01-21 18:51:32 +00:00
Rodolfo Alonso Hernandez
2a0431e825 Add the trunk subports information to the port list command
Added the subports information to the port list command, when the
"--long" qualifier is specified.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/926609

Closes-Bug: #2074187
Change-Id: I8ef66c3415279caf0ebea4ba6232ca3696188de9
2024-12-18 15:04:54 +01:00
Stephen Finucane
c888cf2556 network: Make better use of argparse
Change-Id: I7421a0ab957412a8283eee6ae9783dac9d3f6a4a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-11-29 10:33:36 +00:00
Zuul
79e01a5533 Merge "Add "trusted" attribute to the "port"" 2024-11-08 17:32:37 +00:00
Slawek Kaplonski
47144103ca Add "trusted" attribute to the "port"
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/927723

Related-bug: #2060916
Change-Id: I8e3d4ee2208ef6bb6c96ee430d7b550a0720431e
2024-11-04 09:12:43 +00:00
Yosef Salmalian
db115c09a2 remove project from network flavor profile
Removing project from network_flavor_profile as neutron api
does not uses project.

Closes-Bug: 2046496
Change-Id: I77b0544cf8629fb0a5b9914361a007d28b2b5662
2024-10-16 10:19:59 +03:30
Zuul
ac59673b5d Merge "Add status filtering options to port list" 2024-09-30 17:38:14 +00:00
zhangoic
9c223696a0 Add status filtering options to port list
The patch adds "--status" options to list command.

Change-Id: I710437f67e9432b2b6389986bc922eac4a60c934
Partial-bug: #1672680
2024-09-17 12:56:21 +01:00
Zuul
31251e33ec Merge "Handle NotFoundException when listing floating IPs" 2024-09-13 18:58:51 +00:00