Disables pci plugin for v2.1 & microversions

The pci plugin was only ever merged into the v3 (now v2.1 microversions)
and never the v2 API. Since v2.1 i meant to be identical to v2 it should not
appear in v2 either.

This change disables the pci api functionality in v2.1. It will be renabled
soon after microversions is enabled using a microversion bump.

Related-Bug: 1426241
Partially implements blueprint v2-on-v3-api

Change-Id: Ifc1d6f24d5a637270154b996087a98b41133e014
This commit is contained in:
Chris Yeoh 2015-02-27 19:38:15 +10:30
parent 5ad5dcd1ec
commit 45591b6da1
8 changed files with 14 additions and 31 deletions

View File

@ -584,14 +584,6 @@
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
"updated": "2014-12-03T00:00:00Z"
},
{
"alias": "os-pci",
"description": "Pci access support.",
"links": [],
"name": "PciAccess",
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
"updated": "2014-12-03T00:00:00Z"
},
{
"alias": "os-personality",
"description": "Personality support.",
@ -809,4 +801,4 @@
"updated": "2014-12-03T00:00:00Z"
}
]
}
}

View File

@ -58,11 +58,6 @@
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-pci:pci_devices": [
{
"id": 1
}
],
"OS-SRV-USG:launched_at": "2013-09-23T13:37:00.880302",
"OS-SRV-USG:terminated_at": null,
"progress": 0,

View File

@ -59,11 +59,6 @@
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-pci:pci_devices": [
{
"id": 1
}
],
"OS-SRV-USG:launched_at": "2013-09-23T13:53:12.774549",
"OS-SRV-USG:terminated_at": null,
"progress": 0,

View File

@ -584,14 +584,6 @@
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
"updated": "2014-12-03T00:00:00Z"
},
{
"alias": "os-pci",
"description": "Pci access support.",
"links": [],
"name": "PciAccess",
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
"updated": "2014-12-03T00:00:00Z"
},
{
"alias": "os-personality",
"description": "Personality support.",
@ -809,4 +801,4 @@
"updated": "2014-12-03T00:00:00Z"
}
]
}
}

View File

@ -58,7 +58,6 @@
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-pci:pci_devices": [{"id": 1}],
"OS-SRV-USG:launched_at": "%(strtime)s",
"OS-SRV-USG:terminated_at": null,
"progress": 0,

View File

@ -59,7 +59,6 @@
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"os-extended-volumes:volumes_attached": [],
"os-pci:pci_devices": [{"id": 1}],
"OS-SRV-USG:launched_at": "%(strtime)s",
"OS-SRV-USG:terminated_at": null,
"progress": 0,

View File

@ -16,6 +16,7 @@ import collections
import mock
from oslo_serialization import jsonutils
import testtools
from nova import db
from nova import objects
@ -23,6 +24,7 @@ from nova.objects import pci_device_pool
from nova.tests.functional.v3 import api_sample_base
from nova.tests.functional.v3 import test_servers
skip_msg = "Bug 1426241"
fake_db_dev_1 = {
'created_at': None,
@ -68,6 +70,9 @@ fake_db_dev_2 = {
class ExtendedServerPciSampleJsonTest(test_servers.ServersSampleBase):
extension_name = "os-pci"
def setUp(self):
raise testtools.TestCase.skipException(skip_msg)
def test_show(self):
uuid = self._post_server()
response = self._do_get('servers/%s' % uuid)
@ -88,6 +93,7 @@ class ExtendedHyervisorPciSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
extension_name = 'os-pci'
def setUp(self):
raise testtools.TestCase.skipException(skip_msg)
super(ExtendedHyervisorPciSampleJsonTest, self).setUp()
cpu_info = collections.OrderedDict([
('arch', 'x86_64'),
@ -173,6 +179,9 @@ class ExtendedHyervisorPciSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
class PciSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
extension_name = "os-pci"
def setUp(self):
raise testtools.TestCase.skipException(skip_msg)
def _fake_pci_device_get_by_id(self, context, id):
return fake_db_dev_1

View File

@ -111,7 +111,9 @@ nova.api.v3.extensions =
networks = nova.api.openstack.compute.plugins.v3.networks:Networks
networks_associate = nova.api.openstack.compute.plugins.v3.networks_associate:NetworksAssociate
pause_server = nova.api.openstack.compute.plugins.v3.pause_server:PauseServer
pci = nova.api.openstack.compute.plugins.v3.pci:Pci
# NOTE(cyeoh): this is intentionally disabled until microversions is active.
# See https://bugs.launchpad.net/nova/+bug/1426241
# pci = nova.api.openstack.compute.plugins.v3.pci:Pci
personality = nova.api.openstack.compute.plugins.v3.personality:Personality
preserve_ephemeral_rebuild = nova.api.openstack.compute.plugins.v3.preserve_ephemeral_rebuild:PreserveEphemeralRebuild
quota_classes = nova.api.openstack.compute.plugins.v3.quota_classes:QuotaClasses