Add OS-SCH-HNT in extensions list
To have backward compatibility with MV 3.53, we need to include OS-SCH-HNT in the ``cinder list-extensions`` response. Change-Id: I9da1af4ac6df1d033a9baaba77135b329c87e6f8 Closes-Bug: #1831623
This commit is contained in:
parent
d247445712
commit
9a5bdb308a
@ -216,6 +216,13 @@
|
|||||||
"links": [],
|
"links": [],
|
||||||
"name": "Scheduler_stats",
|
"name": "Scheduler_stats",
|
||||||
"updated": "2014-09-07T00:00:00+00:00"
|
"updated": "2014-09-07T00:00:00+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "OS-SCH-HNT",
|
||||||
|
"description": "Pass arbitrary key/value pairs to the scheduler.",
|
||||||
|
"links": [],
|
||||||
|
"name": "SchedulerHints",
|
||||||
|
"updated": "2013-04-18T00:00:00+00:00"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -12,6 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from cinder.api import extensions
|
||||||
from cinder.api.schemas import scheduler_hints
|
from cinder.api.schemas import scheduler_hints
|
||||||
from cinder.api import validation
|
from cinder.api import validation
|
||||||
|
|
||||||
@ -31,3 +32,13 @@ def create(req, body):
|
|||||||
_validate_scheduler_hints(req=req, body=scheduler_hints_body)
|
_validate_scheduler_hints(req=req, body=scheduler_hints_body)
|
||||||
body['volume']['scheduler_hints'] = scheduler_hints_body.get(attr)
|
body['volume']['scheduler_hints'] = scheduler_hints_body.get(attr)
|
||||||
return body
|
return body
|
||||||
|
|
||||||
|
|
||||||
|
# NOTE: This class is added to include "OS-SCH-HNT" in the list extensions
|
||||||
|
# response and "OS-SCH-HNT" is still not loaded as a standard extension.
|
||||||
|
class Scheduler_hints(extensions.ExtensionDescriptor):
|
||||||
|
"""Pass arbitrary key/value pairs to the scheduler."""
|
||||||
|
|
||||||
|
name = "SchedulerHints"
|
||||||
|
alias = "OS-SCH-HNT"
|
||||||
|
updated = "2013-04-18T00:00:00+00:00"
|
||||||
|
@ -31,7 +31,7 @@ import cinder.policy
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
FILES_TO_SKIP = ['resource_common_manage.py', 'scheduler_hints.py']
|
FILES_TO_SKIP = ['resource_common_manage.py']
|
||||||
|
|
||||||
|
|
||||||
class ExtensionDescriptor(object):
|
class ExtensionDescriptor(object):
|
||||||
|
@ -216,6 +216,13 @@
|
|||||||
"links": [],
|
"links": [],
|
||||||
"name": "Scheduler_stats",
|
"name": "Scheduler_stats",
|
||||||
"updated": "%(extension_update)s"
|
"updated": "%(extension_update)s"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "OS-SCH-HNT",
|
||||||
|
"description": "Pass arbitrary key/value pairs to the scheduler.",
|
||||||
|
"links": [],
|
||||||
|
"name": "SchedulerHints",
|
||||||
|
"updated": "%(extension_update)s"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user