'List the objects in a container, given the container name
Returns the container object listing as a plain text list, or as
xml or json if that option is specified via the \'format\' argument.
Optional Arguments:
limit = integer
For an integer value n, limits the number of results to at most
n values.
marker = \'string\'
Given a string value x, return object names greater in value
than the specified marker.
prefix = \'string\'
For a string value x, causes the results to be limited to names
beginning with the substring x.
format = \'json\' or \'xml\'
Specify either json or xml to return the respective serialized
response.
If json, returns a list of json objects
if xml, returns a string of xml
path = \'string\'
For a string value x, return the object names nested in the
pseudo path (assuming preconditions are met - see below).
delimiter = \'character\'
For a character c, return all the object names nested in the
container (without the need for the directory marker objects).'

def list_container_contents(self, container, params=None):

    url = str(container)
    if params:
        url += '?'
        url += ('&%s' % urllib.urlencode(params))
    (resp, body) = self.get(url, headers={})
    if (params and (params.get('format') == 'json')):
        body = json.loads(body)
    elif (params and (params.get('format') == 'xml')):
        body = etree.fromstring(body)
    else:
        body = [obj_name for obj_name in body.decode().split('\n') if obj_name]
    self.expected_success([200, 204], resp.status)
    return (resp, body)
