Revert "Fix docstrings in rax_files_objects"

This reverts commit e759832dd6.
This commit is contained in:
James Tanner 2014-01-23 18:27:22 -05:00
parent e759832dd6
commit bec35cc0c1

View file

@ -19,18 +19,19 @@
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: rax_files_objects module:
short_description: create, fetch, and delete objects in Rackspace Cloud Files short_description: create, fetch, and delete objects in Rackspace Cloud Files
description: Upload, download, and delete objects in Rackspace Cloud Files description:
- Upload, download, and delete objects in Rackspace Cloud Files
version_added: "1.5" version_added: "1.5"
options: options:
api_key: api_key:
description: description:
- 'Rackspace API key (overrides I(credentials))requirements: [ "pyrax" ]' - Rackspace API key (overrides I(credentials))requirements: [ "pyrax" ]
clear_meta: clear_meta:
description: description:
- Optionally clear existing metadata when applying metadata to existing objects. - Optionally clear existing metadata when applying metadata to existing objects.
Selecting this option is only appropriate when setting typ=meta - Selecting this option is only appropriate when setting typ=meta
choices: ["yes", "no"] choices: ["yes", "no"]
default: "no" default: "no"
container: container:
@ -46,21 +47,21 @@ options:
dest: dest:
description: description:
- The destination of a "get" operation; i.e. a local directory, "/home/user/myfolder" - The destination of a "get" operation; i.e. a local directory, "/home/user/myfolder"
Used to specify the destination of an operation on a remote object; i.e. a file name, - Used to specify the destination of an operation on a remote object; i.e. a file name,
'file1', or a comma-separated list of remote objects, "file1,file2,file17" "file1", or a comma-separated list of remote objects, "file1,file2,file17"
expires: expires:
description: description:
- Used to set an expiration on a file or folder uploaded to Cloud Files - Used to set an expiration on a file or folder uploaded to Cloud Files
Requires an integer, specifying expiration in seconds - Requires an integer, specifying expiration in seconds
meta: meta:
description: description:
- A hash of items to set as metadata values on an uploaded file or folder - A hash of items to set as metadata values on an uploaded file or folder
method: method:
description: description:
- The method of operation to be performed put, get, delete - The method of operation to be performed: put, get, delete
Put to upload files to Cloud Files - Put to upload files to Cloud Files
Get to download files from Cloud Files - Get to download files from Cloud Files
Delete to delete remote objects in Cloud Files - Delete to delete remote objects in Cloud Files
choices: ["get", "put", "delete"] choices: ["get", "put", "delete"]
default: "get" default: "get"
region: region:
@ -70,23 +71,23 @@ options:
src: src:
description: description:
- Source from which to upload files - Source from which to upload files
Used to specify a remote object as a source for an operation, i.e. a file name, - Used to specify a remote object as a source for an operation, i.e. a file name,
'file1', or a comma-separated list of remote objects, "file1,file2,file17" "file1", or a comma-separated list of remote objects, "file1,file2,file17"
src and dest are mutually exclusive on remote-only object operations - src and dest are mutually exclusive on remote-only object operations
structure: structure:
description: description:
- Used to specify whether to maintain nested directory structure when downloading objects from Cloud Files - Used to specify whether to maintain nested directory structure when downloading objects from Cloud Files
Setting to false downloads the contents of a container to a single, flat directory - Setting to false downloads the contents of a container to a single, flat directory
choices: ["yes", "no"] choices: ["yes", "no"]
default: "yes" default: "yes"
typ: typ:
description: description:
- Type of object to do work on, metadata object or a file object - Type of object to do work on: metadata object or a file object
choices: ["file", "meta"] choices: ["file", "meta"]
default: "file" default: "file"
username: username:
description: description:
- Rackspace username - Rackspace username (overrides I(credentials))
requirements: [ "pyrax" ] requirements: [ "pyrax" ]
author: Paul Durivage author: Paul Durivage
notes: notes:
@ -563,7 +564,7 @@ def main():
src=dict(), src=dict(),
dest=dict(), dest=dict(),
method=dict(default='get', choices=['put', 'get', 'delete']), method=dict(default='get', choices=['put', 'get', 'delete']),
typ=dict(default='file', choices=['file', 'meta']), type=dict(default='file', choices=['file', 'meta']),
meta=dict(type='dict', default={}), meta=dict(type='dict', default={}),
clear_meta=dict(choices=BOOLEANS, default=False, type='bool'), clear_meta=dict(choices=BOOLEANS, default=False, type='bool'),
structure=dict(choices=BOOLEANS, default=True, type='bool'), structure=dict(choices=BOOLEANS, default=True, type='bool'),
@ -580,7 +581,7 @@ def main():
src = module.params.get('src') src = module.params.get('src')
dest = module.params.get('dest') dest = module.params.get('dest')
method = module.params.get('method') method = module.params.get('method')
typ = module.params.get('typ') typ = module.params.get('type')
meta = module.params.get('meta') meta = module.params.get('meta')
clear_meta = module.params.get('clear_meta') clear_meta = module.params.get('clear_meta')
structure = module.params.get('structure') structure = module.params.get('structure')
@ -596,4 +597,4 @@ def main():
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.rax import * from ansible.module_utils.rax import *
main() main()