def _setup_cg_data(self, cg=None):
        if cg is None:
            cg = db_utils.create_consistency_group(
                status=constants.STATUS_AVAILABLE)
        req = webob.Request.blank('/v2/fake/consistency-groups/%s/action' %
                                  cg['id'])
        req.headers[wsgi.API_VERSION_REQUEST_HEADER] = '2.4'
        req.headers[wsgi.EXPERIMENTAL_API_REQUEST_HEADER] = 'True'

        return cg, req
Exemple #2
0
    def _setup_cg_data(self, cg=None, version='2.7'):
        if cg is None:
            cg = db_utils.create_consistency_group(
                status=constants.STATUS_AVAILABLE)
        req = fakes.HTTPRequest.blank('/v2/fake/consistency-groups/%s/action' %
                                      cg['id'], version=version)
        req.headers[wsgi.API_VERSION_REQUEST_HEADER] = version
        req.headers[wsgi.EXPERIMENTAL_API_REQUEST_HEADER] = 'True'

        return cg, req