openstack.accelerator.v2.device_profile¶
DeviceProfile 类¶
DeviceProfile 类继承自 Resource。
- class openstack.accelerator.v2.device_profile.DeviceProfile(_synchronized=False, connection=None, **attrs)¶
基础资源
- 参数:
_synchronized (bool) – 这不打算直接使用。请参阅
new()和existing()。connection (openstack.connection.Connection) – 对正在使用的 Connection 的引用。默认为 None,允许在单元测试中等情况下使用不带活动 Connection 的 Resource 对象。Resource 代码中对
self._connection的使用应使用 None 检查进行保护。
- resource_key = 'device_profile'¶
资源的单数形式的键。
- resources_key = 'device_profiles'¶
资源的复数形式的键。
- base_path = '/device_profiles'¶
此资源的 URI 的基本部分。
- allow_create = True¶
允许对此资源进行创建操作。
- allow_fetch = True¶
允许对此资源进行获取操作。
- allow_commit = False¶
允许对此资源进行更新操作。
- allow_delete = True¶
允许对此资源进行删除操作。
- allow_list = True¶
允许对此资源进行列表操作。
- created_at¶
此 device_profile 创建的时间戳。
- description¶
设备配置文件的描述
- groups¶
设备配置文件的组
- name¶
设备配置文件的名称
- updated_at¶
此 device_profile 更新的时间戳。
- uuid¶
设备配置文件的 UUID
- create(session, prepend_key=False, **args, **kwargs)¶
基于此实例创建远程资源。
- 参数:
session (
Adapter) – 用于发出此请求的会话。prepend_key – 一个布尔值,指示是否应在资源创建请求中将 resource_key 附加到请求体之前。默认为 True。
base_path (str) – 创建资源的 URI 的基本部分,如果与
base_path不同。resource_request_key (str) – 覆盖在将键附加到请求体时使用 self.resource_key 的用法。如果 prepend_key 为 false,则忽略。
resource_response_key (str) – 覆盖在处理响应体时使用 self.resource_key 的用法。如果 prepend_key 为 false,则忽略。
microversion (str) – 覆盖协商版本使用的 API 版本。
params (dict) – 传递的额外参数。
- 返回值:
此
Resource实例。- 引发:
MethodNotSupported如果Resource.allow_create未设置为True。