Skip to content

Commit

Permalink
add ops.Resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaqq committed Jan 31, 2025
1 parent 397a3eb commit cb82876
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ops/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def uuid(self) -> str:
"""
return self._backend.model_uuid

# FIXME maybe skip this?
@tracer.start_as_current_span('ops.Model.get_unit') # type: ignore
def get_unit(self, unit_name: str) -> 'Unit':
"""Get an arbitrary unit by name.
Expand Down Expand Up @@ -2171,6 +2172,7 @@ def __init__(self, names: Iterable[str], backend: '_ModelBackend'):
self._backend = backend
self._paths: Dict[str, Optional[Path]] = {name: None for name in names}

@tracer.start_as_current_span("ops.Resources.fetch") # type: ignore
def fetch(self, name: str) -> Path:
"""Fetch the resource from the controller or store.
Expand Down

0 comments on commit cb82876

Please sign in to comment.