def METHOD_NAME(self, *args, **options):
    if options['syntax']:
        usage()
        exit(1)
    abstract = 'No abstract'
    title = 'No title'
    subjects = 'foo,bar'
    subjects = tuple(subjects.split(','))
    access = 'private'
    oname = 'admin'
    owner = user_from_name('admin')
    files = None
    while options['command']:
        command = options['command'].pop(0)
        if command == 'title':
            title = options['command'].pop(0)
        elif command == 'abstract':
            abstract = options['command'].pop(0)
        elif command == 'subjects':
            subjects = options['command'].pop(0)
            subjects = tuple(subjects.split(','))
        elif command == 'files':
            files = options['command'].pop(0)
            files = files.split(',')
        elif command == 'access':
            access = options['command'].pop(0)
            if access not in ['private', 'discoverable', 'public']:
                print("unrecognized access '{}'".format(access))
                usage()
                exit(1)
        elif command == 'owner':
            oname = options['command'].pop(0)
        else:
            owner = user_from_name(oname)
            if owner is None:
                print("no owner '{}'".format(oname))
                usage()
                exit(1)
            print("unknown resource attribute '{}'".format(command))
    print("creating resource with attributes:")
    print("  title={}".format(title))
    print("  abstract={}".format(abstract))
    print("  subjects={}".format(subjects))
    print("  owner={}".format(oname))
    print("  access={}".format(access))
    print("  files={}".format(files))
    fds = tuple([open(f, 'rb') for f in files])
    metadata_dict = [
        {'description': {'abstract': abstract}},
    ]
    res = create_resource(
        resource_type='CompositeResource',
        owner=owner,
        title=title,
        keywords=subjects,
        metadata=metadata_dict,
        files=fds
    )
    if access == 'discoverable':
        res.set_discoverable(True)
    elif access == 'public':
        res.set_public(True)
    # default is 'private'
    print(res.short_id)