from nova.api.openstack import wsgi
from nova.api.openstack import extensions
#authorize = extensions.extension_authorizer('compute', 'storage_pool')
class Controller(wsgi.Controller):
def detail(self, req):
return {'pool_name':'ssd'}
class Storage_pool(extensions.ExtensionDescriptor):
"""self-defined Nova-api"""
name = "Storage_pool"
alias = "os-storage-pool"
namespace = "http://docs.openstack.org/compute/ext/storage_pool/api/v1.1"
updated = "2011-08-08T00:00:00Z"
def get_resources(self):
resources = []
res = extensions.ResourceExtension(
'os-storage-pool',
Controller(),
collection_actions={&
openstack kilo 扩展nova api方法
最新推荐文章于 2022-03-12 11:52:02 发布
本文详细介绍了如何在OpenStack Kilo版本中扩展Nova API,通过RESTful接口实现自定义功能。内容包括API的设计原则、扩展流程及实际操作演示。
摘要由CSDN通过智能技术生成