Merge "Rename 'nfs_cluster_id' to 'cluster_id' in the NFSProtocolHelper"

This commit is contained in:
Zuul 2022-10-04 18:49:49 +00:00 committed by Gerrit Code Review
commit f33541b639
3 changed files with 17 additions and 8 deletions

View File

@ -1177,7 +1177,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
export_ips = []
argdict = {
"nfs_cluster_id": nfs_clusterid,
"cluster_id": nfs_clusterid,
}
output = rados_command(self.rados_client, "nfs cluster info", argdict)
@ -1213,7 +1213,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
"""Allow access to the share."""
export = {
"path": self._get_export_path(share),
"nfs_cluster_id": self.nfs_clusterid,
"cluster_id": self.nfs_clusterid,
"pseudo": self._get_export_pseudo_path(share),
"squash": "none",
"security_label": True,
@ -1227,7 +1227,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
}
argdict = {
"nfs_cluster_id": self.nfs_clusterid,
"cluster_id": self.nfs_clusterid,
}
inbuf = json.dumps(export).encode('utf-8')
@ -1238,7 +1238,7 @@ class NFSClusterProtocolHelper(NFSProtocolHelperMixin, ganesha.NASHelperBase):
"""Deny access to the share."""
argdict = {
"nfs_cluster_id": self.nfs_clusterid,
"cluster_id": self.nfs_clusterid,
"pseudo_path": self._get_export_pseudo_path(share)
}

View File

@ -1299,12 +1299,12 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
}
access_allow_dict = {
"nfs_cluster_id": nfs_clusterid,
"cluster_id": nfs_clusterid,
}
export = {
"path": "ganesha:/foo/bar",
"nfs_cluster_id": nfs_clusterid,
"cluster_id": nfs_clusterid,
"pseudo": "ganesha:/foo/bar",
"squash": "none",
"security_label": True,
@ -1331,7 +1331,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
access_deny_dict = {
"nfs_cluster_id": nfs_clusterid,
"cluster_id": nfs_clusterid,
"pseudo_path": "ganesha:/foo/bar"
}
@ -1346,7 +1346,7 @@ class NFSClusterProtocolHelperTestCase(test.TestCase):
nfs_clusterid = self._nfscluster_protocol_helper.nfs_clusterid
cluster_info_dict = {
"nfs_cluster_id": nfs_clusterid,
"cluster_id": nfs_clusterid,
}
cluster_info = {"fs-manila": {

View File

@ -0,0 +1,9 @@
---
fixes:
- |
The CephFS NFS driver, specifically the NFSProtocolHelper
implementation, was passing a wrong param to the Ceph backend
and this was preventing users to add and deny access to the
created shares. With this fix, users of the CephFS NFS
NFSProtocolHelper can normally create and remove access
to their shares.