'Rename a container
:param container: The container to be renamed
:type  container: :class:`libcloud.container.base.Container`
:param name: The new name
:type  name: ``str``
:rtype: :class:`libcloud.container.base.Container`'

def ex_rename_container(self, container, name):

    result = self.connection.request(('/v%s/containers/%s/rename?name=%s' % (self.version, container.id, name)), method='POST')
    if (result.status in VALID_RESPONSE_CODES):
        return self.get_container(container.id)
