share_network_subnets not parsed properly in "openstack share network show"

Bug #2065771 reported by Morozov Aleksey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
Fix Released
Medium
Morozov Aleksey

Bug Description

When create a share network with the command:
openstack share network create --neutron-net-id <neutron-net-id> --neutron-subnet-id <neutron-subnet-id> --name share-network
You get output:
`share_network_subnets`
instead of table with chars. The same thing happens when calling the show function. This is due to the absence of the key "share_network_subnets" in the share_network._info. For fix this you need to add check like this in create and show functions:
```python
share_network_data = share_network._info
if 'share_network_subnets' not in share_network_data:
   share_network_data['share_network_subnets'] = []
```

description: updated
Changed in python-manilaclient:
status: New → In Progress
description: updated
summary: - share network show
+ share_network_subnets not parsed properly in share network show
summary: - share_network_subnets not parsed properly in share network show
+ share_network_subnets not parsed properly in "openstack share network
+ show"
Changed in python-manilaclient:
assignee: nobody → Morozov Aleksey (morozovalekseywot)
milestone: none → dalmation-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-manilaclient/+/919758
Committed: https://opendev.org/openstack/python-manilaclient/commit/48fbad6f62e13accd99225d92007cd2eb2a47833
Submitter: "Zuul (22348)"
Branch: master

commit 48fbad6f62e13accd99225d92007cd2eb2a47833
Author: morozovalekseywot <email address hidden>
Date: Wed May 15 20:13:38 2024 +0300

    Fix show info about share network

    Add check for _info dict, without this check an exception will occur and user doesn't get info.

    Closes-Bug:#2065771
    Change-Id: I0b0dba95c53aad264921dc32644ee8e5b86fc1e2

Changed in python-manilaclient:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.