refactor: key capabilities on href instead of rt
OCF rt is a schema category shared by many unrelated resources. The stable unique resource address is the href. Update Capability, discovery, common capabilities, tests, and plan accordingly.
This commit is contained in:
1 parent
bdae3cc82d
commit
0499c702d7
6 files changed
+62
-66
No files matched your search
@@ -1,4 +1,4 @@
|
||||
"""A Capability binds one OCF resource type (rt) to the entities it produces."""
|
||||
"""A Capability binds one OCF resource href to the entities it produces."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
@@ -9,7 +9,7 @@ from .entities import SamsungEntityDescription
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class Capability:
|
||||
rt: str
|
||||
href: str
|
||||
entities: tuple[SamsungEntityDescription, ...]
|
||||
poll_tier: str = 'warm' # 'hot' | 'warm' | 'cold'
|
||||
observe: bool = True
|
||||
|
||||
Reference in new issue
Block a user