diff options
author | 2023-03-03 08:11:10 +0000 | |
---|---|---|
committer | 2023-03-03 08:24:25 +0000 | |
commit | 70c6a75709b0001e9ffe26987563e14e3e6c6b3d (patch) | |
tree | 0a439f2fa76985e45c42925c1c78504e1ff9b4a9 /src/onapsdk/sdc/sdc_element.py | |
parent | 04d216408b1fe94337775a6e528175733d055f25 (diff) |
Archive Vendor Software Product
Add a method to archive SDC VSP resource
Issue-ID: INT-2193
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: If643ff47e6b7385eff5d745a5896bf4cb76c5c67
Diffstat (limited to 'src/onapsdk/sdc/sdc_element.py')
-rw-r--r-- | src/onapsdk/sdc/sdc_element.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/onapsdk/sdc/sdc_element.py b/src/onapsdk/sdc/sdc_element.py index f82fcb2..9273861 100644 --- a/src/onapsdk/sdc/sdc_element.py +++ b/src/onapsdk/sdc/sdc_element.py @@ -115,7 +115,7 @@ class SdcElement(SdcOnboardable, ABC): """ subpath = self._sdc_path() - if action == const.COMMIT: + if action in (const.COMMIT, const.ARCHIVE): subpath = "items" return subpath @@ -129,10 +129,7 @@ class SdcElement(SdcOnboardable, ABC): """ return "{}/versions/{}".format(self.identifier, self.version) - @staticmethod - def _action_url(base: str, - subpath: str, - version_path: str, + def _action_url(self, base: str, subpath: str, version_path: str, action_type: str = None) -> str: """ Generate action URL for SDC. @@ -183,7 +180,7 @@ class SdcElement(SdcOnboardable, ABC): str: Url which can be used to delete SDC element """ - return f"{self._get_all_url()}/{self.identifier}" + return f"{self._base_url()}/{self._sdc_path()}/{self.identifier}" def _copy_object(self, obj: 'SdcElement') -> None: """ |