summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java3
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/GetResources.json24
2 files changed, 25 insertions, 2 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
index 7bba136da2..974315374a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
@@ -162,7 +162,8 @@ public class HeatStackAudit {
auditVserver.setLInterfaces(new LInterfaces());
auditVserver.setVserverId(novaResource.getPhysicalResourceId());
Stream<Resource> filteredNeutronNetworks = resources.getList().stream()
- .filter(network -> network.getRequiredBy().contains(novaResource.getLogicalResourceId()));
+ .filter(resource -> resource.getRequiredBy().contains(novaResource.getLogicalResourceId()))
+ .filter(resource -> "OS::Neutron::Port".equals(resource.getType()));
filteredNeutronNetworks.forEach(network -> {
LInterface lInterface = new LInterface();
lInterface.setInterfaceId(network.getPhysicalResourceId());
diff --git a/adapters/mso-openstack-adapters/src/test/resources/GetResources.json b/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
index 6e2bad38a4..22e66d41bb 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
+++ b/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
@@ -1,5 +1,27 @@
{
"resources": [
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/99cecb7b19dc4690960761abd0fe2413/stacks/zdyh3brlba05_addon/03840be2-7ce6-4e38-a748-dbd59a798732/resources/vlbagent_eph_aff_id",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/99cecb7b19dc4690960761abd0fe2413/stacks/zdyh3brlba05_addon/03840be2-7ce6-4e38-a748-dbd59a798732",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "vlbagent_eph_aff_id",
+ "physical_resource_id": "zdyh3brlba05_addon-vlbagent_eph_aff_id-euhxoicxsgso",
+ "required_by": [
+ "ssc_server_1"
+ ],
+ "resource_name": "vlbagent_eph_aff_id",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::Heat::RandomString",
+ "updated_time": "2019-02-07T22:56:12Z"
+ },
{
"resource_name": "ssc_1_trusted_port_0",
"links": [
@@ -203,4 +225,4 @@
"resource_type": "OS::Heat::ResourceGroup"
}
]
-} \ No newline at end of file
+}