Exemplo n.º 1
0
 def test__get_export_by_path_export_exists(self):
     expected_export = {
         'anonymous_root_uid': '-2',
         'export_id': '100',
         'filesystem_id': '192.168',
         'fsal': '"GPFS"',
         'maxread': '65536',
         'maxwrite': '65536',
         'nfs_protocols': '"3,4"',
         'path': '"/fs0/share-1234"',
         'prefread': '65536',
         'prefwrite': '65536',
         'pseudo': '"/fs0/share-1234"',
         'root_access': '"*"',
         'rw_access': '""',
         'sectype': '"sys"',
         'tag': '"fs100"',
         'transport_protocols': '"UDP,TCP"',
     }
     export = ganesha_utils._get_export_by_path(self.fake_exports,
                                                self.fake_path)
     self.assertEqual(export, expected_export)
Exemplo n.º 2
0
 def test__get_export_by_path_export_does_not_exists(self):
     share_path = '/fs0/share-1111'
     export = ganesha_utils._get_export_by_path(self.fake_exports,
                                                share_path)
     self.assertIsNone(export)