diff options
author | peukerl@telekom.de <peukerl@telekom.de> | 2023-06-16 09:05:05 +0200 |
---|---|---|
committer | peukerl@telekom.de <peukerl@telekom.de> | 2023-06-19 11:02:25 +0200 |
commit | bb7533ad0175979f893724eed272148ff65f438c (patch) | |
tree | 6de9e642b0366d7f86d9556b3c2585a0480e163d /src/onapsdk/aai | |
parent | a13ff9ac968ddced994205539a494ecbdb2d6b34 (diff) |
pnf-functionalities added, parameters for service-instantiation added
Issue-ID: INT-2250
Signed-off-by: peukerl@telekom.de <peukerl@telekom.de>
Change-Id: I71d7ea0e05be0571a195c093a59fe3d08a138493
Diffstat (limited to 'src/onapsdk/aai')
-rw-r--r-- | src/onapsdk/aai/business/pnf.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/onapsdk/aai/business/pnf.py b/src/onapsdk/aai/business/pnf.py index 9061ebf..9f5394f 100644 --- a/src/onapsdk/aai/business/pnf.py +++ b/src/onapsdk/aai/business/pnf.py @@ -16,6 +16,7 @@ from typing import Iterator, Optional, TYPE_CHECKING from onapsdk.exceptions import ResourceNotFound +from onapsdk.so.deletion import PnfDeletionRequest from .instance import Instance if TYPE_CHECKING: @@ -254,14 +255,17 @@ class PnfInstance(Instance): # pylint: disable=too-many-instance-attributes pnf_ipv4_address=api_response.get("pnf-ipv4-address"), pnf_ipv6_address=api_response.get("pnf-ipv6-address")) - def delete(self, a_la_carte: bool = True) -> None: - """Delete Pnf instance. + def delete(self, a_la_carte: bool = True) -> "PnfDeletionRequest": + """Create PNF deletion request. - PNF deletion it's just A&AI resource deletion. That's difference between another instances. - You don't have to wait for that task finish, because it's not async task. + Send request to delete PNF instance + + Args: + a_la_carte (boolean): deletion mode + + Returns: + PnfDeletionRequest: Deletion request """ self._logger.debug("Delete %s pnf", self.pnf_name) - self.send_message("DELETE", - f"Delete {self.pnf_name} PNF", - f"{self.url}?resource-version={self.resource_version}") + return PnfDeletionRequest.send_request(self, a_la_carte) |