@@ -14,11 +14,12 @@ import {
1414 NodeShape ,
1515 NodeStatus ,
1616} from '@patternfly/react-topology' ;
17+ import { BASE_IFACE , LINK_AGGREGATION } from '@utils/constants' ;
1718import { isEmpty } from '@utils/helpers' ;
1819
1920import BridgeIcon from '../components/BridgeIcon' ;
2021
21- import { GROUP , NODE_DIAMETER } from './constants' ;
22+ import { BR_INT , GENEV_SYS_PREFIX , GROUP , NODE_DIAMETER , OVN_K8S_MP0 } from './constants' ;
2223
2324const statusMap : { [ key : string ] : NodeStatus } = {
2425 up : NodeStatus . success ,
@@ -27,10 +28,13 @@ const statusMap: { [key: string]: NodeStatus } = {
2728} ;
2829
2930const networkTypeLevelMap = {
31+ [ InterfaceType . OVS_INTERFACE ] : 1 ,
32+ [ InterfaceType . OVS_BRIDGE ] : 2 ,
3033 [ InterfaceType . LINUX_BRIDGE ] : 2 ,
3134 [ InterfaceType . VLAN ] : 3 ,
3235 [ InterfaceType . BOND ] : 4 ,
3336 [ InterfaceType . ETHERNET ] : 5 ,
37+ [ InterfaceType . INFINIBAND ] : 5 ,
3438} ;
3539
3640export const networkNodeLevel = new Proxy ( networkTypeLevelMap , {
@@ -58,25 +62,30 @@ const getIcon = (iface: NodeNetworkConfigurationInterface) => {
5862const createNodes = (
5963 nnsName : string ,
6064 interfaces : NodeNetworkConfigurationInterface [ ] ,
61- nnceConfigredInterfaces : NodeNetworkConfigurationInterface [ ] ,
65+ nnceConfiguredInterfaces : NodeNetworkConfigurationInterface [ ] ,
6266) : NodeModel [ ] =>
6367 interfaces . map ( ( iface ) => {
64- const isDerivedFromPolicy = findInterfaceByName ( nnceConfigredInterfaces , iface . name ) ;
68+ const isDerivedFromPolicy = findInterfaceByName ( nnceConfiguredInterfaces , iface . name ) ;
6569 return {
6670 id : `${ nnsName } ~${ iface . name } ~${ iface . type } ` ,
6771 type : ModelKind . node ,
6872 label : iface . name ,
6973 width : NODE_DIAMETER ,
7074 height : NODE_DIAMETER ,
71- visible : ! iface . patch && iface . type !== InterfaceType . LOOPBACK ,
75+ visible :
76+ ! iface . patch &&
77+ iface . type !== InterfaceType . LOOPBACK &&
78+ iface . name !== OVN_K8S_MP0 &&
79+ iface . name !== BR_INT &&
80+ ! iface . name . startsWith ( GENEV_SYS_PREFIX ) ,
7281 shape : isDerivedFromPolicy ? NodeShape . circle : NodeShape . rect ,
7382 status : getStatus ( iface ) ,
7483 data : {
7584 icon : getIcon ( iface ) ,
7685 type : iface . type ,
7786 bridgePorts : iface . bridge ?. port ,
78- bondPorts : iface [ 'link-aggregation' ] ?. port ,
79- vlanBaseInterface : iface . vlan ?. [ 'base-iface' ] ,
87+ bondPorts : iface [ LINK_AGGREGATION ] ?. port ,
88+ vlanBaseInterface : iface . vlan ?. [ BASE_IFACE ] ,
8089 level : networkNodeLevel [ iface . type ] ,
8190 isDerivedFromPolicy,
8291 } ,
0 commit comments