diff options
author | Abhishek Patil <abhishek.patil@t-systems.com> | 2023-07-27 16:32:17 +0530 |
---|---|---|
committer | Abhishek Patil <abhishek.patil@t-systems.com> | 2023-07-27 19:17:15 +0530 |
commit | 3d3d3574f1012a7faa6cf86d55884cf0884decbf (patch) | |
tree | 2e74807f6258f496cd02ef0d9ca3915a23294953 /tests/test_so_instantiation.py | |
parent | 48f63ef8e43f789cc6d364d387df289094edfc25 (diff) |
ONAP SDK to add new PNF functionality
Issue-ID: TEST-401
Change-Id: Ib603b9aaad43bb8c55ff5c2c23cd9a1a36475de9
Signed-off-by: Abhishek Patil <abhishek.patil@t-systems.com>
Diffstat (limited to 'tests/test_so_instantiation.py')
-rw-r--r-- | tests/test_so_instantiation.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/test_so_instantiation.py b/tests/test_so_instantiation.py index 3babdd3..200dd11 100644 --- a/tests/test_so_instantiation.py +++ b/tests/test_so_instantiation.py @@ -34,7 +34,8 @@ from onapsdk.so.instantiation import ( PnfInstantiation, PnfRegistrationParameters, ServiceOperation, - VnfOperation + VnfOperation, + PnfInstantiation ) from onapsdk.vid import Vid from onapsdk.aai.business.owning_entity import OwningEntity @@ -109,7 +110,21 @@ def test_service_macro_instantiation(mock_service_instantiation_send_message): line_of_business=mock.MagicMock(), platform=mock.MagicMock(), service_instance_name="test", - service_subscription=mock.MagicMock()) + service_subscription=mock.MagicMock(), + skip_pnf_registration_event=True) + assert service_instance.name == "test" + + service_instance = ServiceInstantiation. \ + instantiate_macro(sdc_service=mock_sdc_service, + cloud_region=mock.MagicMock(), + tenant=mock.MagicMock(), + customer=mock.MagicMock(), + owning_entity=mock.MagicMock(), + project=mock.MagicMock(), + line_of_business=mock.MagicMock(), + platform=mock.MagicMock(), + service_instance_name="test", + service_subscription=mock.MagicMock()) assert service_instance.name == "test" service_instance = ServiceInstantiation.\ @@ -366,8 +381,6 @@ def test_pnf_instantiation_macro(mock_owning_entity_get, mock_pnf_instantiation_ pnf_object=mock.MagicMock(), line_of_business="test_lob", platform="test_platform", - cloud_region=mock.MagicMock(), - tenant=mock.MagicMock(), sdc_service=mock.MagicMock()) assert pnf_instantiation.name.startswith("Python_ONAP_SDK_pnf_instance_") mock_pnf_instantiation_send_message.assert_called_once() @@ -383,8 +396,6 @@ def test_pnf_instantiation_macro(mock_owning_entity_get, mock_pnf_instantiation_ line_of_business="test_lob", platform="test_platform", pnf_instance_name="test", - cloud_region=mock.MagicMock(), - tenant=mock.MagicMock(), sdc_service=mock.MagicMock()) assert pnf_instantiation.name == "test" @@ -393,8 +404,6 @@ def test_pnf_instantiation_macro(mock_owning_entity_get, mock_pnf_instantiation_ pnf_object=mock.MagicMock(), line_of_business="test_lob", platform="test_platform", - cloud_region=mock.MagicMock(), - tenant=mock.MagicMock(), sdc_service=mock.MagicMock(), so_pnf=mock.MagicMock()) assert pnf_instantiation.name.startswith("Python_ONAP_SDK_service_instance_") @@ -406,8 +415,6 @@ def test_pnf_instantiation_macro(mock_owning_entity_get, mock_pnf_instantiation_ pnf_object=mock.MagicMock(), line_of_business="test_lob", platform="test_platform", - cloud_region=mock.MagicMock(), - tenant=mock.MagicMock(), sdc_service=mock.MagicMock(), so_pnf=so_pnf_mock) assert pnf_instantiation.name == "SoPnfInstanceName" @@ -981,8 +988,6 @@ def test_pnf_instantiation_so_service(mock_owning_entity_get, mock_send_message_ pnf_object=mock.MagicMock(), line_of_business="test_lob", platform="test_platform", - cloud_region=mock.MagicMock(), - tenant=mock.MagicMock(), sdc_service=mock.MagicMock(), so_pnf=so_pnf) |