aboutsummaryrefslogtreecommitdiffstats
path: root/src/onapsdk/sdc/vendor.py
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2023-03-14 14:13:21 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2023-03-14 14:13:21 +0000
commit2c63b984358cee239966846457acd4f1d8831b70 (patch)
tree478dd6f6a83af066ea8c12d208edaa38fd8bee5a /src/onapsdk/sdc/vendor.py
parentce25f900f0115cdf8ec6c2ac3a98d7c62079ea8c (diff)
Version 10.4.2
Archive SDC Vendor Issue-ID: INT-2193 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I520ca35a973eb52f3d5625cc282c88bdd06effff
Diffstat (limited to 'src/onapsdk/sdc/vendor.py')
-rw-r--r--src/onapsdk/sdc/vendor.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/onapsdk/sdc/vendor.py b/src/onapsdk/sdc/vendor.py
index a82e3b9..0618a4f 100644
--- a/src/onapsdk/sdc/vendor.py
+++ b/src/onapsdk/sdc/vendor.py
@@ -46,6 +46,17 @@ class Vendor(SdcElement):
super().__init__()
self.name: str = name or "Generic-Vendor"
+ @classmethod
+ def _get_all_url(cls) -> str:
+ """
+ Get URL for all elements in SDC.
+
+ Returns:
+ str: the url
+
+ """
+ return f"{cls._base_url()}/items?itemType=vlm"
+
def onboard(self) -> None:
"""Onboard the vendor in SDC."""
if not self.status:
@@ -106,3 +117,8 @@ class Vendor(SdcElement):
def _sdc_path(cls) -> None:
"""Give back the end of SDC path."""
return cls.VENDOR_PATH
+
+ def archive(self) -> None:
+ """Archive Vendor."""
+ self._action_to_sdc(const.ARCHIVE, action_type=const.ARCHIVE)
+ self._status = const.ARCHIVED