Secret_Access_Key = "the_secret_key";
}
}
+"""
+ export_3 = """
+EXPORT {
+ FSAL {
+ name = "CEPH";
+ user_id = "nfs.foo.1";
+ filesystem = "a";
+ secret_access_key = "AQCjU+hgjyReLBAAddJa0Dza/ZHqjX5+JiePMA==";
+ }
+ export_id = 1;
+ path = "/";
+ pseudo = "/a";
+ access_type = "RW";
+ squash = "none";
+ attr_expiration_time = 0;
+ security_label = true;
+ protocols = 4;
+ transports = "TCP";
+}
"""
conf_nodea = '''
assert export.clients[0].access_type is None
assert export.cluster_id == cluster_id
+ def test_update_export_with_ganesha_conf(self):
+ with self._mock_orchestrator(True):
+ for cluster_id, info in self.clusters.items():
+ self._do_test_update_export_with_ganesha_conf(cluster_id, info['exports'])
+ self._reset_temp_store()
+
+ def _do_test_update_export_with_ganesha_conf(self, cluster_id, expected_exports):
+ nfs_mod = Module('nfs', '', '')
+ conf = ExportMgr(nfs_mod)
+ r = conf.apply_export(cluster_id, self.export_3)
+ assert r[0] == 0
+
def test_remove_export(self) -> None:
with self._mock_orchestrator(True), mock.patch('nfs.module.ExportMgr._exec'):
for cluster_id, info in self.clusters.items():