import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestrator;
import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestratorImpl;
import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.ArpResponderService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.ClassifierService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.EgressAclService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.InboundNatService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.IngressAclService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.L2ForwardingService;
import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.L2RewriteService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.LoadBalancerService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.OutboundNatService;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.RoutingService;
import org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService;
import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService;
OF10Provider.class,
OF13Provider.class,
PipelineOrchestratorImpl.class,
- L2RewriteService.class};
+ ClassifierService.class,
+ ArpResponderService.class,
+ InboundNatService.class,
+ IngressAclService.class,
+ LoadBalancerService.class,
+ RoutingService.class,
+ L2RewriteService.class,
+ L2ForwardingService.class,
+ EgressAclService.class,
+ OutboundNatService.class};
return res;
}
c.add(createServiceDependency().setService(MdsalConsumer.class).setRequired(true));
}
+ if (imp.equals(PipelineOrchestratorImpl.class)) {
+ c.setInterface(PipelineOrchestrator.class.getName(), null);
+ c.add(createServiceDependency()
+ .setService(AbstractServiceInstance.class)
+ .setCallbacks("registerService", "unregisterService"));
+ }
+
+ if (AbstractServiceInstance.class.isAssignableFrom((Class)imp)) {
+ c.add(createServiceDependency()
+ .setService(PipelineOrchestrator.class)
+ .setRequired(true));
+ c.add(createServiceDependency().setService(MdsalConsumer.class).setRequired(true));
+ }
+
+ if (imp.equals(ClassifierService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.CLASSIFIER);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
+ if (imp.equals(ArpResponderService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.ARP_RESPONDER);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
+ if (imp.equals(InboundNatService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.INBOUND_NAT);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
+ if (imp.equals(IngressAclService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.INGRESS_ACL);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
+ if (imp.equals(LoadBalancerService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.LOAD_BALANCER);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
+ if (imp.equals(RoutingService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.ROUTING);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
+
if (imp.equals(L2RewriteService.class)) {
Properties properties = new Properties();
properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.L2_REWRITE);
c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
- c.add(createServiceDependency()
- .setService(PipelineOrchestrator.class)
- .setRequired(true));
- c.add(createServiceDependency().setService(MdsalConsumer.class).setRequired(true));
+ if (imp.equals(L2ForwardingService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.L2_FORWARDING);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
}
- if (imp.equals(PipelineOrchestratorImpl.class)) {
- c.setInterface(PipelineOrchestrator.class.getName(), null);
- c.add(createServiceDependency()
- .setService(AbstractServiceInstance.class)
- .setCallbacks("registerService", "unregisterService"));
+ if (imp.equals(IngressAclService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.INGRESS_ACL);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
}
+ if (imp.equals(OutboundNatService.class)) {
+ Properties properties = new Properties();
+ properties.put(AbstractServiceInstance.SERVICE_PROPERTY, Service.OUTBOUND_NAT);
+ c.setInterface(AbstractServiceInstance.class.getName(), properties);
+ }
}
}
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class ArpResponderService extends AbstractServiceInstance {
+ public ArpResponderService() {
+ super(Service.ARP_RESPONDER);
+ }
+
+ public ArpResponderService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class ClassifierService extends AbstractServiceInstance {
+ public ClassifierService() {
+ super(Service.CLASSIFIER);
+ }
+
+ public ClassifierService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class EgressAclService extends AbstractServiceInstance {
+ public EgressAclService() {
+ super(Service.EGRESS_ACL);
+ }
+
+ public EgressAclService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class InboundNatService extends AbstractServiceInstance {
+ public InboundNatService() {
+ super(Service.INBOUND_NAT);
+ }
+
+ public InboundNatService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class IngressAclService extends AbstractServiceInstance {
+ public IngressAclService() {
+ super(Service.INGRESS_ACL);
+ }
+
+ public IngressAclService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class L2ForwardingService extends AbstractServiceInstance {
+ public L2ForwardingService() {
+ super(Service.L2_FORWARDING);
+ }
+
+ public L2ForwardingService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class LoadBalancerService extends AbstractServiceInstance {
+ public LoadBalancerService() {
+ super(Service.LOAD_BALANCER);
+ }
+
+ public LoadBalancerService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class OutboundNatService extends AbstractServiceInstance {
+ public OutboundNatService() {
+ super(Service.OUTBOUND_NAT);
+ }
+
+ public OutboundNatService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Madhu Venugopal
+ */
+package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
+
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
+
+public class RoutingService extends AbstractServiceInstance {
+ public RoutingService() {
+ super(Service.ROUTING);
+ }
+
+ public RoutingService(Service service) {
+ super(service);
+ }
+
+ @Override
+ public boolean isBridgeInPipeline (String nodeId) {
+ return true;
+ }
+}
\ No newline at end of file