Пример #1
0
    def main(conninfo, credentials, args):
        share_info = {}
        share_info, share_info['if_match'] = \
            smb.smb_list_share(conninfo, credentials, args.id)

        share_info['id_'] = share_info['id']
        share_info['allow_fs_path_create'] = args.create_fs_path
        del share_info['id']
        if args.name is not None:
            share_info['share_name'] = args.name
        if args.fs_path is not None:
            share_info['fs_path'] = args.fs_path
        if args.description is not None:
            share_info['description'] = args.description
        if args.read_only is not None:
            share_info['read_only'] = \
                qumulo.lib.util.bool_from_string(args.read_only)
        if args.allow_guest_access is not None:
            share_info['allow_guest_access'] = \
                qumulo.lib.util.bool_from_string(args.allow_guest_access)
        if args.access_based_enumeration_enabled is not None:
            share_info['access_based_enumeration_enabled'] = \
                qumulo.lib.util.bool_from_string(
                    args.access_based_enumeration_enabled)

        print smb.smb_modify_share(conninfo, credentials,
            **share_info)
Пример #2
0
 def main(conninfo, credentials, args):
     print smb.smb_list_share(conninfo, credentials, args.id)