Remove 'v3' from comments in Nova API code
This patch cleans up 'v3' in the comments, by replacing 'v3' with 'v2.1'. Co-Authored-By: Ed Leafe <ed@leafe.com> Partial-Bug: #1462901 Change-Id: Ia665115e4c8c94b8d7557060201469ea10673558
This commit is contained in:
@@ -546,7 +546,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": "os-multiple-create",
|
"alias": "os-multiple-create",
|
||||||
"description": "Allow multiple create in the Create Server v3 API.",
|
"description": "Allow multiple create in the Create Server v2.1 API.",
|
||||||
"links": [],
|
"links": [],
|
||||||
"name": "MultipleCreate",
|
"name": "MultipleCreate",
|
||||||
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
|
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Using this middleware provides a convenient way to attach the
|
|||||||
x-compute-request-id to only v2 responses. Previously, this header was set in
|
x-compute-request-id to only v2 responses. Previously, this header was set in
|
||||||
api/openstack/wsgi.py
|
api/openstack/wsgi.py
|
||||||
|
|
||||||
Responses for APIv3 are taken care of by the request_id middleware provided
|
Responses for v2.1 API are taken care of by the request_id middleware provided
|
||||||
in oslo.
|
in oslo.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ALIAS = "os-admin-actions"
|
|||||||
|
|
||||||
# States usable in resetState action
|
# States usable in resetState action
|
||||||
# NOTE: It is necessary to update the schema of nova/api/openstack/compute/
|
# NOTE: It is necessary to update the schema of nova/api/openstack/compute/
|
||||||
# schemas/v3/reset_server_state.py, when updating this state_map.
|
# schemas/reset_server_state.py, when updating this state_map.
|
||||||
state_map = dict(active=vm_states.ACTIVE, error=vm_states.ERROR)
|
state_map = dict(active=vm_states.ACTIVE, error=vm_states.ERROR)
|
||||||
|
|
||||||
authorize = extensions.os_compute_authorizer(ALIAS)
|
authorize = extensions.os_compute_authorizer(ALIAS)
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ class AgentController(wsgi.Controller):
|
|||||||
# TODO(alex_xu): The agent_id should be integer that consistent with
|
# TODO(alex_xu): The agent_id should be integer that consistent with
|
||||||
# create/index actions. But parameter 'id' is string type that parsed
|
# create/index actions. But parameter 'id' is string type that parsed
|
||||||
# from url. This is a bug, but because back-compatibility, it can't be
|
# from url. This is a bug, but because back-compatibility, it can't be
|
||||||
# fixed for v2 API. This will be fixed after v3 API feature exposed by
|
# fixed for v2 API. This will be fixed in v2.1 API by Microversions in
|
||||||
# v2.1+microversions in the future. lp bug #1333494
|
# the future. lp bug #1333494
|
||||||
return {"agent": {'agent_id': id, 'version': version,
|
return {"agent": {'agent_id': id, 'version': version,
|
||||||
'url': url, 'md5hash': md5hash}}
|
'url': url, 'md5hash': md5hash}}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class CellsController(wsgi.Controller):
|
|||||||
def capacities(self, req, id=None):
|
def capacities(self, req, id=None):
|
||||||
"""Return capacities for a given cell or all cells."""
|
"""Return capacities for a given cell or all cells."""
|
||||||
# TODO(kaushikc): return capacities as a part of cell info and
|
# TODO(kaushikc): return capacities as a part of cell info and
|
||||||
# cells detail calls in v3, along with capabilities
|
# cells detail calls in v2.1, along with capabilities
|
||||||
context = req.environ['nova.context']
|
context = req.environ['nova.context']
|
||||||
authorize(context)
|
authorize(context)
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ class AgentController(object):
|
|||||||
# NOTE(alex_xu): The agent_id should be integer that consistent with
|
# NOTE(alex_xu): The agent_id should be integer that consistent with
|
||||||
# create/index actions. But parameter 'id' is string type that parsed
|
# create/index actions. But parameter 'id' is string type that parsed
|
||||||
# from url. This is a bug, but because back-compatibility, it can't be
|
# from url. This is a bug, but because back-compatibility, it can't be
|
||||||
# fixed for v2 API. This will be fixed after v3 API feature exposed by
|
# fixed for v2 API. This will be fixed in v2.1 API by Microversions in
|
||||||
# micro-version in the future. lp bug #1333494
|
# the future. lp bug #1333494
|
||||||
return {"agent": {'agent_id': id, 'version': version,
|
return {"agent": {'agent_id': id, 'version': version,
|
||||||
'url': url, 'md5hash': md5hash}}
|
'url': url, 'md5hash': md5hash}}
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class Controller(object):
|
|||||||
def capacities(self, req, id=None):
|
def capacities(self, req, id=None):
|
||||||
"""Return capacities for a given cell or all cells."""
|
"""Return capacities for a given cell or all cells."""
|
||||||
# TODO(kaushikc): return capacities as a part of cell info and
|
# TODO(kaushikc): return capacities as a part of cell info and
|
||||||
# cells detail calls in v3, along with capabilities
|
# cells detail calls in v2.1, along with capabilities
|
||||||
if not self.ext_mgr.is_loaded('os-cell-capacities'):
|
if not self.ext_mgr.is_loaded('os-cell-capacities'):
|
||||||
raise exc.HTTPNotFound()
|
raise exc.HTTPNotFound()
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ RRID_ATTRIBUTE_NAME = "return_reservation_id"
|
|||||||
|
|
||||||
|
|
||||||
class MultipleCreate(extensions.V21APIExtensionBase):
|
class MultipleCreate(extensions.V21APIExtensionBase):
|
||||||
"""Allow multiple create in the Create Server v3 API."""
|
"""Allow multiple create in the Create Server v2.1 API."""
|
||||||
|
|
||||||
name = "MultipleCreate"
|
name = "MultipleCreate"
|
||||||
alias = ALIAS
|
alias = ALIAS
|
||||||
|
|||||||
@@ -405,9 +405,9 @@ def os_compute_soft_authorizer(extension_name):
|
|||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class V21APIExtensionBase(object):
|
class V21APIExtensionBase(object):
|
||||||
"""Abstract base class for all V3 API extensions.
|
"""Abstract base class for all v2.1 API extensions.
|
||||||
|
|
||||||
All V3 API extensions must derive from this class and implement
|
All v2.1 API extensions must derive from this class and implement
|
||||||
the abstract methods get_resources and get_controller_extensions
|
the abstract methods get_resources and get_controller_extensions
|
||||||
even if they just return an empty list. The extensions must also
|
even if they just return an empty list. The extensions must also
|
||||||
define the abstract properties.
|
define the abstract properties.
|
||||||
@@ -465,7 +465,7 @@ class V21APIExtensionBase(object):
|
|||||||
|
|
||||||
|
|
||||||
def expected_errors(errors):
|
def expected_errors(errors):
|
||||||
"""Decorator for v3 API methods which specifies expected exceptions.
|
"""Decorator for v2.1 API methods which specifies expected exceptions.
|
||||||
|
|
||||||
Specify which exceptions may occur when an API method is called. If an
|
Specify which exceptions may occur when an API method is called. If an
|
||||||
unexpected exception occurs then return a 500 instead and ask the user
|
unexpected exception occurs then return a 500 instead and ask the user
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ hostname_or_ip_address = {
|
|||||||
|
|
||||||
|
|
||||||
name = {
|
name = {
|
||||||
# NOTE: Nova v3 API contains some 'name' parameters such
|
# NOTE: Nova v2.1 API contains some 'name' parameters such
|
||||||
# as keypair, server, flavor, aggregate and so on. They are
|
# as keypair, server, flavor, aggregate and so on. They are
|
||||||
# stored in the DB and Nova specific parameters.
|
# stored in the DB and Nova specific parameters.
|
||||||
# This definition is used for all their parameters.
|
# This definition is used for all their parameters.
|
||||||
|
|||||||
@@ -546,7 +546,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": "os-multiple-create",
|
"alias": "os-multiple-create",
|
||||||
"description": "Allow multiple create in the Create Server v3 API.",
|
"description": "Allow multiple create in the Create Server v2.1 API.",
|
||||||
"links": [],
|
"links": [],
|
||||||
"name": "MultipleCreate",
|
"name": "MultipleCreate",
|
||||||
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
|
"namespace": "http://docs.openstack.org/compute/ext/fake_xml",
|
||||||
|
|||||||
Reference in New Issue
Block a user