diff --git a/bfabric/entities/storage.py b/bfabric/entities/storage.py index 475427fc..edbe0dfa 100644 --- a/bfabric/entities/storage.py +++ b/bfabric/entities/storage.py @@ -1,7 +1,8 @@ from __future__ import annotations from functools import cached_property -from typing import Any, TYPE_CHECKING +from pathlib import Path +from typing import Any from bfabric import Bfabric from bfabric.entities.core.entity import Entity @@ -13,12 +14,9 @@ class Storage(Entity): def __init__(self, data_dict: dict[str, Any], client: Bfabric | None) -> None: super().__init__(data_dict=data_dict, client=client) - @cached_property - def scp_prefix_no_path(self) -> str: - """SCP prefix without storage base path included.""" - return f"{self.data_dict['host']}:" + base_path = property(lambda self: Path(self.data_dict["basepath"])) @cached_property - def scp_prefix_full(self) -> str: + def scp_prefix(self) -> str: """SCP prefix with storage base path included.""" - return f"{self.scp_prefix_no_path}{self.data_dict['basepath']}" + return f"{self.data_dict['host']}:{self.data_dict['basepath']}"