]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/smb: validate that a share name is unique per-cluster
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 14 May 2024 14:19:10 +0000 (10:19 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sat, 6 Jul 2024 14:00:18 +0000 (10:00 -0400)
commit028fe052bd65dc879adfb1a552a5ebb8ba3c7d8a
treee459186015e55cd6fd00e1d7379db41fe1b92cef
parentfd6d4a77c85218e6f37167e05c603a3a9d91a4a9
mgr/smb: validate that a share name is unique per-cluster

We already require that the share_id be unique as it's part of the entry
key of the resource. Add a validation function to the handler that
checks if a (cluster_id, name) tuple is not duplicated. This function
uses the newly added config_store.find_in_store function to find the
potential dupes.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/handler.py