def test_create_nfs_share_same_name_in_diff_fs(self): UnityNfsShare.create(t_rest(), 'ns1', 'fs_9', share_access=NFSShareDefaultAccessEnum.READ_WRITE) share = UnityNfsShare.create( t_rest(), 'ns1', 'fs_10', share_access=NFSShareDefaultAccessEnum.READ_WRITE) assert_that(share.name, equal_to('ns1')) assert_that(share.filesystem.name, equal_to('esa_nfs1'))
def test_create_nfs_share_success(self): share = UnityNfsShare.create( t_rest(), 'ns1', 'fs_9', share_access=NFSShareDefaultAccessEnum.READ_WRITE) assert_that(share.name, equal_to('ns1')) assert_that(share.id, equal_to('NFSShare_4'))
def test_create_nfs_share_success_all_params(self): share_access = NFSShareDefaultAccessEnum.READ_WRITE min_security = NFSShareSecurityEnum.KERBEROS description = 'Test nfs share.' share = UnityNfsShare.create( t_rest(), 'ns41', 'fs_41', share_access=share_access, min_security=min_security, no_access_hosts_string='Host_42', read_only_hosts_string='Host_41', read_write_hosts_string='Host_19,Host_18', read_only_root_hosts_string='Host_17', root_access_hosts_string='Host_16,Host_13', anonymous_uid=10001, anonymous_gid=10002, export_option=20001, description=description) assert_that(share.name, equal_to('ns41')) assert_that(share.id, equal_to('NFSShare_41')) assert_that(share.path, equal_to('/')) assert_that(share.default_access, equal_to(share_access)) assert_that(share.min_security, equal_to(min_security)) assert_that(share.no_access_hosts_string, equal_to('Host_42')) assert_that(share.read_only_hosts_string, equal_to('Host_41')) assert_that(share.read_write_hosts_string, equal_to('Host_18,Host_19')) assert_that(share.read_only_root_hosts_string, equal_to('Host_17')) assert_that(share.read_write_root_hosts_string, equal_to('Host_13,Host_16')) assert_that(share.anonymous_uid, equal_to(10001)) assert_that(share.anonymous_gid, equal_to(10002)) assert_that(share.export_option, equal_to(20001)) assert_that(share.description, equal_to(description))
def f(): UnityNfsShare.create(t_rest(), 'ns1', 'fs_9', share_access=NFSShareDefaultAccessEnum.ROOT)
def f(): UnityNfsShare.create(t_rest(), 'ns1', 'fs_8')
def f(): UnityNfsShare.create( t_rest(), 'ns1', 'fs_9', share_access=NFSShareDefaultAccessEnum.ROOT)