Change-Id: Ie2e119fdc24168f2ab4df26332244586c644912f
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
NeutronCRUDInterfaces interfaces = new NeutronCRUDInterfaces().fetchINeutronSecurityGroupCRUD(this);
INeutronSecurityGroupCRUD sgIf = interfaces.getSecurityGroupInterface();
for (Uuid sgUuid : port.getSecurityGroups()) {
- allGroups.add(sgIf.getNeutronSecurityGroup(sgUuid.getValue()));
+ NeutronSecurityGroup secGroup = sgIf.getNeutronSecurityGroup(sgUuid.getValue());
+ if (secGroup != null) {
+ allGroups.add(sgIf.getNeutronSecurityGroup(sgUuid.getValue()));
+ }
}
List<NeutronSecurityGroup> groups = new ArrayList<>();
groups.addAll(allGroups);
NeutronCRUDInterfaces interfaces = new NeutronCRUDInterfaces().fetchINeutronSecurityGroupCRUD(this);
INeutronSecurityGroupCRUD sgIf = interfaces.getSecurityGroupInterface();
for (Uuid sgUuid : port.getSecurityGroups()) {
- allGroups.add(sgIf.getNeutronSecurityGroup(sgUuid.getValue()));
+ NeutronSecurityGroup secGroup = sgIf.getNeutronSecurityGroup(sgUuid.getValue());
+ if (secGroup != null) {
+ allGroups.add(sgIf.getNeutronSecurityGroup(sgUuid.getValue()));
+ }
}
List<NeutronSecurityGroup> groups = new ArrayList<>();
groups.addAll(allGroups);