From d3dbc09ae0b020d42e776dd7d3aa920b13c02837 Mon Sep 17 00:00:00 2001 From: Chris Yeoh Date: Thu, 13 Jun 2013 14:48:02 +0930 Subject: Port certificates API to v3 Part 2 This patch contains the changes required to adapt the certificates extension and the corresponding unittests to the v3 framework Partially implements blueprint nova-v3-api Change-Id: If4fe7e8524ba0181b50722281f594e0a80cd49ed --- nova/tests/api/openstack/compute/plugins/v3/test_certificates.py | 6 +++--- nova/tests/fake_policy.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_certificates.py b/nova/tests/api/openstack/compute/plugins/v3/test_certificates.py index df5a7e9a1..222087872 100644 --- a/nova/tests/api/openstack/compute/plugins/v3/test_certificates.py +++ b/nova/tests/api/openstack/compute/plugins/v3/test_certificates.py @@ -15,7 +15,7 @@ from lxml import etree -from nova.api.openstack.compute.contrib import certificates +from nova.api.openstack.compute.plugins.v3 import certificates from nova import context from nova.openstack.common import rpc from nova import test @@ -44,7 +44,7 @@ class CertificatesTest(test.TestCase): def test_certificates_show_root(self): self.stubs.Set(rpc, 'call', fake_get_root_cert) - req = fakes.HTTPRequest.blank('/v2/fake/os-certificates/root') + req = fakes.HTTPRequestV3.blank('/os-certificates/root') res_dict = self.controller.show(req, 'root') cert = fake_get_root_cert(self.context) @@ -53,7 +53,7 @@ class CertificatesTest(test.TestCase): def test_certificates_create_certificate(self): self.stubs.Set(rpc, 'call', fake_create_cert) - req = fakes.HTTPRequest.blank('/v2/fake/os-certificates/') + req = fakes.HTTPRequestV3.blank('/os-certificates/') res_dict = self.controller.create(req) pk, cert = fake_create_cert(self.context) diff --git a/nova/tests/fake_policy.py b/nova/tests/fake_policy.py index ed8cc7424..70f84499a 100644 --- a/nova/tests/fake_policy.py +++ b/nova/tests/fake_policy.py @@ -112,6 +112,7 @@ policy_data = """ "compute_extension:baremetal_nodes": "", "compute_extension:cells": "", "compute_extension:certificates": "", + "compute_extension:v3:os-certificates": "", "compute_extension:cloudpipe": "", "compute_extension:cloudpipe_update": "", "compute_extension:config_drive": "", -- cgit