Search in sources :

Example 1 with FORWARDING_TABLE

use of org.onosproject.kubevirtnetworking.api.Constants.FORWARDING_TABLE in project onos by opennetworkinglab.

the class KubevirtFlowRuleManager method initializeWorkerNodePipeline.

protected void initializeWorkerNodePipeline(KubevirtNode kubevirtNode) {
    DeviceId deviceId = kubevirtNode.intgBridge();
    // for inbound table transition
    connectTables(deviceId, STAT_INBOUND_TABLE, VTAP_INBOUND_TABLE);
    connectTables(deviceId, VTAP_INBOUND_TABLE, DHCP_TABLE);
    // for DHCP and ARP table transition
    connectTables(deviceId, DHCP_TABLE, ARP_TABLE);
    // for ARP table and ACL egress table transition
    connectTables(deviceId, ARP_TABLE, ACL_EGRESS_TABLE);
    // for setting up default ARP table behavior
    setupArpTable(deviceId);
    // for setting up default Forwarding table behavior which is NORMAL
    setupNormalTable(deviceId, FORWARDING_TABLE);
    kubevirtNode.phyIntfs().stream().filter(intf -> intf.physBridge() != null).forEach(phyIntf -> {
        setupNormalTable(phyIntf.physBridge(), STAT_INBOUND_TABLE);
    });
}
Also used : DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) GATEWAY(org.onosproject.kubevirtnode.api.KubevirtNode.Type.GATEWAY) CoreService(org.onosproject.core.CoreService) PortNumber(org.onosproject.net.PortNumber) DeviceService(org.onosproject.net.device.DeviceService) Tools.groupedThreads(org.onlab.util.Tools.groupedThreads) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) FlowRuleService(org.onosproject.net.flow.FlowRuleService) ApplicationId(org.onosproject.core.ApplicationId) NodeId(org.onosproject.cluster.NodeId) GW_DROP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.GW_DROP_TABLE) Deactivate(org.osgi.service.component.annotations.Deactivate) Set(java.util.Set) GW_ENTRY_TABLE(org.onosproject.kubevirtnetworking.api.Constants.GW_ENTRY_TABLE) Executors(java.util.concurrent.Executors) Objects(java.util.Objects) EthType(org.onlab.packet.EthType) FlowRule(org.onosproject.net.flow.FlowRule) ACL_EGRESS_TABLE(org.onosproject.kubevirtnetworking.api.Constants.ACL_EGRESS_TABLE) ClusterService(org.onosproject.cluster.ClusterService) PRIORITY_ARP_DEFAULT_RULE(org.onosproject.kubevirtnetworking.api.Constants.PRIORITY_ARP_DEFAULT_RULE) DeviceId(org.onosproject.net.DeviceId) Dictionary(java.util.Dictionary) FlowRuleOperationsContext(org.onosproject.net.flow.FlowRuleOperationsContext) DHCP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.DHCP_TABLE) ARP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.ARP_TABLE) KubevirtNetworkingUtil.getPropertyValueAsBoolean(org.onosproject.kubevirtnetworking.util.KubevirtNetworkingUtil.getPropertyValueAsBoolean) Tools(org.onlab.util.Tools) KubevirtFlowRuleService(org.onosproject.kubevirtnetworking.api.KubevirtFlowRuleService) ComponentContext(org.osgi.service.component.ComponentContext) FORWARDING_TABLE(org.onosproject.kubevirtnetworking.api.Constants.FORWARDING_TABLE) KubevirtNodeService(org.onosproject.kubevirtnode.api.KubevirtNodeService) Component(org.osgi.service.component.annotations.Component) WORKER(org.onosproject.kubevirtnode.api.KubevirtNode.Type.WORKER) TrafficSelector(org.onosproject.net.flow.TrafficSelector) Activate(org.osgi.service.component.annotations.Activate) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) ExecutorService(java.util.concurrent.ExecutorService) PROVIDER_NETWORK_ONLY_DEFAULT(org.onosproject.kubevirtnetworking.impl.OsgiPropertyConstants.PROVIDER_NETWORK_ONLY_DEFAULT) KUBEVIRT_NETWORKING_APP_ID(org.onosproject.kubevirtnetworking.api.Constants.KUBEVIRT_NETWORKING_APP_ID) ComponentConfigService(org.onosproject.cfg.ComponentConfigService) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) FlowRuleOperations(org.onosproject.net.flow.FlowRuleOperations) KubevirtNode(org.onosproject.kubevirtnode.api.KubevirtNode) Logger(org.slf4j.Logger) STAT_INBOUND_TABLE(org.onosproject.kubevirtnetworking.api.Constants.STAT_INBOUND_TABLE) ReferenceCardinality(org.osgi.service.component.annotations.ReferenceCardinality) KubevirtNodeEvent(org.onosproject.kubevirtnode.api.KubevirtNodeEvent) VTAP_INBOUND_TABLE(org.onosproject.kubevirtnetworking.api.Constants.VTAP_INBOUND_TABLE) KubevirtNodeListener(org.onosproject.kubevirtnode.api.KubevirtNodeListener) PROVIDER_NETWORK_ONLY(org.onosproject.kubevirtnetworking.impl.OsgiPropertyConstants.PROVIDER_NETWORK_ONLY) ConfigProperty(org.onosproject.cfg.ConfigProperty) Modified(org.osgi.service.component.annotations.Modified) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) Reference(org.osgi.service.component.annotations.Reference) LeadershipService(org.onosproject.cluster.LeadershipService) DeviceId(org.onosproject.net.DeviceId)

Example 2 with FORWARDING_TABLE

use of org.onosproject.kubevirtnetworking.api.Constants.FORWARDING_TABLE in project onos by opennetworkinglab.

the class KubevirtFlowRuleManager method initializeGatewayNodePipeline.

protected void initializeGatewayNodePipeline(KubevirtNode kubevirtNode) {
    DeviceId deviceId = kubevirtNode.intgBridge();
    // for inbound to gateway entry table transition
    connectTables(deviceId, STAT_INBOUND_TABLE, GW_ENTRY_TABLE);
    // for gateway entry to gateway drop table transition
    connectTables(deviceId, GW_ENTRY_TABLE, GW_DROP_TABLE);
    // for setting up default gateway drop table
    setupGatewayNodeDropTable(deviceId);
    // for setting up default Forwarding table behavior which is NORMAL
    setupNormalTable(deviceId, FORWARDING_TABLE);
    kubevirtNode.phyIntfs().stream().filter(intf -> intf.physBridge() != null).forEach(phyIntf -> {
        setupNormalTable(phyIntf.physBridge(), STAT_INBOUND_TABLE);
    });
}
Also used : DefaultFlowRule(org.onosproject.net.flow.DefaultFlowRule) GATEWAY(org.onosproject.kubevirtnode.api.KubevirtNode.Type.GATEWAY) CoreService(org.onosproject.core.CoreService) PortNumber(org.onosproject.net.PortNumber) DeviceService(org.onosproject.net.device.DeviceService) Tools.groupedThreads(org.onlab.util.Tools.groupedThreads) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) FlowRuleService(org.onosproject.net.flow.FlowRuleService) ApplicationId(org.onosproject.core.ApplicationId) NodeId(org.onosproject.cluster.NodeId) GW_DROP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.GW_DROP_TABLE) Deactivate(org.osgi.service.component.annotations.Deactivate) Set(java.util.Set) GW_ENTRY_TABLE(org.onosproject.kubevirtnetworking.api.Constants.GW_ENTRY_TABLE) Executors(java.util.concurrent.Executors) Objects(java.util.Objects) EthType(org.onlab.packet.EthType) FlowRule(org.onosproject.net.flow.FlowRule) ACL_EGRESS_TABLE(org.onosproject.kubevirtnetworking.api.Constants.ACL_EGRESS_TABLE) ClusterService(org.onosproject.cluster.ClusterService) PRIORITY_ARP_DEFAULT_RULE(org.onosproject.kubevirtnetworking.api.Constants.PRIORITY_ARP_DEFAULT_RULE) DeviceId(org.onosproject.net.DeviceId) Dictionary(java.util.Dictionary) FlowRuleOperationsContext(org.onosproject.net.flow.FlowRuleOperationsContext) DHCP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.DHCP_TABLE) ARP_TABLE(org.onosproject.kubevirtnetworking.api.Constants.ARP_TABLE) KubevirtNetworkingUtil.getPropertyValueAsBoolean(org.onosproject.kubevirtnetworking.util.KubevirtNetworkingUtil.getPropertyValueAsBoolean) Tools(org.onlab.util.Tools) KubevirtFlowRuleService(org.onosproject.kubevirtnetworking.api.KubevirtFlowRuleService) ComponentContext(org.osgi.service.component.ComponentContext) FORWARDING_TABLE(org.onosproject.kubevirtnetworking.api.Constants.FORWARDING_TABLE) KubevirtNodeService(org.onosproject.kubevirtnode.api.KubevirtNodeService) Component(org.osgi.service.component.annotations.Component) WORKER(org.onosproject.kubevirtnode.api.KubevirtNode.Type.WORKER) TrafficSelector(org.onosproject.net.flow.TrafficSelector) Activate(org.osgi.service.component.annotations.Activate) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) ExecutorService(java.util.concurrent.ExecutorService) PROVIDER_NETWORK_ONLY_DEFAULT(org.onosproject.kubevirtnetworking.impl.OsgiPropertyConstants.PROVIDER_NETWORK_ONLY_DEFAULT) KUBEVIRT_NETWORKING_APP_ID(org.onosproject.kubevirtnetworking.api.Constants.KUBEVIRT_NETWORKING_APP_ID) ComponentConfigService(org.onosproject.cfg.ComponentConfigService) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) FlowRuleOperations(org.onosproject.net.flow.FlowRuleOperations) KubevirtNode(org.onosproject.kubevirtnode.api.KubevirtNode) Logger(org.slf4j.Logger) STAT_INBOUND_TABLE(org.onosproject.kubevirtnetworking.api.Constants.STAT_INBOUND_TABLE) ReferenceCardinality(org.osgi.service.component.annotations.ReferenceCardinality) KubevirtNodeEvent(org.onosproject.kubevirtnode.api.KubevirtNodeEvent) VTAP_INBOUND_TABLE(org.onosproject.kubevirtnetworking.api.Constants.VTAP_INBOUND_TABLE) KubevirtNodeListener(org.onosproject.kubevirtnode.api.KubevirtNodeListener) PROVIDER_NETWORK_ONLY(org.onosproject.kubevirtnetworking.impl.OsgiPropertyConstants.PROVIDER_NETWORK_ONLY) ConfigProperty(org.onosproject.cfg.ConfigProperty) Modified(org.osgi.service.component.annotations.Modified) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) Reference(org.osgi.service.component.annotations.Reference) LeadershipService(org.onosproject.cluster.LeadershipService) DeviceId(org.onosproject.net.DeviceId)

Aggregations

Dictionary (java.util.Dictionary)2 Objects (java.util.Objects)2 Set (java.util.Set)2 ExecutorService (java.util.concurrent.ExecutorService)2 Executors (java.util.concurrent.Executors)2 EthType (org.onlab.packet.EthType)2 Tools (org.onlab.util.Tools)2 Tools.groupedThreads (org.onlab.util.Tools.groupedThreads)2 ComponentConfigService (org.onosproject.cfg.ComponentConfigService)2 ConfigProperty (org.onosproject.cfg.ConfigProperty)2 ClusterService (org.onosproject.cluster.ClusterService)2 LeadershipService (org.onosproject.cluster.LeadershipService)2 NodeId (org.onosproject.cluster.NodeId)2 ApplicationId (org.onosproject.core.ApplicationId)2 CoreService (org.onosproject.core.CoreService)2 ACL_EGRESS_TABLE (org.onosproject.kubevirtnetworking.api.Constants.ACL_EGRESS_TABLE)2 ARP_TABLE (org.onosproject.kubevirtnetworking.api.Constants.ARP_TABLE)2 DHCP_TABLE (org.onosproject.kubevirtnetworking.api.Constants.DHCP_TABLE)2 FORWARDING_TABLE (org.onosproject.kubevirtnetworking.api.Constants.FORWARDING_TABLE)2 GW_DROP_TABLE (org.onosproject.kubevirtnetworking.api.Constants.GW_DROP_TABLE)2