Dummy provider for neutron testing 55/16155/4
authorRyan Moats <rmoats@us.ibm.com>
Fri, 6 Mar 2015 21:42:29 +0000 (15:42 -0600)
committerRyan Moats <rmoats@us.ibm.com>
Fri, 13 Mar 2015 15:11:12 +0000 (10:11 -0500)
classes implementing a dummy provider for testing neutron
northbound API

Change-Id: Id6f6fdd60bb702f51594e256fa7ed89009bbf3f4
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
18 files changed:
dummyprovider/pom.xml [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/Activator.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallPolicyDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallRuleDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFloatingIPDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerHealthMonitorDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerListenerDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolMemberDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronNetworkDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronPortDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronRouterDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityGroupDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityRuleDummyProvider.java [new file with mode: 0644]
dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSubnetDummyProvider.java [new file with mode: 0644]
pom.xml

diff --git a/dummyprovider/pom.xml b/dummyprovider/pom.xml
new file mode 100644 (file)
index 0000000..e9c2860
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.opendaylight.neutron</groupId>
+    <artifactId>project-neutron-parent</artifactId>
+    <version>0.5.0-SNAPSHOT</version>
+    <relativePath>../parent</relativePath>
+  </parent>
+
+  <groupId>org.opendaylight.neutron</groupId>
+  <artifactId>dummyprovider</artifactId>
+  <version>0.5.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.neutron</groupId>
+      <artifactId>neutron-spi</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.dependencymanager</artifactId>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Import-Package>*</Import-Package>
+            <Bundle-Activator>org.opendaylight.neutron.dummyprovider.Activator</Bundle-Activator>
+          </instructions>
+          <manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/Activator.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/Activator.java
new file mode 100644 (file)
index 0000000..418319b
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import java.util.Hashtable;
+import java.util.Dictionary;
+
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+
+import org.opendaylight.neutron.spi.INeutronFirewallAware;
+import org.opendaylight.neutron.spi.INeutronFirewallPolicyAware;
+import org.opendaylight.neutron.spi.INeutronFirewallRuleAware;
+import org.opendaylight.neutron.spi.INeutronFloatingIPAware;
+import org.opendaylight.neutron.spi.INeutronLoadBalancerAware;
+import org.opendaylight.neutron.spi.INeutronLoadBalancerHealthMonitorAware;
+import org.opendaylight.neutron.spi.INeutronLoadBalancerListenerAware;
+import org.opendaylight.neutron.spi.INeutronLoadBalancerPoolAware;
+import org.opendaylight.neutron.spi.INeutronLoadBalancerPoolMemberAware;
+import org.opendaylight.neutron.spi.INeutronNetworkAware;
+import org.opendaylight.neutron.spi.INeutronPortAware;
+import org.opendaylight.neutron.spi.INeutronRouterAware;
+import org.opendaylight.neutron.spi.INeutronSecurityGroupAware;
+import org.opendaylight.neutron.spi.INeutronSecurityRuleAware;
+import org.opendaylight.neutron.spi.INeutronSubnetAware;
+
+import org.osgi.framework.BundleContext;
+
+public class Activator extends DependencyActivatorBase {
+
+    @Override
+    public void init(BundleContext context, DependencyManager manager) throws Exception {
+       manager.add(createComponent().setInterface(new String[] {
+           INeutronFirewallAware.class.getName(),
+           INeutronFirewallPolicyAware.class.getName(),
+           INeutronFirewallRuleAware.class.getName(),
+           INeutronFloatingIPAware.class.getName(),
+           INeutronLoadBalancerAware.class.getName(),
+           INeutronLoadBalancerHealthMonitorAware.class.getName(),
+           INeutronLoadBalancerListenerAware.class.getName(),
+           INeutronLoadBalancerPoolAware.class.getName(),
+           INeutronLoadBalancerPoolMemberAware.class.getName(),
+           INeutronNetworkAware.class.getName(),
+           INeutronPortAware.class.getName(),
+           INeutronRouterAware.class.getName(),
+           INeutronSecurityGroupAware.class.getName(),
+           INeutronSecurityRuleAware.class.getName(),
+           INeutronSubnetAware.class.getName() }, null));
+    }
+
+    /**
+     * Function called when the activator stops just before the
+     * cleanup done by ComponentActivatorAbstractBase
+     *
+     */
+    @Override
+    public void destroy(BundleContext context, DependencyManager manager) throws Exception {
+    }
+
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallDummyProvider.java
new file mode 100644 (file)
index 0000000..aced074
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronFirewallAware;
+import org.opendaylight.neutron.spi.NeutronFirewall;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronFirewallDummyProvider implements INeutronFirewallAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronFirewallDummyProvider.class);
+
+    public NeutronFirewallDummyProvider() {
+    }
+
+    public int canCreateNeutronFirewall(NeutronFirewall firewall) {
+        return(200);
+    }
+
+    public void neutronFirewallCreated(NeutronFirewall firewall) {
+        logger.info(firewall.toString());
+    }
+
+    public int canUpdateNeutronFirewall(NeutronFirewall delta, NeutronFirewall original) {
+        return(200);
+    }
+
+    public void neutronFirewallUpdated(NeutronFirewall firewall) {
+        logger.info(firewall.toString());
+    }
+
+    public int canDeleteNeutronFirewall(NeutronFirewall firewall) {
+        return(200);
+    }
+  
+    public void neutronFirewallDeleted(NeutronFirewall firewall) {
+        logger.info(firewall.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallPolicyDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallPolicyDummyProvider.java
new file mode 100644 (file)
index 0000000..f0a6be9
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.spi;
+
+import org.opendaylight.neutron.spi.INeutronFirewallPolicyAware;
+import org.opendaylight.neutron.spi.NeutronFirewallPolicy;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class NeutronFirewallPolicyDummyProvider implements INeutronFirewallPolicyAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronFirewallPolicyDummyProvider.class);
+
+    public NeutronFirewallPolicyDummyProvider() {
+    }
+
+    public int canCreateNeutronFirewallPolicy(NeutronFirewallPolicy firewallPolicy) {
+        return(200);
+    }
+
+    public void neutronFirewallPolicyCreated(NeutronFirewallPolicy firewallPolicy) {
+        logger.info(firewallPolicy.toString());
+    }
+
+    public int canUpdateNeutronFirewallPolicy(NeutronFirewallPolicy delta, NeutronFirewallPolicy original) {
+        return(200);
+    }
+
+    public void neutronFirewallPolicyUpdated(NeutronFirewallPolicy firewallPolicy) {
+        logger.info(firewallPolicy.toString());
+    }
+
+    public int canDeleteNeutronFirewallPolicy(NeutronFirewallPolicy firewallPolicy) {
+        return(200);
+    }
+
+    public void neutronFirewallPolicyDeleted(NeutronFirewallPolicy firewallPolicy) {
+        logger.info(firewallPolicy.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallRuleDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFirewallRuleDummyProvider.java
new file mode 100644 (file)
index 0000000..4a2b5bd
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronFirewallRuleAware;
+import org.opendaylight.neutron.spi.NeutronFirewallRule;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronFirewallRuleDummyProvider implements INeutronFirewallRuleAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronFirewallDummyProvider.class);
+
+    public int canCreateNeutronFirewallRule(NeutronFirewallRule firewallRule) {
+        return(200);
+    }
+
+    public void neutronFirewallRuleCreated(NeutronFirewallRule firewallRule) {
+        logger.info(firewallRule.toString());
+    }
+
+    public int canUpdateNeutronFirewallRule(NeutronFirewallRule delta, NeutronFirewallRule original) {
+        return(200);
+    }
+
+    public void neutronFirewallRuleUpdated(NeutronFirewallRule firewallRule) {
+        logger.info(firewallRule.toString());
+    }
+
+    public int canDeleteNeutronFirewallRule(NeutronFirewallRule firewallRule) {
+        return(200);
+    }
+
+    public void neutronFirewallRuleDeleted(NeutronFirewallRule firewallRule) {
+        logger.info(firewallRule.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFloatingIPDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronFloatingIPDummyProvider.java
new file mode 100644 (file)
index 0000000..18817b5
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronFloatingIPAware;
+import org.opendaylight.neutron.spi.NeutronFloatingIP;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronFloatingIPDummyProvider implements INeutronFloatingIPAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronFloatingIPDummyProvider.class);
+
+    public NeutronFloatingIPDummyProvider() {
+    }
+
+    public int canCreateFloatingIP(NeutronFloatingIP floatingIP) {
+        return(200);
+    }
+
+    public void neutronFloatingIPCreated(NeutronFloatingIP floatingIP) {
+        logger.info(floatingIP.toString());
+    }
+
+    public int canUpdateFloatingIP(NeutronFloatingIP delta, NeutronFloatingIP original) {
+        return(200);
+    }
+
+    public void neutronFloatingIPUpdated(NeutronFloatingIP floatingIP) {
+        logger.info(floatingIP.toString());
+    }
+
+    public int canDeleteFloatingIP(NeutronFloatingIP floatingIP) {
+        return(200);
+    }
+
+    public void neutronFloatingIPDeleted(NeutronFloatingIP floatingIP) {
+        logger.info(floatingIP.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerDummyProvider.java
new file mode 100644 (file)
index 0000000..2d286ad
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronLoadBalancerAware;
+import org.opendaylight.neutron.spi.NeutronLoadBalancer;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronLoadBalancerDummyProvider implements INeutronLoadBalancerAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronLoadBalancerDummyProvider.class);
+
+    public NeutronLoadBalancerDummyProvider() {
+    }
+
+    public int canCreateNeutronLoadBalancer(NeutronLoadBalancer loadBalancer) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerCreated(NeutronLoadBalancer loadBalancer) {
+        logger.info(loadBalancer.toString());
+    }
+
+    public int canUpdateNeutronLoadBalancer(NeutronLoadBalancer delta, NeutronLoadBalancer original) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerUpdated(NeutronLoadBalancer loadBalancer) {
+        logger.info(loadBalancer.toString());
+    }
+
+    public int canDeleteNeutronLoadBalancer(NeutronLoadBalancer loadBalancer) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerDeleted(NeutronLoadBalancer loadBalancer) {
+        logger.info(loadBalancer.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerHealthMonitorDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerHealthMonitorDummyProvider.java
new file mode 100644 (file)
index 0000000..6232f31
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronLoadBalancerHealthMonitorAware;
+import org.opendaylight.neutron.spi.NeutronLoadBalancerHealthMonitor;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronLoadBalancerHealthMonitorDummyProvider implements INeutronLoadBalancerHealthMonitorAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronLoadBalancerHealthMonitorDummyProvider.class);
+
+    public NeutronLoadBalancerHealthMonitorDummyProvider() {
+    }
+
+    public int canCreateNeutronLoadBalancerHealthMonitor(NeutronLoadBalancerHealthMonitor loadBalancerHealthMonitor) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerHealthMonitorCreated(NeutronLoadBalancerHealthMonitor loadBalancerHealthMonitor) {
+        logger.info(loadBalancerHealthMonitor.toString());
+    }
+
+    public int canUpdateNeutronLoadBalancerHealthMonitor(NeutronLoadBalancerHealthMonitor delta,
+            NeutronLoadBalancerHealthMonitor original) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerHealthMonitorUpdated(NeutronLoadBalancerHealthMonitor loadBalancerHealthMonitor) {
+        logger.info(loadBalancerHealthMonitor.toString());
+    }
+
+    public int canDeleteNeutronLoadBalancerHealthMonitor(NeutronLoadBalancerHealthMonitor loadBalancerHealthMonitor) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerHealthMonitorDeleted(NeutronLoadBalancerHealthMonitor loadBalancerHealthMonitor) {
+        logger.info(loadBalancerHealthMonitor.toString());
+    }
+
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerListenerDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerListenerDummyProvider.java
new file mode 100644 (file)
index 0000000..8ac8320
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronLoadBalancerListenerAware;
+import org.opendaylight.neutron.spi.NeutronLoadBalancerListener;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronLoadBalancerListenerDummyProvider implements INeutronLoadBalancerListenerAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronLoadBalancerListenerDummyProvider.class);
+
+    public NeutronLoadBalancerListenerDummyProvider() {
+    }
+
+    public int canCreateNeutronLoadBalancerListener(NeutronLoadBalancerListener loadBalancerListener) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerListenerCreated(NeutronLoadBalancerListener loadBalancerListener) {
+        logger.info(loadBalancerListener.toString());
+    }
+
+    public int canUpdateNeutronLoadBalancerListener(NeutronLoadBalancerListener delta,
+            NeutronLoadBalancerListener original) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerListenerUpdated(NeutronLoadBalancerListener loadBalancerListener) {
+        logger.info(loadBalancerListener.toString());
+    }
+
+    public int canDeleteNeutronLoadBalancerListener(NeutronLoadBalancerListener loadBalancerListener) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerListenerDeleted(NeutronLoadBalancerListener loadBalancerListener) {
+        logger.info(loadBalancerListener.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolDummyProvider.java
new file mode 100644 (file)
index 0000000..dc34356
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronLoadBalancerPoolAware;
+import org.opendaylight.neutron.spi.NeutronLoadBalancerPool;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronLoadBalancerPoolDummyProvider implements INeutronLoadBalancerPoolAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronLoadBalancerPoolDummyProvider.class);
+
+    public NeutronLoadBalancerPoolDummyProvider() { }
+
+    public int canCreateNeutronLoadBalancerPool(NeutronLoadBalancerPool loadBalancerPool) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolCreated(NeutronLoadBalancerPool loadBalancerPool) {
+        logger.info(loadBalancerPool.toString());
+    }
+
+    public int canUpdateNeutronLoadBalancerPool(NeutronLoadBalancerPool delta, NeutronLoadBalancerPool original) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolUpdated(NeutronLoadBalancerPool loadBalancerPool) {
+        logger.info(loadBalancerPool.toString());
+    }
+
+    public int canDeleteNeutronLoadBalancerPool(NeutronLoadBalancerPool loadBalancerPool) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolDeleted(NeutronLoadBalancerPool loadBalancerPool) {
+        logger.info(loadBalancerPool.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolMemberDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronLoadBalancerPoolMemberDummyProvider.java
new file mode 100644 (file)
index 0000000..eb0e034
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronLoadBalancerPoolMemberAware;
+import org.opendaylight.neutron.spi.NeutronLoadBalancerPoolMember;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronLoadBalancerPoolMemberDummyProvider implements INeutronLoadBalancerPoolMemberAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronLoadBalancerPoolMemberDummyProvider.class);
+
+    public NeutronLoadBalancerPoolMemberDummyProvider() {
+    }
+
+    public int canCreateNeutronLoadBalancerPoolMember(NeutronLoadBalancerPoolMember loadBalancerPoolMember) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolMemberCreated(NeutronLoadBalancerPoolMember loadBalancerPoolMember) {
+        logger.info(loadBalancerPoolMember.toString());
+    }
+
+    public int canUpdateNeutronLoadBalancerPoolMember(NeutronLoadBalancerPoolMember delta,
+            NeutronLoadBalancerPoolMember original) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolMemberUpdated(NeutronLoadBalancerPoolMember loadBalancerPoolMember) {
+        logger.info(loadBalancerPoolMember.toString());
+    }
+
+    public int canDeleteNeutronLoadBalancerPoolMember(NeutronLoadBalancerPoolMember loadBalancerPoolMember) {
+        return(200);
+    }
+
+    public void neutronLoadBalancerPoolMemberDeleted(NeutronLoadBalancerPoolMember loadBalancerPoolMember) {
+        logger.info(loadBalancerPoolMember.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronNetworkDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronNetworkDummyProvider.java
new file mode 100644 (file)
index 0000000..8285978
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronNetworkAware;
+import org.opendaylight.neutron.spi.NeutronNetwork;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class NeutronNetworkDummyProvider implements INeutronNetworkAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronNetworkDummyProvider.class);
+
+    public NeutronNetworkDummyProvider() {
+    }
+
+    public int canCreateNetwork(NeutronNetwork network) {
+        return(200);
+    }
+
+    public void neutronNetworkCreated(NeutronNetwork network) {
+        logger.info(network.toString());
+    }
+
+    public int canUpdateNetwork(NeutronNetwork delta, NeutronNetwork original) {
+        return(200);
+    }
+
+    public void neutronNetworkUpdated(NeutronNetwork network) {
+        logger.info(network.toString());
+    }
+
+    public int canDeleteNetwork(NeutronNetwork network) {
+        return(200);
+    }
+
+    public void neutronNetworkDeleted(NeutronNetwork network) {
+        logger.info(network.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronPortDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronPortDummyProvider.java
new file mode 100644 (file)
index 0000000..d31b608
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.spi;
+
+import org.opendaylight.neutron.spi.INeutronPortAware;
+import org.opendaylight.neutron.spi.NeutronPort;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronPortDummyProvider implements INeutronPortAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronPortDummyProvider.class);
+
+    public NeutronPortDummyProvider() {
+    }
+
+    public int canCreatePort(NeutronPort port) {
+        return(200);
+    }
+
+    public void neutronPortCreated(NeutronPort port) {
+        logger.info(port.toString());
+    }
+
+    public int canUpdatePort(NeutronPort delta, NeutronPort original) {
+        return(200);
+    }
+
+    public void neutronPortUpdated(NeutronPort port) {
+        logger.info(port.toString());
+    }
+
+    public int canDeletePort(NeutronPort port) {
+        return(200);
+    }
+
+    public void neutronPortDeleted(NeutronPort port) {
+        logger.info(port.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronRouterDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronRouterDummyProvider.java
new file mode 100644 (file)
index 0000000..7336061
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronRouterAware;
+import org.opendaylight.neutron.spi.NeutronRouter;
+import org.opendaylight.neutron.spi.NeutronRouter_Interface;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronRouterDummyProvider implements INeutronRouterAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronRouterDummyProvider.class);
+
+    public NeutronRouterDummyProvider() {
+    }
+
+    public int canCreateRouter(NeutronRouter router) {
+        return(200);
+    }
+
+    public void neutronRouterCreated(NeutronRouter router) {
+        logger.info(router.toString());
+    }
+
+    public int canUpdateRouter(NeutronRouter delta, NeutronRouter original) {
+        return(200);
+    }
+
+    public void neutronRouterUpdated(NeutronRouter router) {
+        logger.info(router.toString());
+    }
+
+    public int canDeleteRouter(NeutronRouter router) {
+        return(200);
+    }
+
+    public void neutronRouterDeleted(NeutronRouter router) {
+        logger.info(router.toString());
+    }
+
+    public int canAttachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface) {
+        return(200);
+    }
+
+    public void neutronRouterInterfaceAttached(NeutronRouter router, NeutronRouter_Interface routerInterface) {
+        logger.info(router.toString());
+        logger.info(routerInterface.toString());
+    }
+
+    public int canDetachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface) {
+        return(200);
+    }
+
+    public void neutronRouterInterfaceDetached(NeutronRouter router, NeutronRouter_Interface routerInterface) {
+        logger.info(router.toString());
+        logger.info(routerInterface.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityGroupDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityGroupDummyProvider.java
new file mode 100644 (file)
index 0000000..ad4e6dd
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ *
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronSecurityGroupAware;
+import org.opendaylight.neutron.spi.NeutronSecurityGroup;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronSecurityGroupDummyProvider implements INeutronSecurityGroupAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronSecurityGroupDummyProvider.class);
+
+    public NeutronSecurityGroupDummyProvider() { }
+
+    public int canCreateNeutronSecurityGroup(NeutronSecurityGroup securityGroup) {
+        return(200);
+    }
+
+    public void neutronSecurityGroupCreated(NeutronSecurityGroup securityGroup) {
+        logger.info(securityGroup.toString());
+    }
+
+    public int canUpdateNeutronSecurityGroup(NeutronSecurityGroup delta, NeutronSecurityGroup original) {
+        return(200);
+    }
+
+    public void neutronSecurityGroupUpdated(NeutronSecurityGroup securityGroup) {
+        logger.info(securityGroup.toString());
+    }
+
+    public int canDeleteNeutronSecurityGroup(NeutronSecurityGroup securityGroup) {
+        return(200);
+    }
+
+    public void neutronSecurityGroupDeleted(NeutronSecurityGroup securityGroup) {
+        logger.info(securityGroup.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityRuleDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSecurityRuleDummyProvider.java
new file mode 100644 (file)
index 0000000..5472a6f
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 IBM, 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
+ *
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronSecurityRuleAware;
+import org.opendaylight.neutron.spi.NeutronSecurityRule;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NeutronSecurityRuleDummyProvider implements INeutronSecurityRuleAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronSecurityRuleDummyProvider.class);
+
+    public NeutronSecurityRuleDummyProvider() {
+    }
+
+    public int canCreateNeutronSecurityRule(NeutronSecurityRule securityRule) {
+        return(200);
+    }
+
+    public void neutronSecurityRuleCreated(NeutronSecurityRule securityRule) {
+        logger.info(securityRule.toString());
+    }
+
+    public int canUpdateNeutronSecurityRule(NeutronSecurityRule delta, NeutronSecurityRule original) {
+        return(200);
+    }
+
+    public void neutronSecurityRuleUpdated(NeutronSecurityRule securityRule) {
+        logger.info(securityRule.toString());
+    }
+
+    public int canDeleteNeutronSecurityRule(NeutronSecurityRule securityRule) {
+        return(200);
+    }
+
+    public void neutronSecurityRuleDeleted(NeutronSecurityRule securityRule) {
+        logger.info(securityRule.toString());
+    }
+}
diff --git a/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSubnetDummyProvider.java b/dummyprovider/src/main/java/org/opendaylight/neutron/dummyprovider/NeutronSubnetDummyProvider.java
new file mode 100644 (file)
index 0000000..4dfbd0d
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright IBM Corporation, 2015.  All rights reserved.
+ *
+ * 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
+ */
+
+package org.opendaylight.neutron.dummyprovider;
+
+import org.opendaylight.neutron.spi.INeutronSubnetAware;
+import org.opendaylight.neutron.spi.NeutronSubnet;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class NeutronSubnetDummyProvider implements INeutronSubnetAware {
+
+    private static final Logger logger = LoggerFactory.getLogger(NeutronSubnetDummyProvider.class);
+
+    public NeutronSubnetDummyProvider() {
+    }
+
+    public int canCreateSubnet(NeutronSubnet subnet) {
+        return(200);
+    }
+
+    public void neutronSubnetCreated(NeutronSubnet subnet) {
+        logger.info(subnet.toString());
+    }
+
+    public int canUpdateSubnet(NeutronSubnet delta, NeutronSubnet original) {
+        return(200);
+    }
+
+    public void neutronSubnetUpdated(NeutronSubnet subnet) {
+        logger.info(subnet.toString());
+    }
+
+    public int canDeleteSubnet(NeutronSubnet subnet) {
+        return(200);
+    }
+
+    public void neutronSubnetDeleted(NeutronSubnet subnet) {
+        logger.info(subnet.toString());
+    }
+
+}
diff --git a/pom.xml b/pom.xml
index 728130e834655a195b2e2134aee39e638d313315..b91232e0c009d8fcf40abb4edba6c5fa0ea64d2f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
     <module>neutron-spi</module>
     <module>northbound-api</module>
     <module>transcriber</module>
+    <module>dummyprovider</module>
     <module>features</module>
     <module>karaf</module>
   </modules>