Bug 1911270

Summary: Create manila share with name = 'None' and without name argument is ambiguous
Product: Red Hat OpenStack Reporter: lkuchlan <lkuchlan>
Component: python-manilaclientAssignee: lkuchlan <lkuchlan>
Status: POST --- QA Contact: lkuchlan <lkuchlan>
Severity: low Docs Contact: Andy Stillman <astillma>
Priority: low    
Version: 17.0 (Wallaby)CC: apevec, cardasil, gfidente, gouthamr, jelynch, lhh, vhariria, vimartin
Target Milestone: z2Keywords: RFE, Triaged, UserExperience
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-manilaclient-2.6.2-0.20220205070838.a9d1193 Doc Type: Bug Fix
Doc Text:
Before this update, the Shared File Systems service (manila) shell client allowed users to name their shares with an invalid name. An invalid name, for example "None", conflicted with the notation that the service uses for fields that are not populated by the user or service. With this update, the client rejects invalid names for an improved user experience when creating shares with a custom name or filtering created shares by name.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lkuchlan 2020-12-28 12:55:47 UTC
Description of problem:
This is also true for manila snapshot creation

Version-Release number of selected component (if applicable):
python3-manilaclient-1.29.0-0.20200310223441.1b2cafb.el8ost.noarch

How reproducible:
100%

Steps to Reproduce:
(overcloud) [stack@undercloud-0 ~]$ manila create nfs 1
+---------------------------------------+--------------------------------------+
| Property                              | Value                                |
+---------------------------------------+--------------------------------------+
| id                                    | c1f4cd6c-803f-4288-83b3-c7f819e96969 |
| size                                  | 1                                    |
| availability_zone                     | None                                 |
| created_at                            | 2020-12-28T12:39:11.000000           |
| status                                | creating                             |
| name                                  | None                                 |
| description                           | None                                 |
| project_id                            | b87d77dda3714d6dbe912dd9617ed9ec     |
| snapshot_id                           | None                                 |
| share_network_id                      | None                                 |
| share_proto                           | NFS                                  |
| metadata                              | {}                                   |
| share_type                            | 5a7912d9-1836-44c7-ba74-75c1b8aba116 |
| is_public                             | False                                |
| snapshot_support                      | True                                 |
| task_state                            | None                                 |
| share_type_name                       | default                              |
| access_rules_status                   | active                               |
| replication_type                      | None                                 |
| has_replicas                          | False                                |
| user_id                               | 6600c821d28d41ce9e5e77eed7a5d412     |
| create_share_from_snapshot_support    | False                                |
| revert_to_snapshot_support            | False                                |
| share_group_id                        | None                                 |
| source_share_group_snapshot_member_id | None                                 |
| mount_snapshot_support                | False                                |
| share_server_id                       | None                                 |
| host                                  |                                      |
+---------------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type Name | Host                    | Availability Zone |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| c1f4cd6c-803f-4288-83b3-c7f819e96969 | None | 1    | NFS         | available | False     | default         | hostgroup@cephfs#cephfs | nova              |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+

(overcloud) [stack@undercloud-0 ~]$ manila create nfs 1 --name None
+---------------------------------------+--------------------------------------+
| Property                              | Value                                |
+---------------------------------------+--------------------------------------+
| id                                    | b7efaa3e-9057-40a7-b3c6-f9190f269984 |
| size                                  | 1                                    |
| availability_zone                     | None                                 |
| created_at                            | 2020-12-28T12:39:30.000000           |
| status                                | creating                             |
| name                                  | None                                 |
| description                           | None                                 |
| project_id                            | b87d77dda3714d6dbe912dd9617ed9ec     |
| snapshot_id                           | None                                 |
| share_network_id                      | None                                 |
| share_proto                           | NFS                                  |
| metadata                              | {}                                   |
| share_type                            | 5a7912d9-1836-44c7-ba74-75c1b8aba116 |
| is_public                             | False                                |
| snapshot_support                      | True                                 |
| task_state                            | None                                 |
| share_type_name                       | default                              |
| access_rules_status                   | active                               |
| replication_type                      | None                                 |
| has_replicas                          | False                                |
| user_id                               | 6600c821d28d41ce9e5e77eed7a5d412     |
| create_share_from_snapshot_support    | False                                |
| revert_to_snapshot_support            | False                                |
| share_group_id                        | None                                 |
| source_share_group_snapshot_member_id | None                                 |
| mount_snapshot_support                | False                                |
| share_server_id                       | None                                 |
| host                                  |                                      |
+---------------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type Name | Host                    | Availability Zone |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| b7efaa3e-9057-40a7-b3c6-f9190f269984 | None | 1    | NFS         | available | False     | default         | hostgroup@cephfs#cephfs | nova              |
| c1f4cd6c-803f-4288-83b3-c7f819e96969 | None | 1    | NFS         | available | False     | default         | hostgroup@cephfs#cephfs | nova              |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+