'Return a generator of objects for the given container.
:param container: Container instance
:type container: :class:`Container`
:param ex_prefix: Only get objects with names starting with ex_prefix
:type ex_prefix: ``str``
:return: A generator of Object instances.
:rtype: ``generator`` of :class:`Object`'

def iterate_container_objects(self, container, ex_prefix=None):

    params = {}
    if ex_prefix:
        params['prefix'] = ex_prefix
    while True:
        container_name_encoded = self._encode_container_name(container.name)
        response = self.connection.request(('/%s' % container_name_encoded), params=params)
        if (response.status == httplib.NO_CONTENT):
            break
        elif (response.status == httplib.OK):
            objects = self._to_object_list(json.loads(response.body), container)
            if (len(objects) == 0):
                break
            for obj in objects:
                (yield obj)
            params['marker'] = obj.name
        else:
            raise LibcloudError(('Unexpected    status    code:    %s' % response.status))
