oslo_limit.fixture 模块¶
- class oslo_limit.fixture.LimitFixture(reglimits, projlimits)¶
基础:
Fixture- get_projlimit_objects(service_id=None, region_id=None, resource_name=None, project_id=None)¶
- get_reglimit_objects(service_id=None, region_id=None, resource_name=None)¶
- setUp()¶
准备 Fixture 以供使用。
不应覆盖此方法。具体的 fixture 应该实现 _setUp。仍然支持覆盖 setUp,但不推荐。
在 setUp 完成后,fixture 将具有一个或多个属性,这些属性可用于(具体取决于具体的子类)。
- 引发:
如果 _setUp 失败,则引发 MultipleExceptions。MultipleExceptions 中捕获的最后一个异常将是一个 SetupError 异常。
- 返回值:
None。
- 更改于 1.3:
覆盖 setUp 的建议已反转 - 在 1.3 之前,应该覆盖 setUp(),现在不应该覆盖。
- 更改于 1.3.1:
现在捕获 BaseException,并且只有 Exception 的子类才会被包装在 MultipleExceptions 中。