From: Flavio Fernandes Date: Mon, 5 Oct 2015 21:14:36 +0000 (+0000) Subject: Merge "Add UT for SouthboundMapper and SouthboundProvider" X-Git-Tag: release/beryllium-sr2~390 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=0658cdedca26045898862acbd3e2173246f25297;hp=155bf61bb2273069c729159304dc4e0714294c3a;p=netvirt.git Merge "Add UT for SouthboundMapper and SouthboundProvider" --- diff --git a/commons/it/pom.xml b/commons/it/pom.xml new file mode 100644 index 0000000000..4063868bd7 --- /dev/null +++ b/commons/it/pom.xml @@ -0,0 +1,121 @@ + + + + 4.0.0 + + + org.opendaylight.controller + mdsal-it-parent + 1.3.0-SNAPSHOT + + + + org.opendaylight.ovsdb + it + 1.2.1-SNAPSHOT + pom + The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation. + https://wiki.opendaylight.org/view/OVSDB_Integration:Main + + + Eclipse Public License v1.0 + http://www.eclipse.org/legal/epl-v10.html + + + + + Sam Hague + shague@gmail.com + https://github.com/shague + + + + scm:git:ssh://git.opendaylight.org:29418/ovsdb.git + scm:git:ssh://git.opendaylight.org:29418/ovsdb.git + HEAD + https://wiki.opendaylight.org/view/OVSDB_Integration:Main + + + + 3.1.1 + + + + + default + + true + + + true + + + + integrationtest + + false + + + false + + + + + + + + org.codehaus.sonar-plugins.java + sonar-jacoco-listeners + ${sonar-jacoco-listeners.version} + test + + + + + + + + org.jacoco + jacoco-maven-plugin + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + listener + org.sonar.java.jacoco.JUnitListener + + + + + + maven-antrun-plugin + + + prep-jacoco-agent + pre-integration-test + + run + + + + + + + + + + + + diff --git a/commons/parent/pom.xml b/commons/parent/pom.xml index 5cb6e2657e..f00ce8b4c7 100644 --- a/commons/parent/pom.xml +++ b/commons/parent/pom.xml @@ -439,13 +439,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - src/main/resources/ovsdb_checks.xml true **/*.java,**/*.xml,**/*.ini,**/*.sh,**/*.bat - **/yang/,**/features/,**/integrationtest/,**/northbound/, + **/yang/,**/features/, **/openstack/,**/ovs-sfc/, - **/ovsdb-plugin-compatibility-layer/, - **/plugin/,**/plugin-shell/, **/schema/hardwarevtep/,**/schema/openvswitch/, **/southbound/,**/utils/ diff --git a/commons/parent/src/main/resources/ovsdb_checks.xml b/commons/parent/src/main/resources/ovsdb_checks.xml deleted file mode 100644 index daf4a179ef..0000000000 --- a/commons/parent/src/main/resources/ovsdb_checks.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/commons/pom.xml b/commons/pom.xml index 376aba2adc..c65880fc07 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -49,5 +49,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html parent + it diff --git a/openstack/net-virt-it/pom.xml b/openstack/net-virt-it/pom.xml index bbfbcd62c1..4bf8c654b5 100644 --- a/openstack/net-virt-it/pom.xml +++ b/openstack/net-virt-it/pom.xml @@ -9,10 +9,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - org.opendaylight.controller - mdsal-it-parent - 1.3.0-SNAPSHOT - + org.opendaylight.ovsdb + it + 1.2.1-SNAPSHOT + ../../commons/it 4.0.0 org.opendaylight.ovsdb @@ -40,11 +40,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html HEAD https://wiki.opendaylight.org/view/OVSDB_Integration:Main - - 2.4 - ${env.PWD} - ${root.directory}/target/code-coverage/jacoco-it.exec - @@ -136,7 +131,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.codehaus.sonar-plugins.java sonar-jacoco-listeners - ${sonar-jacoco-listeners.version} test @@ -149,33 +143,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + + org.jacoco + jacoco-maven-plugin + + + org.apache.maven.plugins + maven-checkstyle-plugin + org.apache.maven.plugins maven-failsafe-plugin - - - - - - listener - org.sonar.java.jacoco.JUnitListener - - - - - - - - - integration-test - verify - - - ${project.build.directory}/surefire-reports - ${skip.integrationtest} - - - @@ -191,78 +169,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - - - org.jacoco - jacoco-maven-plugin - - - prepare-ut-agent - - prepare-agent - - - ${sonar.jacoco.reportPath} - - - - prepare-it-agent - - prepare-agent-integration - - - true - ${sonar.jacoco.itReportPath} - - - - default-report - - report - - - ${sonar.jacoco.reportPath} - - - - default-report-integration - - report-integration - - - ${sonar.jacoco.itReportPath} - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - - - listener - org.sonar.java.jacoco.JUnitListener - - - - - - diff --git a/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java b/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java index 9d8cab55e7..43fbb78ef9 100644 --- a/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java +++ b/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.it; import static org.junit.Assert.fail; import static org.ops4j.pax.exam.CoreOptions.composite; import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.CoreOptions.vmOption; import static org.ops4j.pax.exam.CoreOptions.when; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features; @@ -114,12 +115,22 @@ public class NetvirtIT extends AbstractMdsalTestBase { // Works only if we don't specify the feature repo and name getLoggingOption()}; Option[] propertyOptions = getPropertiesOptions(); - Option[] combinedOptions = new Option[options.length + propertyOptions.length]; + Option[] otherOptions = getOtherOptions(); + Option[] combinedOptions = new Option[options.length + propertyOptions.length + otherOptions.length]; System.arraycopy(options, 0, combinedOptions, 0, options.length); System.arraycopy(propertyOptions, 0, combinedOptions, options.length, propertyOptions.length); + System.arraycopy(otherOptions, 0, combinedOptions, options.length + propertyOptions.length, + otherOptions.length); return combinedOptions; } + private Option[] getOtherOptions() { + return new Option[] { + vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=../../jacoco-it.exec"), + keepRuntimeFolder() + }; + } + @Override public String getKarafDistro() { return maven() diff --git a/openstack/net-virt-providers/pom.xml b/openstack/net-virt-providers/pom.xml index db41788e9a..ceb03c0330 100644 --- a/openstack/net-virt-providers/pom.xml +++ b/openstack/net-virt-providers/pom.xml @@ -44,6 +44,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + 0.10.0-SNAPSHOT 0.6.0-SNAPSHOT 0.2.0-SNAPSHOT 0.2.0-SNAPSHOT @@ -51,10 +52,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html 1.2.1-SNAPSHOT 1.2.1-SNAPSHOT 1.5.2 - 2.4 - 0.10.0-SNAPSHOT - ${env.PWD} - ${root.directory}/target/code-coverage/jacoco-it.exec + ../net-virt-it/target/jacoco-it.exec @@ -272,80 +270,21 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.apache.maven.plugins maven-checkstyle-plugin - - org.apache.maven.plugins - maven-failsafe-plugin - - - - - - listener - org.sonar.java.jacoco.JUnitListener - - - - - - org.apache.maven.plugins maven-surefire-plugin - - listener org.sonar.java.jacoco.JUnitListener - - org.jacoco jacoco-maven-plugin - - - prepare-ut-agent - - prepare-agent - - - ${sonar.jacoco.reportPath} - - - - prepare-it-agent - - prepare-agent-integration - - - true - ${sonar.jacoco.itReportPath} - - - - default-report - - report - - - ${sonar.jacoco.reportPath} - - - - default-report-integration - - report-integration - - - ${sonar.jacoco.itReportPath} - - - diff --git a/openstack/net-virt-sfc/impl/pom.xml b/openstack/net-virt-sfc/impl/pom.xml index 9c8652e73c..2bcd2aac40 100644 --- a/openstack/net-virt-sfc/impl/pom.xml +++ b/openstack/net-virt-sfc/impl/pom.xml @@ -23,6 +23,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html openstack.net-virt-sfc-impl 1.0.0-SNAPSHOT bundle + + + ../it/target/jacoco-it.exec + + ${project.groupId} @@ -36,12 +41,37 @@ and is available at http://www.eclipse.org/legal/epl-v10.html junit test - org.mockito mockito-all test + + org.codehaus.sonar-plugins.java + sonar-jacoco-listeners + ${sonar-jacoco-listeners.version} + test + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + listener + org.sonar.java.jacoco.JUnitListener + + + + + + org.jacoco + jacoco-maven-plugin + + + diff --git a/openstack/net-virt-sfc/it/pom.xml b/openstack/net-virt-sfc/it/pom.xml index cba80a2a16..1a0ade1823 100644 --- a/openstack/net-virt-sfc/it/pom.xml +++ b/openstack/net-virt-sfc/it/pom.xml @@ -12,20 +12,19 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - org.opendaylight.controller - mdsal-it-parent - 1.3.0-SNAPSHOT - + org.opendaylight.ovsdb + it + 1.2.1-SNAPSHOT + ../../../commons/it 4.0.0 org.opendaylight.ovsdb openstack.net-virt-sfc-it 1.0.0-SNAPSHOT - bundle + jar - false org.opendaylight.ovsdb openstack.net-virt-sfc-karaf 1.0.0-SNAPSHOT @@ -60,4 +59,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html + + + + + org.jacoco + jacoco-maven-plugin + + + maven-failsafe-plugin + + + + diff --git a/openstack/net-virt-sfc/it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/sfc/NetvirtSfcIT.java b/openstack/net-virt-sfc/it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/sfc/NetvirtSfcIT.java index d8a5a849f1..86cec607f5 100644 --- a/openstack/net-virt-sfc/it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/sfc/NetvirtSfcIT.java +++ b/openstack/net-virt-sfc/it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/sfc/NetvirtSfcIT.java @@ -9,12 +9,15 @@ package org.opendaylight.ovsdb.openstack.netvirt.sfc; import static org.ops4j.pax.exam.CoreOptions.composite; import static org.ops4j.pax.exam.CoreOptions.maven; +import static org.ops4j.pax.exam.CoreOptions.vmOption; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel; @@ -54,6 +57,24 @@ public class NetvirtSfcIT extends AbstractMdsalTestBase { return "odl-ovsdb-sfc-ui"; } + @Configuration + @Override + public Option[] config() { + Option[] parentOptions = super.config(); + Option[] otherOptions = getOtherOptions(); + Option[] options = new Option[parentOptions.length + otherOptions.length]; + System.arraycopy(parentOptions, 0, options, 0, parentOptions.length); + System.arraycopy(otherOptions, 0, options, parentOptions.length, otherOptions.length); + return options; + } + + private Option[] getOtherOptions() { + return new Option[] { + vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=../../jacoco-it.exec"), + keepRuntimeFolder() + }; + } + @Override public Option getLoggingOption() { Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG, diff --git a/openstack/net-virt/pom.xml b/openstack/net-virt/pom.xml index f80c2c9d15..3fa44351fd 100644 --- a/openstack/net-virt/pom.xml +++ b/openstack/net-virt/pom.xml @@ -49,9 +49,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html 1.2.1-SNAPSHOT 1.2.1-SNAPSHOT 1.5.2 - 2.4 - ${env.PWD} - ${root.directory}/target/code-coverage/jacoco-it.exec + ../net-virt-it/target/jacoco-it.exec @@ -227,81 +225,22 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.apache.maven.plugins maven-checkstyle-plugin - - org.apache.maven.plugins - maven-failsafe-plugin - - - - - - listener - org.sonar.java.jacoco.JUnitListener - - - - - - org.apache.maven.plugins maven-surefire-plugin - - listener org.sonar.java.jacoco.JUnitListener - - org.jacoco jacoco-maven-plugin - - - prepare-ut-agent - - prepare-agent - - - ${sonar.jacoco.reportPath} - - - - prepare-it-agent - - prepare-agent-integration - - - true - ${sonar.jacoco.itReportPath} - - - - default-report - - report - - - ${sonar.jacoco.reportPath} - - - - default-report-integration - - report-integration - - - ${sonar.jacoco.itReportPath} - - - - + diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigActivator.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigActivator.java index bc6bd51522..a3acb01dd8 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigActivator.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigActivator.java @@ -12,6 +12,8 @@ import java.util.ArrayList; import java.util.Dictionary; import java.util.Hashtable; import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; import org.opendaylight.neutron.spi.*; @@ -27,8 +29,7 @@ import org.slf4j.LoggerFactory; public class ConfigActivator implements BundleActivator { private static final Logger LOG = LoggerFactory.getLogger(ConfigActivator.class); - private List> registrations = new ArrayList<>(); - private List services = new ArrayList<>(); + private List> servicesAndRegistrations = new ArrayList<>(); private ProviderContext providerContext; public ConfigActivator(ProviderContext providerContext) { @@ -134,10 +135,18 @@ public class ConfigActivator implements BundleActivator { new String[] {OvsdbInventoryService.class.getName()}, null, ovsdbInventoryService); // Call .setDependencies() starting with the last service registered - for (int i = services.size() - 1; i >= 0; i--) { - Object service = services.get(i); + for (int i = servicesAndRegistrations.size() - 1; i >= 0; i--) { + Pair serviceAndRegistration = servicesAndRegistrations.get(i); + Object service = serviceAndRegistration.getLeft(); + ServiceRegistration serviceRegistration = serviceAndRegistration.getRight(); + LOG.info("Setting dependencies on service {}/{}, {}", i, servicesAndRegistrations.size(), + service.getClass()); if (service instanceof ConfigInterface) { - ((ConfigInterface) service).setDependencies(context, null); + ((ConfigInterface) service).setDependencies( + serviceRegistration != null ? serviceRegistration.getReference() : null); + LOG.info("Dependencies set"); + } else { + LOG.warn("Service isn't a ConfigInterface"); } } @@ -161,7 +170,7 @@ public class ConfigActivator implements BundleActivator { trackService(context, GatewayMacResolver.class, neutronL3Adapter); // We no longer need to track the services, avoid keeping references around - services.clear(); + servicesAndRegistrations.clear(); } private void trackService(BundleContext context, final Class clazz, final ConfigInterface... dependents) { @@ -204,11 +213,11 @@ public class ConfigActivator implements BundleActivator { private ServiceRegistration registerService(BundleContext bundleContext, String[] interfaces, Dictionary properties, Object impl) { - services.add(impl); - ServiceRegistration serviceRegistration = bundleContext.registerService(interfaces, impl, properties); - if (serviceRegistration != null) { - registrations.add(serviceRegistration); + ServiceRegistration serviceRegistration = bundleContext.registerService(interfaces, impl, properties); + if (serviceRegistration == null) { + LOG.warn("Service registration for {} failed to return a ServiceRegistration instance", impl.getClass()); } + servicesAndRegistrations.add(Pair.of(impl, serviceRegistration)); return serviceRegistration; } } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigInterface.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigInterface.java index ef18425f15..2681edb15b 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigInterface.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/ConfigInterface.java @@ -8,10 +8,9 @@ package org.opendaylight.ovsdb.openstack.netvirt; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; public interface ConfigInterface { - void setDependencies(BundleContext bundleContext, ServiceReference serviceReference); + void setDependencies(ServiceReference serviceReference); void setDependencies(Object impl); } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandler.java index 6b47771998..7a3bf8a705 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandler.java @@ -18,7 +18,6 @@ import org.opendaylight.neutron.spi.NeutronFirewallPolicy; import org.opendaylight.neutron.spi.NeutronFirewallRule; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -190,11 +189,10 @@ public class FWaasHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronFirewallAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandler.java index a8607595e4..679c1bb8c0 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandler.java @@ -16,7 +16,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -142,13 +141,12 @@ public class FloatingIPHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronFloatingIPAware.class.getName()), this); neutronL3Adapter = (NeutronL3Adapter) ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandler.java index 764ddc484e..8bff814fb4 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandler.java @@ -29,7 +29,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheListener; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -247,17 +247,15 @@ public class LBaaSHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { loadBalancerProvider = (LoadBalancerProvider) ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, this); nodeCacheManager = (NodeCacheManager) ServiceHelper.getGlobalInstance(NodeCacheManager.class, this); - nodeCacheManager.cacheListenerAdded( - bundleContext.getServiceReference(INeutronLoadBalancerAware.class.getName()), this); + nodeCacheManager.cacheListenerAdded(serviceReference, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronLoadBalancerAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandler.java index da6ca5f752..c0a3ab4c91 100755 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandler.java @@ -27,7 +27,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.LoadBalancerProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -263,15 +263,14 @@ public class LBaaSPoolHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { loadBalancerProvider = (LoadBalancerProvider) ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, this); nodeCacheManager = (NodeCacheManager) ServiceHelper.getGlobalInstance(NodeCacheManager.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronLoadBalancerPoolAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandler.java index 4d3f3662bb..d8834f5db7 100755 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandler.java @@ -28,7 +28,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.LoadBalancerProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -272,15 +272,14 @@ public class LBaaSPoolMemberHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { loadBalancerProvider = (LoadBalancerProvider) ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, this); nodeCacheManager = (NodeCacheManager) ServiceHelper.getGlobalInstance(NodeCacheManager.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronLoadBalancerPoolMemberAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandler.java index a0066c90f4..705c15e33b 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandler.java @@ -24,7 +24,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -194,7 +194,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { tenantNetworkManager = (TenantNetworkManager) ServiceHelper.getGlobalInstance(TenantNetworkManager.class, this); bridgeConfigurationManager = @@ -207,8 +207,7 @@ public class NetworkHandler extends AbstractHandler implements INeutronNetworkAw (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronNetworkAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandler.java index 40f2643858..a59927ea8e 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandler.java @@ -22,7 +22,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -173,7 +173,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { nodeCacheManager = (NodeCacheManager) ServiceHelper.getGlobalInstance(NodeCacheManager.class, this); neutronL3Adapter = @@ -182,8 +182,7 @@ public class PortHandler extends AbstractHandler implements INeutronPortAware, C (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronPortAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java index 74d296f2c5..76a6b9d35c 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java @@ -16,7 +16,6 @@ import org.opendaylight.neutron.spi.NeutronSecurityGroup; import org.opendaylight.neutron.spi.NeutronSecurityRule; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -133,11 +132,10 @@ public class PortSecurityHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronSecurityGroupAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandler.java index 31a7ddb54d..7c914f8c31 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandler.java @@ -17,7 +17,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -217,13 +216,12 @@ public class RouterHandler extends AbstractHandler implements INeutronRouterAwar } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { neutronL3Adapter = (NeutronL3Adapter) ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronRouterAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java index 8eaed984f1..e16ebbc19f 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java @@ -20,7 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yangtools.yang.binding.DataObject; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -367,7 +366,7 @@ public class SouthboundHandler extends AbstractHandler } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { configurationService = (ConfigurationService) ServiceHelper.getGlobalInstance(ConfigurationService.class, this); networkingProviderManager = @@ -378,16 +377,14 @@ public class SouthboundHandler extends AbstractHandler (BridgeConfigurationManager) ServiceHelper.getGlobalInstance(BridgeConfigurationManager.class, this); nodeCacheManager = (NodeCacheManager) ServiceHelper.getGlobalInstance(NodeCacheManager.class, this); - nodeCacheManager.cacheListenerAdded( - bundleContext.getServiceReference(OvsdbInventoryListener.class.getName()), this); + nodeCacheManager.cacheListenerAdded(serviceReference, this); neutronL3Adapter = (NeutronL3Adapter) ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, this); southbound = (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(OvsdbInventoryListener.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); ovsdbInventoryService = (OvsdbInventoryService) ServiceHelper.getGlobalInstance(OvsdbInventoryService.class, this); ovsdbInventoryService.listenerAdded(this); diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandler.java index c63d43c776..3e3a714db1 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandler.java @@ -16,7 +16,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -89,13 +88,12 @@ public class SubnetHandler extends AbstractHandler implements INeutronSubnetAwar } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { neutronL3Adapter = (NeutronL3Adapter) ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(INeutronSubnetAware.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Southbound.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Southbound.java index 7a8f6e6a59..5289742d8c 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Southbound.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Southbound.java @@ -35,7 +35,7 @@ public interface Southbound { boolean isBridgeOnOvsdbNode(Node node, String bridgeName); String getOvsdbNodeUUID(Node node); String getOsdbNodeExternalIdsValue(OvsdbNodeAugmentation ovsdbNodeAugmentation, String key); - boolean addBridge(Node ovsdbNode, String bridgeName, String target); + boolean addBridge(Node ovsdbNode, String bridgeName, List controllersStr); boolean deleteBridge(Node ovsdbNode); OvsdbBridgeAugmentation readBridge(Node node, String name); Node readBridgeNode(Node node, String name); diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java index bc40093955..af9e6137ae 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java @@ -21,6 +21,7 @@ import org.opendaylight.ovsdb.utils.config.ConfigProperties; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbNodeAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfo; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntry; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import com.google.common.base.Preconditions; @@ -29,11 +30,11 @@ import com.google.common.collect.Lists; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.UnknownHostException; +import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import org.apache.commons.lang3.tuple.ImmutablePair; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -447,7 +448,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage boolean rv = true; if ((!southbound.isBridgeOnOvsdbNode(ovsdbNode, bridgeName)) || (southbound.getBridgeFromConfig(ovsdbNode, bridgeName) == null)) { - rv = southbound.addBridge(ovsdbNode, bridgeName, getControllerTarget(ovsdbNode)); + rv = southbound.addBridge(ovsdbNode, bridgeName, getControllersFromOvsdbNode(ovsdbNode)); } return rv; } @@ -492,42 +493,61 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage return openFlowPort; } - private String getControllerTarget(Node node) { - String setControllerStr = null; - short openflowPort = Constants.OPENFLOW_PORT; - //Look at user configuration. - //TODO: In case we move to config subsystem to expose these user facing parameter, - // we will have to modify this code. + private List getControllersFromOvsdbNode(Node node) { + List controllersStr = new ArrayList<>(); String controllerIpStr = getControllerIPAddress(); - - if(controllerIpStr == null){ - // Check if ovsdb node has connection info + if (controllerIpStr != null) { + // If codepath makes it here, the ip address to be used was explicitly provided. + // Being so, also fetch openflowPort provided via ConfigProperties. + controllersStr.add(Constants.OPENFLOW_CONNECTION_PROTOCOL + + ":" + controllerIpStr + ":" + getControllerOFPort()); + } else { + // Check if ovsdb node has manager entries OvsdbNodeAugmentation ovsdbNodeAugmentation = southbound.extractOvsdbNode(node); if (ovsdbNodeAugmentation != null) { - ConnectionInfo connectionInfo = ovsdbNodeAugmentation.getConnectionInfo(); - if(connectionInfo != null && connectionInfo.getLocalIp() != null) { - controllerIpStr = new String(connectionInfo.getLocalIp().getValue()); - }else{ - LOG.warn("Ovsdb Node does not contains connection info : {}", node); + List managerEntries = ovsdbNodeAugmentation.getManagerEntry(); + if (managerEntries != null && !managerEntries.isEmpty()) { + for (ManagerEntry managerEntry : managerEntries) { + if (managerEntry == null || managerEntry.getTarget() == null) { + continue; + } + String[] tokens = managerEntry.getTarget().getValue().split(":"); + if (tokens.length == 3 && tokens[0].equalsIgnoreCase("tcp")) { + controllersStr.add(Constants.OPENFLOW_CONNECTION_PROTOCOL + + ":" + tokens[1] + ":" + getControllerOFPort()); + } else { + LOG.trace("Skipping manager entry {} for node {}", + managerEntry.getTarget(), node.getNodeId().getValue()); + } + } + } else { + LOG.warn("Ovsdb Node does not contain manager entries : {}", node); } } - }else { - openflowPort = getControllerOFPort(); } - if(controllerIpStr == null) { - // Neither user provided ip nor ovsdb node has controller ip, Lets use local machine ip address + if (controllersStr.isEmpty()) { + // Neither user provided ip nor ovsdb node has manager entries. Lets use local machine ip address. LOG.debug("Use local machine ip address as a OpenFlow Controller ip address"); controllerIpStr = getLocalControllerHostIpAddress(); + if (controllerIpStr != null) { + controllersStr.add(Constants.OPENFLOW_CONNECTION_PROTOCOL + + ":" + controllerIpStr + ":" + Constants.OPENFLOW_PORT); + } } - if(controllerIpStr != null){ - LOG.debug("Targe OpenFlow Controller found : {}", controllerIpStr); - setControllerStr = Constants.OPENFLOW_CONNECTION_PROTOCOL + ":" + controllerIpStr + ":" + openflowPort; - }else { + + if (controllersStr.isEmpty()) { LOG.warn("Failed to determine OpenFlow controller ip address"); + } else if (LOG.isDebugEnabled()) { + controllerIpStr = ""; + for (String currControllerIpStr : controllersStr) { + controllerIpStr += " " + currControllerIpStr; + } + LOG.debug("Found {} OpenFlow Controller(s) :{}", controllersStr.size(), controllerIpStr); } - return setControllerStr; + + return controllersStr; } private String getLocalControllerHostIpAddress() { @@ -551,7 +571,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { configurationService = (ConfigurationService) ServiceHelper.getGlobalInstance(ConfigurationService.class, this); networkingProviderManager = diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImpl.java index 1692dad4fa..79fa1921de 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImpl.java @@ -23,7 +23,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound; import org.opendaylight.ovsdb.utils.config.ConfigProperties; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -179,7 +179,7 @@ public class ConfigurationServiceImpl implements ConfigurationService, ConfigInt } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { southbound = (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/EventDispatcherImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/EventDispatcherImpl.java index 1c5f3e90a3..e73fe171e5 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/EventDispatcherImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/EventDispatcherImpl.java @@ -14,7 +14,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.ConfigInterface; import org.opendaylight.ovsdb.openstack.netvirt.api.Constants; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -99,8 +98,10 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface { Long pid = (Long) ref.getProperty(org.osgi.framework.Constants.SERVICE_ID); Object handlerTypeObject = ref.getProperty(Constants.EVENT_HANDLER_TYPE_PROPERTY); if (!(handlerTypeObject instanceof AbstractEvent.HandlerType)){ + // The exception should give us a stacktrace LOG.error("Abstract handler reg failed to provide a valid handler type: {} ref: {} handler: {}", - handlerTypeObject, ref.getClass().getName(), handler.getClass().getName()); + handlerTypeObject, ref.getClass().getName(), handler.getClass().getName(), + new IllegalArgumentException("Missing handler type")); return; } AbstractEvent.HandlerType handlerType = (AbstractEvent.HandlerType) handlerTypeObject; @@ -141,7 +142,7 @@ public class EventDispatcherImpl implements EventDispatcher, ConfigInterface { } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) {} + public void setDependencies(ServiceReference serviceReference) {} @Override public void setDependencies(Object impl) {} diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3Adapter.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3Adapter.java index b679902d37..b381f87d53 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3Adapter.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3Adapter.java @@ -34,7 +34,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -311,6 +310,13 @@ public class NeutronL3Adapter implements ConfigInterface { } this.updateL3ForNeutronPort(neutronPort, currPortShouldBeDeleted); } + + if (isDelete) { + /* + * Bug 4277: Remove the router interface cache only after deleting the neutron port l3 flows. + */ + this.cleanupRouterCache(neutronRouterInterface); + } } /** @@ -806,13 +812,7 @@ public class NeutronL3Adapter implements ConfigInterface { } } - // Keep cache for finding router's mac from network uuid -- remove - // - if (isDelete) { - networkIdToRouterMacCache.remove(neutronNetwork.getNetworkUUID()); - networkIdToRouterIpListCache.remove(neutronNetwork.getNetworkUUID()); - subnetIdToRouterInterfaceCache.remove(subnet.getSubnetUUID()); - } + // Keep cache for finding router's mac from network uuid -- NOTE: remove is done later, via cleanupRouterCache() } private void programFlowForNetworkFromExternal(final Node node, @@ -1274,6 +1274,21 @@ public class NeutronL3Adapter implements ConfigInterface { return null; } + private void cleanupRouterCache(final NeutronRouter_Interface neutronRouterInterface) { + /* + * Fix for 4277 + * Remove the router cache only after deleting the neutron + * port l3 flows. + */ + final NeutronPort neutronPort = neutronPortCache.getPort(neutronRouterInterface.getPortUUID()); + + if (neutronPort != null) { + networkIdToRouterMacCache.remove(neutronPort.getNetworkUUID()); + networkIdToRouterIpListCache.remove(neutronPort.getNetworkUUID()); + subnetIdToRouterInterfaceCache.remove(neutronRouterInterface.getSubnetUUID()); + } + } + public void triggerGatewayMacResolver(final Node node, final NeutronPort gatewayPort ){ Preconditions.checkNotNull(node); @@ -1334,7 +1349,7 @@ public class NeutronL3Adapter implements ConfigInterface { } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { tenantNetworkManager = (TenantNetworkManager) ServiceHelper.getGlobalInstance(TenantNetworkManager.class, this); configurationService = diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImpl.java index b6b36a57cf..0f7cd69893 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImpl.java @@ -23,7 +23,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -165,13 +165,12 @@ public class NodeCacheManagerImpl extends AbstractHandler implements NodeCacheMa } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { southbound = (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); eventDispatcher = (EventDispatcher) ServiceHelper.getGlobalInstance(EventDispatcher.class, this); - eventDispatcher.eventHandlerAdded( - bundleContext.getServiceReference(NodeCacheManager.class.getName()), this); + eventDispatcher.eventHandlerAdded(serviceReference, this); } @Override diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OpenstackRouter.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OpenstackRouter.java index eb4bbeb803..d64e7fd520 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OpenstackRouter.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OpenstackRouter.java @@ -13,7 +13,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.MultiTenantAwareRouter; import java.net.InetAddress; import java.util.UUID; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; /** @@ -83,7 +83,7 @@ public class OpenstackRouter implements MultiTenantAwareRouter, ConfigInterface } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbInventoryServiceImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbInventoryServiceImpl.java index 99af881400..ea6bc98e8b 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbInventoryServiceImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbInventoryServiceImpl.java @@ -23,7 +23,6 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -70,7 +69,7 @@ public class OvsdbInventoryServiceImpl implements ConfigInterface, OvsdbInventor } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) {} + public void setDependencies(ServiceReference serviceReference) {} @Override public void setDependencies(Object impl) {} diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImpl.java index 687534940e..e7a4e370c1 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImpl.java @@ -8,7 +8,6 @@ package org.opendaylight.ovsdb.openstack.netvirt.impl; -import java.util.HashMap; import java.util.Map; import org.opendaylight.ovsdb.openstack.netvirt.ConfigInterface; @@ -18,7 +17,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.NetworkingProviderManager; import org.opendaylight.ovsdb.openstack.netvirt.api.OvsdbInventoryService; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -82,7 +81,7 @@ public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingPr } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { ovsdbInventoryService = (OvsdbInventoryService) ServiceHelper.getGlobalInstance(OvsdbInventoryService.class, this); } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImpl.java index a2087e14e5..4409731be4 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImpl.java @@ -25,7 +25,7 @@ import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -302,7 +302,7 @@ public class SecurityServicesImpl implements ConfigInterface, SecurityServicesMa } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { southbound = (Southbound) ServiceHelper.getGlobalInstance(Southbound.class, this); } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SouthboundImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SouthboundImpl.java index 22934ea409..4200448a6a 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SouthboundImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SouthboundImpl.java @@ -165,10 +165,10 @@ public class SouthboundImpl implements Southbound { return value; } - public boolean addBridge(Node ovsdbNode, String bridgeName, String target) { + public boolean addBridge(Node ovsdbNode, String bridgeName, List controllersStr) { boolean result = false; - LOG.info("addBridge: node: {}, bridgeName: {}, target: {}", ovsdbNode, bridgeName, target); + LOG.info("addBridge: node: {}, bridgeName: {}, controller(s): {}", ovsdbNode, bridgeName, controllersStr); ConnectionInfo connectionInfo = getConnectionInfo(ovsdbNode); if (connectionInfo != null) { NodeBuilder bridgeNodeBuilder = new NodeBuilder(); @@ -177,7 +177,7 @@ public class SouthboundImpl implements Southbound { NodeId bridgeNodeId = MdsalHelper.createManagedNodeId(bridgeIid); bridgeNodeBuilder.setNodeId(bridgeNodeId); OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder = new OvsdbBridgeAugmentationBuilder(); - ovsdbBridgeAugmentationBuilder.setControllerEntry(createControllerEntries(target)); + ovsdbBridgeAugmentationBuilder.setControllerEntry(createControllerEntries(controllersStr)); ovsdbBridgeAugmentationBuilder.setBridgeName(new OvsdbBridgeName(bridgeName)); ovsdbBridgeAugmentationBuilder.setProtocolEntry(createMdsalProtocols()); ovsdbBridgeAugmentationBuilder.setFailMode( @@ -262,10 +262,10 @@ public class SouthboundImpl implements Southbound { ovsdbBridgeAugmentationBuilder.setManagedBy(new OvsdbNodeRef(connectionNodePath)); } - private void setControllerForBridge(Node ovsdbNode, String bridgeName, String targetString) { + private void setControllersForBridge(Node ovsdbNode, String bridgeName, List controllersString) { ConnectionInfo connectionInfo = getConnectionInfo(ovsdbNode); if (connectionInfo != null) { - for (ControllerEntry controllerEntry: createControllerEntries(targetString)) { + for (ControllerEntry controllerEntry : createControllerEntries(controllersString)) { InstanceIdentifier iid = MdsalHelper.createInstanceIdentifier(ovsdbNode.getKey(), bridgeName) .augmentation(OvsdbBridgeAugmentation.class) @@ -277,11 +277,15 @@ public class SouthboundImpl implements Southbound { } } - private List createControllerEntries(String targetString) { - List controllerEntries = new ArrayList(); - ControllerEntryBuilder controllerEntryBuilder = new ControllerEntryBuilder(); - controllerEntryBuilder.setTarget(new Uri(targetString)); - controllerEntries.add(controllerEntryBuilder.build()); + private List createControllerEntries(List controllersStr) { + List controllerEntries = new ArrayList<>(); + if (controllersStr != null) { + for (String controllerStr : controllersStr) { + ControllerEntryBuilder controllerEntryBuilder = new ControllerEntryBuilder(); + controllerEntryBuilder.setTarget(new Uri(controllerStr)); + controllerEntries.add(controllerEntryBuilder.build()); + } + } return controllerEntries; } diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java index 63364b6f73..53ba42d27a 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java @@ -22,7 +22,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.VlanConfigurationCache; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -172,7 +172,7 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { vlanConfigurationCache = (VlanConfigurationCache) ServiceHelper.getGlobalInstance(VlanConfigurationCache.class, this); southbound = diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImpl.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImpl.java index 4a491537fc..ead275b352 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImpl.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImpl.java @@ -20,7 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import com.google.common.collect.Maps; import java.util.List; import java.util.Map; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -112,7 +112,7 @@ public class VlanConfigurationCacheImpl implements ConfigInterface, VlanConfigur } @Override - public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) { + public void setDependencies(ServiceReference serviceReference) { tenantNetworkManager = (TenantNetworkManager) ServiceHelper.getGlobalInstance(TenantNetworkManager.class, this); southbound = diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandlerTest.java index 4d9435ef4e..7eade31809 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FWaasHandlerTest.java @@ -26,9 +26,7 @@ import org.opendaylight.neutron.spi.NeutronFirewall; import org.opendaylight.neutron.spi.NeutronFirewallPolicy; import org.opendaylight.neutron.spi.NeutronFirewallRule; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; -import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -152,7 +150,7 @@ public class FWaasHandlerTest { PowerMockito.mockStatic(ServiceHelper.class); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, fwaasHandler)).thenReturn(eventDispatcher); - fwaasHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + fwaasHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", fwaasHandler.eventDispatcher, eventDispatcher); } diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandlerTest.java index c05ac5e013..e18b7a4f4b 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/FloatingIPHandlerTest.java @@ -26,7 +26,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -85,7 +84,7 @@ public class FloatingIPHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, floatingHandler)).thenReturn(eventDispatcher); PowerMockito.when(ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, floatingHandler)).thenReturn(neutronL3Adapter); - floatingHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + floatingHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", floatingHandler.eventDispatcher, eventDispatcher); assertEquals("Error, did not return the correct object", getNeutronL3Adapter(), neutronL3Adapter); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandlerTest.java index d2cad128a6..42ff6d4c26 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSHandlerTest.java @@ -47,7 +47,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.LoadBalancerProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -201,7 +201,7 @@ public class LBaaSHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, lbaasHandler)).thenReturn(loadBalancerProvider); PowerMockito.when(ServiceHelper.getGlobalInstance(NodeCacheManager.class, lbaasHandler)).thenReturn(nodeCacheManager); - lbaasHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + lbaasHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", lbaasHandler.eventDispatcher, eventDispatcher); assertEquals("Error, did not return the correct object", getField("loadBalancerProvider"), loadBalancerProvider); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandlerTest.java index 9ed3dbe4aa..4cb99948a2 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolHandlerTest.java @@ -46,7 +46,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.LoadBalancerProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -197,7 +197,7 @@ public class LBaaSPoolHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, lBaaSPoolHandler)).thenReturn(loadBalancerProvider); PowerMockito.when(ServiceHelper.getGlobalInstance(NodeCacheManager.class, lBaaSPoolHandler)).thenReturn(nodeCacheManager); - lBaaSPoolHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + lBaaSPoolHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", lBaaSPoolHandler.eventDispatcher, eventDispatcher); assertEquals("Error, did not return the correct object", getField("loadBalancerProvider"), loadBalancerProvider); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandlerTest.java index d9575c3b63..4bdce6ce0c 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/LBaaSPoolMemberHandlerTest.java @@ -46,7 +46,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.LoadBalancerProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -220,7 +220,7 @@ public class LBaaSPoolMemberHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(LoadBalancerProvider.class, lBaaSPoolMemberHandler)).thenReturn(loadBalancerProvider); PowerMockito.when(ServiceHelper.getGlobalInstance(NodeCacheManager.class, lBaaSPoolMemberHandler)).thenReturn(nodeCacheManager); - lBaaSPoolMemberHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + lBaaSPoolMemberHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", lBaaSPoolMemberHandler.eventDispatcher, eventDispatcher); assertEquals("Error, did not return the correct object", getField("loadBalancerProvider"), loadBalancerProvider); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandlerTest.java index 53bffdcd6a..8890cfaa9a 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/NetworkHandlerTest.java @@ -40,7 +40,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -164,7 +164,7 @@ public class NetworkHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, networkHandler)).thenReturn(southbound); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, networkHandler)).thenReturn(eventDispatcher); - networkHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + networkHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("tenantNetworkManager"), tenantNetworkManager); assertEquals("Error, did not return the correct object", getField("bridgeConfigurationManager"), bridgeConfigurationManager); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandlerTest.java index db98417f9a..fda2e76005 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortHandlerTest.java @@ -35,7 +35,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -120,7 +120,7 @@ public class PortHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, portHandler)).thenReturn(southbound); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, portHandler)).thenReturn(eventDispatcher); - portHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + portHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("nodeCacheManager"), nodeCacheManager); assertEquals("Error, did not return the correct object", getField("neutronL3Adapter"), neutronL3Adapter); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandlerTest.java index 5668c06283..b3c4525af5 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandlerTest.java @@ -26,7 +26,6 @@ import org.opendaylight.neutron.spi.NeutronSecurityGroup; import org.opendaylight.neutron.spi.NeutronSecurityRule; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -101,7 +100,7 @@ public class PortSecurityHandlerTest { PowerMockito.mockStatic(ServiceHelper.class); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, portSecurityHandler)).thenReturn(eventDispatcher); - portSecurityHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + portSecurityHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", portSecurityHandler.eventDispatcher, eventDispatcher); } diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandlerTest.java index bccb4dccea..a004864163 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/RouterHandlerTest.java @@ -27,7 +27,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -97,7 +96,7 @@ public class RouterHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, routerHandler)).thenReturn(neutronL3Adapter); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, routerHandler)).thenReturn(eventDispatcher); - routerHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + routerHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("neutronL3Adapter"), neutronL3Adapter); assertEquals("Error, did not return the correct object", routerHandler.eventDispatcher, eventDispatcher); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandlerTest.java index 818f285489..57b94a319e 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandlerTest.java @@ -46,7 +46,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yangtools.yang.binding.DataObject; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -254,7 +253,7 @@ public class SouthboundHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, southboundHandler)).thenReturn(eventDispatcher); PowerMockito.when(ServiceHelper.getGlobalInstance(OvsdbInventoryService.class, southboundHandler)).thenReturn(ovsdbInventoryService); - southboundHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + southboundHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("configurationService"), configurationService); assertEquals("Error, did not return the correct object", getField("networkingProviderManager"), networkingProviderManager); assertEquals("Error, did not return the correct object", getField("tenantNetworkManager"), tenantNetworkManager); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandlerTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandlerTest.java index d473217aa4..543a4e0308 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandlerTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/SubnetHandlerTest.java @@ -26,7 +26,6 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher; import org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; -import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -85,7 +84,7 @@ public class SubnetHandlerTest { PowerMockito.when(ServiceHelper.getGlobalInstance(NeutronL3Adapter.class, subnetHandler)).thenReturn(neutronL3Adapter); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, subnetHandler)).thenReturn(eventDispatcher); - subnetHandler.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + subnetHandler.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("neutronL3Adapter"), neutronL3Adapter); assertEquals("Error, did not return the correct object", subnetHandler.eventDispatcher, eventDispatcher); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImplTest.java index d549a34898..8c48b2709a 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImplTest.java @@ -12,6 +12,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyList; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.RETURNS_MOCKS; @@ -43,7 +44,7 @@ import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -222,7 +223,7 @@ public class BridgeConfigurationManagerImplTest { PowerMockito.mockStatic(ConfigProperties.class); when(ConfigProperties.getProperty(any(Class.class), anyString())).thenReturn(ADDRESS); - when(southbound.addBridge(any(Node.class), anyString(), anyString())).thenReturn(true); + when(southbound.addBridge(any(Node.class), anyString(), anyList())).thenReturn(true); when(configurationService.isL3ForwardingEnabled()).thenReturn(true); bridgeConfigurationManagerImpl.prepareNode(node); @@ -338,7 +339,7 @@ public class BridgeConfigurationManagerImplTest { PowerMockito.when(ServiceHelper.getGlobalInstance(NetworkingProviderManager.class, bridgeConfigurationManagerImpl)).thenReturn(networkingProviderManager); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, bridgeConfigurationManagerImpl)).thenReturn(southbound); - bridgeConfigurationManagerImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + bridgeConfigurationManagerImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("configurationService"), configurationService); assertEquals("Error, did not return the correct object", getField("networkingProviderManager"), networkingProviderManager); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImplTest.java index 9c774bcfb2..bce39e44c1 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ConfigurationServiceImplTest.java @@ -28,7 +28,7 @@ import org.opendaylight.ovsdb.utils.config.ConfigProperties; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -96,7 +96,7 @@ public class ConfigurationServiceImplTest { PowerMockito.mockStatic(ServiceHelper.class); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, configurationServiceImpl)).thenReturn(southbound); - configurationServiceImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + configurationServiceImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("southbound"), southbound); } diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3AdapterTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3AdapterTest.java index 82ccf2571e..e5566bdf85 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3AdapterTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NeutronL3AdapterTest.java @@ -63,7 +63,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.api.support.membermodification.MemberMatcher; @@ -583,6 +583,7 @@ public class NeutronL3AdapterTest { NeutronPort neutronPort = mock(NeutronPort.class); when(neutronPort.getMacAddress()).thenReturn(MAC_ADDRESS); when(neutronPort.getFixedIPs()).thenReturn(ips); + when(neutronPort.getNetworkUUID()).thenReturn(UUID); NeutronSubnet neutronSubnet = mock(NeutronSubnet.class); when(neutronSubnet.getNetworkUUID()).thenReturn(UUID); when(neutronSubnet.getGatewayIP()).thenReturn(IP); @@ -591,6 +592,7 @@ public class NeutronL3AdapterTest { when(neutronNetwork.getProviderSegmentationID()).thenReturn(ID); when(neutronNetwork.getRouterExternal()).thenReturn(false); //might change that to true when(neutronNetwork.getNetworkUUID()).thenReturn(UUID); + NeutronRouter neutronRouter = mock(NeutronRouter.class); Node node = mock(Node.class); List nodes = new ArrayList(); @@ -605,6 +607,7 @@ public class NeutronL3AdapterTest { // init instance variables INeutronPortCRUD neutronPortCache = mock(INeutronPortCRUD.class); PowerMockito.when(neutronPortCache.getPort(anyString())).thenReturn(neutronPort); + PowerMockito.when(neutronPortCache.getAllPorts()).thenReturn(new ArrayList()); INeutronSubnetCRUD neutronSubnetCache = mock(INeutronSubnetCRUD.class); PowerMockito.when(neutronSubnetCache.getSubnet(anyString())).thenReturn(neutronSubnet); INeutronNetworkCRUD neutronNetworkCache = mock(INeutronNetworkCRUD.class); @@ -638,14 +641,16 @@ public class NeutronL3AdapterTest { networkIdToRouterMacCache.put(UUID, MAC_ADDRESS); networkIdToRouterIpListCache.put(UUID, ips); + subnetIdToRouterInterfaceCache.put(UUID, intf); networkIdToRouterMacCacheSize = networkIdToRouterMacCache.size(); networkIdToRouterIpListCacheSize = networkIdToRouterIpListCache.size(); subnetIdToRouterInterfaceCacheSize = subnetIdToRouterInterfaceCache.size(); - Whitebox.invokeMethod(neutronL3Adapter, "programFlowsForNeutronRouterInterface", intf, true); + Whitebox.invokeMethod(neutronL3Adapter, "handleNeutronRouterInterfaceEvent", neutronRouter, intf, Action.DELETE); + PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowsForNeutronRouterInterface", intf, true); PowerMockito.verifyPrivate(neutronL3Adapter, times(2)).invoke("getDpidForIntegrationBridge", any(Node.class)); - PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowsForNeutronRouterInterfacePair", any(Node.class), anyLong(), any(NeutronRouter_Interface.class), any(NeutronRouter_Interface.class), any(NeutronNetwork.class), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE), anyBoolean()); + PowerMockito.verifyPrivate(neutronL3Adapter, times(2)).invoke("programFlowsForNeutronRouterInterfacePair", any(Node.class), anyLong(), any(NeutronRouter_Interface.class), any(NeutronRouter_Interface.class), any(NeutronNetwork.class), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE), anyBoolean()); PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowForNetworkFromExternal", any(Node.class), anyLong(), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE)); PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programStaticArpStage1", anyLong(), anyString(), anyString(), anyString(), eq(Action.DELETE)); PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programIpRewriteExclusionStage1", any(Node.class), anyLong(), anyString(), anyString(), eq(Action.DELETE)); @@ -947,7 +952,7 @@ public class NeutronL3AdapterTest { PowerMockito.when(ServiceHelper.getGlobalInstance(NodeCacheManager.class, neutronL3Adapter)).thenReturn(nodeCacheManager); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, neutronL3Adapter)).thenReturn(southbound); - neutronL3Adapter.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + neutronL3Adapter.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("tenantNetworkManager"), tenantNetworkManager); assertEquals("Error, did not return the correct object", getField("configurationService"), configurationService); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImplTest.java index 59bf8ec486..95a5ef5b6f 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/NodeCacheManagerImplTest.java @@ -30,7 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbNodeAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -123,7 +123,7 @@ public class NodeCacheManagerImplTest { PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, nodeCacheManagerImpl)).thenReturn(southbound); PowerMockito.when(ServiceHelper.getGlobalInstance(EventDispatcher.class, nodeCacheManagerImpl)).thenReturn(eventDispatcher); - nodeCacheManagerImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + nodeCacheManagerImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("southbound"), southbound); assertEquals("Error, did not return the correct object", getSuperField("eventDispatcher"), eventDispatcher); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImplTest.java index 606e27f0fd..5e345a4e38 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/ProviderNetworkManagerImplTest.java @@ -24,7 +24,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.NetworkingProvider; import org.opendaylight.ovsdb.openstack.netvirt.api.OvsdbInventoryService; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -85,7 +85,7 @@ public class ProviderNetworkManagerImplTest { PowerMockito.mockStatic(ServiceHelper.class); PowerMockito.when(ServiceHelper.getGlobalInstance(OvsdbInventoryService.class, providerNetworkManagerImpl)).thenReturn(ovsdbInventoryService); - providerNetworkManagerImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + providerNetworkManagerImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("ovsdbInventoryService"), ovsdbInventoryService); } diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImplTest.java index d7a2e31177..a3fa51bb19 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SecurityServicesImplTest.java @@ -29,7 +29,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityGroup; import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -90,7 +90,7 @@ public class SecurityServicesImplTest { PowerMockito.mockStatic(ServiceHelper.class); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, securityServicesImpl)).thenReturn(southbound); - securityServicesImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + securityServicesImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("southbound"), southbound); } diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImplTest.java index 23fe830cc4..70cfd6c561 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImplTest.java @@ -36,7 +36,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.VlanConfigurationCache; import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -178,7 +178,7 @@ public class TenantNetworkManagerImplTest { PowerMockito.when(ServiceHelper.getGlobalInstance(VlanConfigurationCache.class, tenantNetworkManagerImpl)).thenReturn(vlanConfigurationCache); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, tenantNetworkManagerImpl)).thenReturn(southbound); - tenantNetworkManagerImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + tenantNetworkManagerImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("vlanConfigurationCache"), vlanConfigurationCache); assertEquals("Error, did not return the correct object", getField("southbound"), southbound); diff --git a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImplTest.java b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImplTest.java index 7d23ebe9d3..d30fdacb15 100644 --- a/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImplTest.java +++ b/openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/VlanConfigurationCacheImplTest.java @@ -28,7 +28,7 @@ import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.osgi.framework.BundleContext; + import org.osgi.framework.ServiceReference; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -89,7 +89,7 @@ public class VlanConfigurationCacheImplTest { PowerMockito.when(ServiceHelper.getGlobalInstance(TenantNetworkManager.class, vlanConfigurationCacheImpl)).thenReturn(tenantNetworkManager); PowerMockito.when(ServiceHelper.getGlobalInstance(Southbound.class, vlanConfigurationCacheImpl)).thenReturn(southbound); - vlanConfigurationCacheImpl.setDependencies(mock(BundleContext.class), mock(ServiceReference.class)); + vlanConfigurationCacheImpl.setDependencies(mock(ServiceReference.class)); assertEquals("Error, did not return the correct object", getField("tenantNetworkManager"), tenantNetworkManager); assertEquals("Error, did not return the correct object", getField("southbound"), southbound); diff --git a/resources/commons/3-Node-Cluster-Setup-Environment-Variables.postman_environment b/resources/commons/3-Node-Cluster-Setup-Environment-Variables.postman_environment new file mode 100644 index 0000000000..dc824a06ca --- /dev/null +++ b/resources/commons/3-Node-Cluster-Setup-Environment-Variables.postman_environment @@ -0,0 +1,58 @@ +{ + "id": "61b7453f-15f4-39e5-8470-980d0805f9fb", + "name": "3 Node Cluster Setup Environment Variables", + "values": [ + { + "key": "NODE-1-IP", + "value": "192.168.201.2", + "type": "text", + "name": "NODE-1-IP", + "enabled": true + }, + { + "key": "NODE-2-IP", + "value": "192.168.201.3", + "type": "text", + "name": "NODE-2-IP", + "enabled": true + }, + { + "key": "NODE-3-IP", + "value": "192.168.201.4", + "type": "text", + "name": "NODE-3-IP", + "enabled": true + }, + { + "key": "HYPERVISOR-IP", + "value": "192.168.201.128", + "type": "text", + "name": "HYPERVISOR-IP", + "enabled": true + }, + { + "key": "HYPERVISOR-OVSDB-PORT", + "value": "16640", + "type": "text", + "name": "HYPERVISOR-OVSDB-PORT", + "enabled": true + }, + { + "key": "JOLOKIA-NODE-IP", + "value": "192.168.201.2", + "type": "text", + "name": "JOLOKIA-NODE-IP", + "enabled": true + }, + { + "key": "HYPERVISOR-NODE-ID", + "value": "192.168.201.128:16640", + "type": "text", + "name": "HYPERVISOR-NODE-ID", + "enabled": true + } + ], + "timestamp": 1443834815417, + "synced": false, + "syncedFilename": "" +} \ No newline at end of file diff --git a/resources/commons/ODL-Clustering.json.postman_collection b/resources/commons/ODL-Clustering.json.postman_collection new file mode 100644 index 0000000000..f25bdc7c8b --- /dev/null +++ b/resources/commons/ODL-Clustering.json.postman_collection @@ -0,0 +1,74 @@ +{ + "id": "429efdb8-6763-c457-43d3-0cae196dbe53", + "name": "ODL Clustering", + "description": "This collection contains request that fetch data related to clustering services, to check if cluster is up and running and topology/inventory shard related details.\n\nThis collection usage postman variables and it's defined in `3 Node Cluster Setup Environment Variables' file.", + "order": [ + "95f3ebe4-dd38-9ef5-8822-f657c8d5cd4b", + "3d8fb5eb-7de9-022a-8cb0-943826c468ff", + "7fb9aad2-f55f-97d0-5ee1-74724f161f7d" + ], + "folders": [], + "timestamp": 0, + "owner": "128022", + "remoteLink": "https://www.getpostman.com/collections/d1e5b3ce64a3d58710ec", + "public": false, + "requests": [ + { + "folder": null, + "id": "3d8fb5eb-7de9-022a-8cb0-943826c468ff", + "name": "Inventory Shard Details", + "dataMode": "params", + "data": [], + "rawModeData": null, + "descriptionFormat": "html", + "description": "This restconf request will fetch data about `Inventory Shard` from the clustering service.\nUser should direct this request to the controller where jolokia agent is installed.\n\nJOLOKIA-NODE-IP is defined in `3 Node Cluster Setup Environment Variables` file.", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "method": "GET", + "pathVariables": {}, + "url": "http://{{JOLOKIA-NODE-IP}}:8181/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-1-shard-inventory-config,type=DistributedConfigDatastore", + "preRequestScript": "", + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "collectionId": "429efdb8-6763-c457-43d3-0cae196dbe53" + }, + { + "folder": null, + "id": "7fb9aad2-f55f-97d0-5ee1-74724f161f7d", + "name": "Topology Shard Details", + "dataMode": "params", + "data": [], + "rawModeData": null, + "descriptionFormat": "html", + "description": "This restconf request will fetch data about `Topology Shard` from the clustering service.\nUser should direct this request to the controller where jolokia agent is installed.\n\nJOLOKIA-NODE-IP is defined in `3 Node Cluster Setup Environment Variables` file.", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "method": "GET", + "pathVariables": {}, + "url": "http://{{JOLOKIA-NODE-IP}}:8181/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-1-shard-topology-config,type=DistributedConfigDatastore", + "preRequestScript": "", + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "collectionId": "429efdb8-6763-c457-43d3-0cae196dbe53" + }, + { + "folder": null, + "id": "95f3ebe4-dd38-9ef5-8822-f657c8d5cd4b", + "name": "Cluster details", + "dataMode": "params", + "data": [], + "rawModeData": null, + "descriptionFormat": "html", + "description": "Fetch clustering related data and look for following details to make sure that cluster is up and running.\nMembers field should list all the cluster nodes added to the cluster.\nAlso the Unreachable fields should be empty.\nJOLOKIA-NODE-IP is defined in `3 Node Cluster Setup Environment Variables` file.\n", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "method": "GET", + "pathVariables": {}, + "url": "http://{{JOLOKIA-NODE-IP}}:8181/jolokia/read/akka:type=Cluster", + "preRequestScript": "", + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "collectionId": "429efdb8-6763-c457-43d3-0cae196dbe53" + } + ] +} \ No newline at end of file diff --git a/resources/commons/OVSDB_Southbound.postman_collection b/resources/commons/OVSDB_Southbound.postman_collection deleted file mode 100644 index b3a5225b57..0000000000 --- a/resources/commons/OVSDB_Southbound.postman_collection +++ /dev/null @@ -1,159 +0,0 @@ -{ - "id":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "name":"Ovsdb Southbound Collection", - "timestamp":1424977469540, - "order":[ - "da6876b9-d594-5e41-80b0-858e5a6b40b8", - "f930747d-8044-d544-5e81-1c1a492c80a3", - "eaf0abfa-820e-e554-a5df-7ee96bc0ef6a", - "e9e14494-2ff0-4bfe-2854-6100b91832ff", - "37f0baee-75a7-6b2f-0890-2b5d125110bc", - "ec2b5fdd-dfef-ad11-40e9-c9bbe235e845", - "b9064b3d-351d-d529-dc3a-b7907c76f134", - "fe956461-edb8-90ad-b9bc-5e95951fa757", - "d67eac2b-f77c-6ea5-ecfc-dab88c428c88" - ], - "owner":0, - "sharedWithTeam":false, - "synced":false, - "subscribed":false, - "hasRequests":true, - "requests":[ - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"37f0baee-75a7-6b2f-0890-2b5d125110bc", - "name":"Get Config Topology", - "description":"Fetch the config topology from configuration data store.", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/", - "method":"GET", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "responses":[ - - ], - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"b9064b3d-351d-d529-dc3a-b7907c76f134", - "name":"Create Specific Config Termination Point", - "description":"This restconf request creates port/interface and attach it to specific bridge. Using ovsdb:option, you can pass the optional input to port/interface create optional. E.g. remote_ip=xx.xx.xx.xx.", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest/termination-point/vxlanport/", - "method":"PUT", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", - "data":"{\n \"network-topology:termination-point\": [\n \t{\n \t\t\t\"ovsdb:options\": [\n \t\t\t{\n \"ovsdb:option\": \"remote_ip\",\n \"ovsdb:value\" : \"10.10.11.11\"\n\t\t \t}\n\t \t\t],\n\t \t\t\"ovsdb:name\": \"vxlanport\",\n \t\"ovsdb:interface-type\": \"ovsdb:interface-type-vxlan\",\n \t\t\t\"tp-id\": \"vxlanport\",\n \"vlan-tag\": \"1\",\n \"trunks\": [\n {\n \"trunk\": \"2\"\n },\n {\n \"trunk\": \"3\"\n }\n ],\n \"vlan-mode\":\"access\"\n\t\t}\n ]\n}", - "dataMode":"raw", - "timestamp":0, - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"d67eac2b-f77c-6ea5-ecfc-dab88c428c88", - "name":"Get Specific Config Termination Point", - "description":"Fetch configuration for specific termination point of the bridge from config data store.", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest/termination-point/vxlanport/", - "method":"GET", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"da6876b9-d594-5e41-80b0-858e5a6b40b8", - "name":"Create Specific Config OvsdbNode", - "description":"Fire this Restconf request if you want to initiate the connection to ovsdb node from controller. It assumes that ovsdb node is listening for tcp connection in passive mode. To configure the ovsdb node for listening incoming connection, please fire following command at ovsdb node machine\n\n\"ovs-vsctl set-manager tcp:16640\"", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:16640", - "method":"PUT", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", - "data":"{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://10.10.10.10:16640\",\n \"connection-info\": {\n \"ovsdb:remote-port\": 16640,\n \"ovsdb:remote-ip\": \"127.0.0.1\"\n }\n }\n ]\n}", - "dataMode":"raw", - "timestamp":0, - "version":2, - "time":1428968453378 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"e9e14494-2ff0-4bfe-2854-6100b91832ff", - "name":"Delete Specific Config OvsdbNode", - "description":"This restconf request delete any node (ovsdb node or bridge node) from the config data store. You can use the same request to delete the ovsdb node by using the following URI: http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest", - "method":"DELETE", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"eaf0abfa-820e-e554-a5df-7ee96bc0ef6a", - "name":"Create Specific Config Bridge", - "description":"This restconf request creates bridge on the specified ovsdb node. Restconf URI contains node-id and this node-id has ip address and port. To determine the ip address and port information, fire \"Get Operational Topology\" restconf request and search for node where you want to create a bridge and then use the ip-address / port details from that output. Once you find out the ip-address/port, update the node-id and ovsdb:managed-by element in the restconf body.\n\n Note: these %2F ('/') in the url are not there by mistake, those are there intentionally because node-id can contain '/'.\n\n Note:Bridge name should not contain '-' in it, If you bridge name will contain '-', bridge creation will fail. It's know bug and under investigation.", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest", - "method":"PUT", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", - "data":"{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://10.10.10.10:22222/bridge/brtest\",\n \"ovsdb:bridge-name\": \"brtest\",\n \"ovsdb:datapath-id\": \"00:00:b2:bf:48:25:f2:4b\",\n \"ovsdb:protocol-entry\": [\n {\n \"protocol\": \"ovsdb:ovsdb-bridge-protocol-openflow-13\"\n }\n ],\n \"ovsdb:controller-entry\": [\n {\n \"target\": \"tcp:11.11.11.11:6633\"\n }\n ],\n \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://10.10.10.10:22222']\"\n }\n ]\n}", - "dataMode":"raw", - "timestamp":0, - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"ec2b5fdd-dfef-ad11-40e9-c9bbe235e845", - "name":"Get Specific Config OvsdbNode", - "description":"This restconf request fetch the configuration for specific node (ovsdb node or bridge node)", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest", - "method":"GET", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"f930747d-8044-d544-5e81-1c1a492c80a3", - "name":"Get Operational Topology", - "description":"This restconf request will fetch the operational topology. Operational topology details are fetch by southbound plugin from all the connected ovsdb node.", - "url":"http://localhost:8080/restconf/operational/network-topology:network-topology/", - "method":"GET", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "responses":[ - - ], - "version":2 - }, - { - "collectionId":"ebc00c37-8a7e-f980-5b19-3f62212c5a58", - "id":"fe956461-edb8-90ad-b9bc-5e95951fa757", - "name":"Delete Specific ConfigTermination Point", - "description":"Delete configuration of specified termination point of bridge. ", - "url":"http://localhost:8080/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F10.10.10.10:22222%2Fbridge%2Fbrtest/termination-point/vxlanport/", - "method":"DELETE", - "headers":"Authorization: Basic YWRtaW46YWRtaW4=\n", - "data":[ - - ], - "dataMode":"params", - "timestamp":0, - "version":2 - } - ] -} diff --git a/resources/commons/Ovsdb-Southbound-Collection-for-3-Node-Cluster.json.postman_collection b/resources/commons/Ovsdb-Southbound-Collection-for-3-Node-Cluster.json.postman_collection new file mode 100644 index 0000000000..a79dd4f92b --- /dev/null +++ b/resources/commons/Ovsdb-Southbound-Collection-for-3-Node-Cluster.json.postman_collection @@ -0,0 +1,821 @@ +{ + "id": "4cd83ae0-a164-c12a-a872-c2205817594a", + "name": "Ovsdb Southbound Collection for 3 Node Cluster", + "description": "All the rest conf request present in this collection depends on the \"3 Node Cluster Setup Environment Variables\" file.\n\nYou need to import this file, using the \"Manager Environment\" option present in the right top cornor of the postman window.", + "order": [ + "be720a0e-5a69-91e2-93fb-5ffc4efe7f8c", + "4980abaf-b36a-42c7-4cde-cdc3d0ef594d", + "783d6e22-bfb0-9bec-bc24-da5d75b82123", + "2be310a1-3741-8881-fca1-b8bbc7daae7e", + "843e0282-c43e-4754-d415-f2a59b3eeb65", + "001d0bb8-5918-db89-e360-2fa5d5747cf3", + "a51f9d53-7917-7d2a-655c-d7f772045122", + "87269c7c-4a76-6dc1-036a-91be949477b0", + "24afe1e9-d235-0eec-2b3d-465168b30242", + "47fa5fbe-2b71-aae5-1859-fb42090efd24", + "319fede8-b756-8c67-b0b2-bf1cf6a4070b", + "dcafada2-2452-3701-f26c-c189e18f3ab0", + "9ff5feea-b08d-b0b7-2934-1cf6c10ab643", + "821cc80a-d417-a2ea-36e5-6138252a8ecb", + "3f4c1bd6-8b5e-9e0c-577f-7e0dcfa84cdd", + "d7e5948a-cab1-a6eb-32bd-a9220691a6d6", + "b9748414-6b9d-4fcc-2f43-b6be86a4e4be", + "c9430389-323d-452f-a204-c8c0ef12dcf6", + "35c25342-e126-393b-f74b-d3f828983ba1", + "c60b33eb-c776-06fc-1f28-551c429ad196", + "01cdfc13-82a8-5989-12d0-0e029609f1b8", + "b0592ca5-7d6a-ebd4-6f98-c431d1c11ce7", + "d9b65865-d54b-408b-f868-3e71fee53593", + "5e628d2c-cadf-4ca8-1800-6517c07cb917", + "cef78015-fff6-62f0-698b-76f26505e6df", + "f42c21e0-116d-5428-1dfb-9b01e8ad72fa", + "b592f176-36a7-6830-f3a9-0547f18bcd2d", + "499c888c-0868-3241-603e-5c775f9cd678", + "c24aebbf-bb85-3201-f605-21e7fef17ae1", + "7ee803d2-3326-5f61-8fc0-5ebd8ac2c56c", + "11dd55f7-7f0c-f6ce-8377-4b08919b073e", + "bd270450-ee6a-6ebb-f7f1-8e0461ee4f56", + "c01d85a0-5f9a-54ef-f2ff-3aefef8c465e", + "38b350e8-4349-f5a0-5d42-61ef885a4d9d", + "92688f6e-dd8b-5b2f-4525-ecfccf4d6248", + "ff01de93-1b51-200a-87d0-443091fdfb78", + "6cf9fe58-77ca-fac5-bf9a-b5294254a9ef", + "b4f9dbc2-ab25-e45b-302f-cd058367d8a9", + "36fe5adc-41a9-859d-6986-205685fc832d", + "70f19c4e-9c96-7774-36ec-424566c24597", + "a110b75d-6445-2618-09e6-2f4ff0ab387d", + "939becd9-43d9-be67-0cec-49caf45aaef8" + ], + "folders": [], + "timestamp": 1443832335637, + "owner": "128022", + "remoteLink": "", + "public": false, + "requests": [ + { + "id": "001d0bb8-5918-db89-e360-2fa5d5747cf3", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834393294, + "name": "Node-3-OVSDB Operational Topology", + "description": "This restconf request fetches the topology details from the `Operational` data store that contains details about all the connected hypervisor, bridges present on the hypervisor and termination point connected to each bridge.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "01cdfc13-82a8-5989-12d0-0e029609f1b8", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834419934, + "name": "Node-3-OVSDB Bridge Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for specific bridge (`brtest`) present on the given ovsdb server/hypervisor(`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "11dd55f7-7f0c-f6ce-8377-4b08919b073e", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834274756, + "name": "Node-1-Termination Point Configuration Data", + "description": "This restconf request fetch data from `Configuration` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "24afe1e9-d235-0eec-2b3d-465168b30242", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834401766, + "name": "Node-3-OVSDB Server Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "2be310a1-3741-8881-fca1-b8bbc7daae7e", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834214050, + "name": "Node-1-OVSDB Operational Topology", + "description": "This restconf request fetches the topology details from the `Operational` data store that contains details about all the connected hypervisor, bridges present on the hypervisor and termination point connected to each bridge.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "319fede8-b756-8c67-b0b2-bf1cf6a4070b", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834321665, + "name": "Node-2-OVSDB Server Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "35c25342-e126-393b-f74b-d3f828983ba1", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834250855, + "name": "Node-1-OVSDB Bridge Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for specific bridge (`brtest`) present on the given ovsdb server/hypervisor(`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "36fe5adc-41a9-859d-6986-205685fc832d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834453771, + "name": "Node-3-Create Termination Point on Given Bridge", + "description": "This restconf request creates port/interface (`testport`) and attach it to give bridge (`HYPERVISOR-NODE-ID`). Using ovsdb:option, you can pass the optional input to port/interface create optional. E.g. remote_ip=xx.xx.xx.xx.\n\n Note: Please change the attributes of the interface if you don't want to create this default termination point.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:termination-point\": [\n \t{\n \t\t\t\"ovsdb:options\": [\n \t\t\t{\n \"ovsdb:option\": \"remote_ip\",\n \"ovsdb:value\" : \"10.10.14.11\"\n\t\t \t}\n\t \t\t],\n\t \t\t\"ovsdb:name\": \"testport\",\n \t\"ovsdb:interface-type\": \"ovsdb:interface-type-vxlan\",\n \t\t\t\"tp-id\": \"testport\",\n \"vlan-tag\": \"1\",\n \"trunks\": [\n {\n \"trunk\": \"5\"\n }\n ],\n \"vlan-mode\":\"access\"\n\t\t}\n ]\n}" + }, + { + "id": "38b350e8-4349-f5a0-5d42-61ef885a4d9d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834281860, + "name": "Node-1-Termination Point Operational Data", + "description": "This restconf request fetch data from `Operational` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "3f4c1bd6-8b5e-9e0c-577f-7e0dcfa84cdd", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834410953, + "name": "Node-3-Connect to the OVSDB Server", + "description": "This Restconf request will ask controller to initiate the connection to ovsdb server running on hypervisor. Controller assumes that ovsdb server is listening for tcp connection in passive mode. To configure the ovsdb server to listen in passive mode, please fire following command on hypervisor\n\n`ovs-vsctl set-manager ptcp:16640`\n\nwhatever port number you use here, you should use the same port number for HYPERVISOR-OVSDB-PORT key in \"Single Node Cluster Setup Environment\" Environmen file.\n\n Note: Please set the environment variable `HYPERVISOR-IP` to the hypervisor ip that is running OVSDB server and `HYPERVISOR-OVSDB-PORT` to the port number on which OVSDB server is listening. Both of these environment variables are present in the \"Single Node Cluster Setup Enviornment\" file. ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}\",\n \"connection-info\": {\n \"ovsdb:remote-port\": \"{{HYPERVISOR-OVSDB-PORT}}\",\n \"ovsdb:remote-ip\": \"{{HYPERVISOR-IP}}\"\n }\n }\n ]\n}" + }, + { + "id": "47fa5fbe-2b71-aae5-1859-fb42090efd24", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834223225, + "name": "Node-1-OVSDB Server Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "4980abaf-b36a-42c7-4cde-cdc3d0ef594d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834302452, + "name": "Node-2-OVSDB Configuration Topology", + "description": "This restconf request fetch the topology details from `Configuration` data store that is pushed by user..", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "499c888c-0868-3241-603e-5c775f9cd678", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834269373, + "name": "Node-1-Delete OVS Bridge on Hypervisor", + "description": "This restconf request deletes OVS bridge (`brtest`) on the hypervisor with the node-id provided through `HYPERVISOR-NODE-ID` environment variable set in the `Single Node Cluster Setup Environment` file.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "5e628d2c-cadf-4ca8-1800-6517c07cb917", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834426689, + "name": "Node-3-OVSDB Bridge Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for specific bridge (`brtest`) present on given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "6cf9fe58-77ca-fac5-bf9a-b5294254a9ef", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834286293, + "name": "Node-1-Create Termination Point on Given Bridge", + "description": "This restconf request creates port/interface (`testport`) and attach it to give bridge (`HYPERVISOR-NODE-ID`). Using ovsdb:option, you can pass the optional input to port/interface create optional. E.g. remote_ip=xx.xx.xx.xx.\n\n Note: Please change the attributes of the interface if you don't want to create this default termination point.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:termination-point\": [\n \t{\n \t\t\t\"ovsdb:options\": [\n \t\t\t{\n \"ovsdb:option\": \"remote_ip\",\n \"ovsdb:value\" : \"10.10.14.11\"\n\t\t \t}\n\t \t\t],\n\t \t\t\"ovsdb:name\": \"testport\",\n \t\"ovsdb:interface-type\": \"ovsdb:interface-type-vxlan\",\n \t\t\t\"tp-id\": \"testport\",\n \"vlan-tag\": \"1\",\n \"trunks\": [\n {\n \"trunk\": \"5\"\n }\n ],\n \"vlan-mode\":\"access\"\n\t\t}\n ]\n}" + }, + { + "id": "70f19c4e-9c96-7774-36ec-424566c24597", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834290451, + "name": "Node-1-Delete Termination Point on Given Bridge", + "description": "Delete termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`). ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "783d6e22-bfb0-9bec-bc24-da5d75b82123", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834389570, + "name": "Node-3-OVSDB Configuration Topology", + "description": "This restconf request fetch the topology details from `Configuration` data store that is pushed by user..", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "7ee803d2-3326-5f61-8fc0-5ebd8ac2c56c", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834438109, + "name": "Node-3-Delete OVS Bridge on Hypervisor", + "description": "This restconf request deletes OVS bridge (`brtest`) on the hypervisor with the node-id provided through `HYPERVISOR-NODE-ID` environment variable set in the `Single Node Cluster Setup Environment` file.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "821cc80a-d417-a2ea-36e5-6138252a8ecb", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834326599, + "name": "Node-2-Connect to the OVSDB Server", + "description": "This Restconf request will ask controller to initiate the connection to ovsdb server running on hypervisor. Controller assumes that ovsdb server is listening for tcp connection in passive mode. To configure the ovsdb server to listen in passive mode, please fire following command on hypervisor\n\n`ovs-vsctl set-manager ptcp:16640`\n\nwhatever port number you use here, you should use the same port number for HYPERVISOR-OVSDB-PORT key in \"Single Node Cluster Setup Environment\" Environmen file.\n\n Note: Please set the environment variable `HYPERVISOR-IP` to the hypervisor ip that is running OVSDB server and `HYPERVISOR-OVSDB-PORT` to the port number on which OVSDB server is listening. Both of these environment variables are present in the \"Single Node Cluster Setup Enviornment\" file. ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}\",\n \"connection-info\": {\n \"ovsdb:remote-port\": \"{{HYPERVISOR-OVSDB-PORT}}\",\n \"ovsdb:remote-ip\": \"{{HYPERVISOR-IP}}\"\n }\n }\n ]\n}" + }, + { + "id": "843e0282-c43e-4754-d415-f2a59b3eeb65", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834311880, + "name": "Node-2-OVSDB Operational Topology", + "description": "This restconf request fetches the topology details from the `Operational` data store that contains details about all the connected hypervisor, bridges present on the hypervisor and termination point connected to each bridge.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "87269c7c-4a76-6dc1-036a-91be949477b0", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834316676, + "name": "Node-2-OVSDB Server Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "92688f6e-dd8b-5b2f-4525-ecfccf4d6248", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834361798, + "name": "Node-2-Termination Point Operational Data", + "description": "This restconf request fetch data from `Operational` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "939becd9-43d9-be67-0cec-49caf45aaef8", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834458122, + "name": "Node-3-Delete Termination Point on Given Bridge", + "description": "Delete termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`). ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "9ff5feea-b08d-b0b7-2934-1cf6c10ab643", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834229957, + "name": "Node-1-Connect to the OVSDB Server", + "description": "This Restconf request will ask controller to initiate the connection to ovsdb server running on hypervisor. Controller assumes that ovsdb server is listening for tcp connection in passive mode. To configure the ovsdb server to listen in passive mode, please fire following command on hypervisor\n\n`ovs-vsctl set-manager ptcp:16640`\n\nwhatever port number you use here, you should use the same port number for HYPERVISOR-OVSDB-PORT key in \"Single Node Cluster Setup Environment\" Environmen file.\n\n Note: Please set the environment variable `HYPERVISOR-IP` to the hypervisor ip that is running OVSDB server and `HYPERVISOR-OVSDB-PORT` to the port number on which OVSDB server is listening. Both of these environment variables are present in the \"Single Node Cluster Setup Enviornment\" file. ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}\",\n \"connection-info\": {\n \"ovsdb:remote-port\": \"{{HYPERVISOR-OVSDB-PORT}}\",\n \"ovsdb:remote-ip\": \"{{HYPERVISOR-IP}}\"\n }\n }\n ]\n}" + }, + { + "id": "a110b75d-6445-2618-09e6-2f4ff0ab387d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834373402, + "name": "Node-2-Delete Termination Point on Given Bridge", + "description": "Delete termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`). ", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "a51f9d53-7917-7d2a-655c-d7f772045122", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834218789, + "name": "Node-1-OVSDB Server Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "b0592ca5-7d6a-ebd4-6f98-c431d1c11ce7", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834257622, + "name": "Node-1-OVSDB Bridge Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for specific bridge (`brtest`) present on given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "b4f9dbc2-ab25-e45b-302f-cd058367d8a9", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834368804, + "name": "Node-2-Create Termination Point on Given Bridge", + "description": "This restconf request creates port/interface (`testport`) and attach it to give bridge (`HYPERVISOR-NODE-ID`). Using ovsdb:option, you can pass the optional input to port/interface create optional. E.g. remote_ip=xx.xx.xx.xx.\n\n Note: Please change the attributes of the interface if you don't want to create this default termination point.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:termination-point\": [\n \t{\n \t\t\t\"ovsdb:options\": [\n \t\t\t{\n \"ovsdb:option\": \"remote_ip\",\n \"ovsdb:value\" : \"10.10.14.11\"\n\t\t \t}\n\t \t\t],\n\t \t\t\"ovsdb:name\": \"testport\",\n \t\"ovsdb:interface-type\": \"ovsdb:interface-type-vxlan\",\n \t\t\t\"tp-id\": \"testport\",\n \"vlan-tag\": \"1\",\n \"trunks\": [\n {\n \"trunk\": \"5\"\n }\n ],\n \"vlan-mode\":\"access\"\n\t\t}\n ]\n}" + }, + { + "id": "b592f176-36a7-6830-f3a9-0547f18bcd2d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834432527, + "name": "Node-3-Create OVS Bridge on Hypervisor", + "description": "This restconf request creates bridge (`brtest`) on the specified hypervisor running ovsdb server. Restconf URI need the node-id of the OVSDB server (hypervisor) where you need to get the bridge. You can find out the node id by using the \"GET Operational Topology\" request.\n\n Note: these %2F ('/') in the url are not there by mistake, those are there intentionally because node-id can contain '/'.\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}/bridge/brtest\",\n \"ovsdb:bridge-name\": \"brtest\",\n \"ovsdb:datapath-id\": \"00:00:b2:bf:48:25:f2:4b\",\n \"ovsdb:protocol-entry\": [\n {\n \"protocol\": \"ovsdb:ovsdb-bridge-protocol-openflow-13\"\n }\n ],\n \"ovsdb:controller-entry\": [\n {\n \"target\": \"tcp:11.11.11.11:6633\"\n }\n ],\n \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://{{HYPERVISOR-NODE-ID}}']\"\n }\n ]\n}" + }, + { + "id": "b9748414-6b9d-4fcc-2f43-b6be86a4e4be", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834331946, + "name": "Node-2-Disconnect from OVSDB Server", + "description": "This restconf request ask controller to disconnect from the OVSDB server/hypervisor (`HYPERVISOR-NODE-ID`).\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "bd270450-ee6a-6ebb-f7f1-8e0461ee4f56", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834357784, + "name": "Node-2-Termination Point Configuration Data", + "description": "This restconf request fetch data from `Configuration` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "be720a0e-5a69-91e2-93fb-5ffc4efe7f8c", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834199359, + "name": "Node-1-OVSDB Configuration Topology", + "description": "This restconf request fetch the topology details from `Configuration` data store that is pushed by user..", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "c01d85a0-5f9a-54ef-f2ff-3aefef8c465e", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834442134, + "name": "Node-3-Termination Point Configuration Data", + "description": "This restconf request fetch data from `Configuration` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "c24aebbf-bb85-3201-f605-21e7fef17ae1", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834353913, + "name": "Node-2-Delete OVS Bridge on Hypervisor", + "description": "This restconf request deletes OVS bridge (`brtest`) on the hypervisor with the node-id provided through `HYPERVISOR-NODE-ID` environment variable set in the `Single Node Cluster Setup Environment` file.", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "c60b33eb-c776-06fc-1f28-551c429ad196", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834337153, + "name": "Node-2-OVSDB Bridge Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for specific bridge (`brtest`) present on the given ovsdb server/hypervisor(`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "c9430389-323d-452f-a204-c8c0ef12dcf6", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834415258, + "name": "Node-3-Disconnect from OVSDB Server", + "description": "This restconf request ask controller to disconnect from the OVSDB server/hypervisor (`HYPERVISOR-NODE-ID`).\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "cef78015-fff6-62f0-698b-76f26505e6df", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834262569, + "name": "Node-1-Create OVS Bridge on Hypervisor", + "description": "This restconf request creates bridge (`brtest`) on the specified hypervisor running ovsdb server. Restconf URI need the node-id of the OVSDB server (hypervisor) where you need to get the bridge. You can find out the node id by using the \"GET Operational Topology\" request.\n\n Note: these %2F ('/') in the url are not there by mistake, those are there intentionally because node-id can contain '/'.\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}/bridge/brtest\",\n \"ovsdb:bridge-name\": \"brtest\",\n \"ovsdb:datapath-id\": \"00:00:b2:bf:48:25:f2:4b\",\n \"ovsdb:protocol-entry\": [\n {\n \"protocol\": \"ovsdb:ovsdb-bridge-protocol-openflow-13\"\n }\n ],\n \"ovsdb:controller-entry\": [\n {\n \"target\": \"tcp:11.11.11.11:6633\"\n }\n ],\n \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://{{HYPERVISOR-NODE-ID}}']\"\n }\n ]\n}" + }, + { + "id": "d7e5948a-cab1-a6eb-32bd-a9220691a6d6", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-1-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834244138, + "name": "Node-1-Disconnect from OVSDB Server", + "description": "This restconf request ask controller to disconnect from the OVSDB server/hypervisor (`HYPERVISOR-NODE-ID`).\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "d9b65865-d54b-408b-f868-3e71fee53593", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834342352, + "name": "Node-2-OVSDB Bridge Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for specific bridge (`brtest`) present on given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "dcafada2-2452-3701-f26c-c189e18f3ab0", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834405872, + "name": "Node-3-OVSDB Server Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + }, + { + "id": "f42c21e0-116d-5428-1dfb-9b01e8ad72fa", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{NODE-2-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834350002, + "name": "Node-2-Create OVS Bridge on Hypervisor", + "description": "This restconf request creates bridge (`brtest`) on the specified hypervisor running ovsdb server. Restconf URI need the node-id of the OVSDB server (hypervisor) where you need to get the bridge. You can find out the node id by using the \"GET Operational Topology\" request.\n\n Note: these %2F ('/') in the url are not there by mistake, those are there intentionally because node-id can contain '/'.\n", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}/bridge/brtest\",\n \"ovsdb:bridge-name\": \"brtest\",\n \"ovsdb:datapath-id\": \"00:00:b2:bf:48:25:f2:4b\",\n \"ovsdb:protocol-entry\": [\n {\n \"protocol\": \"ovsdb:ovsdb-bridge-protocol-openflow-13\"\n }\n ],\n \"ovsdb:controller-entry\": [\n {\n \"target\": \"tcp:11.11.11.11:6633\"\n }\n ],\n \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://{{HYPERVISOR-NODE-ID}}']\"\n }\n ]\n}" + }, + { + "id": "ff01de93-1b51-200a-87d0-443091fdfb78", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{NODE-3-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443834446829, + "name": "Node-3-Termination Point Operational Data", + "description": "This restconf request fetch data from `Operational` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "4cd83ae0-a164-c12a-a872-c2205817594a" + } + ] +} \ No newline at end of file diff --git a/resources/commons/Ovsdb-Southbound-Collection-for-Single-Node-Cluster.json.postman_collection b/resources/commons/Ovsdb-Southbound-Collection-for-Single-Node-Cluster.json.postman_collection new file mode 100644 index 0000000000..84e1976f0a --- /dev/null +++ b/resources/commons/Ovsdb-Southbound-Collection-for-Single-Node-Cluster.json.postman_collection @@ -0,0 +1,285 @@ +{ + "id": "2de57d6a-ec2c-a568-c3a9-761f712622d3", + "name": "Ovsdb Southbound Collection for Single Node Cluster", + "description": "All the rest conf request present in this collection depends on the \"Single Node Cluster Setup Environment\" file.\nYou need to import this file, using the \"Manager Environment\" option present in the right top cornor of the postman window.", + "order": [ + "dc447867-22db-fd3a-b482-6186bd3d190a", + "b09f9ed0-4df7-35d3-e81d-b9447313d722", + "8b2d3563-28d4-91c8-5f2b-ce959c348f2d", + "933a4c6d-cd57-1a68-012e-1d08a9c34bc6", + "31a9b08f-051b-c42d-9abd-612e8056c3b0", + "655ce1b6-dc16-d38c-6ab4-4b8b9515e1ce", + "2cc24c37-d5f2-2ef3-d946-8cfe44eabf56", + "22815a0a-75ca-f191-92b5-ca3b2fb67bd7", + "88edd164-76a3-c5a5-2b89-613ec89e82a4", + "58ee801a-3fa3-0d48-7672-14a390a0ea6d", + "b25cd26b-dd0b-369d-a246-ed1a29d0189b", + "8fb3e047-f00a-1dff-df9c-c548b2749c1e", + "001b745f-fad9-3f41-38f1-6ef5baf011a6", + "c7cb64ce-db7b-0c95-6268-bc265766a597" + ], + "folders": [], + "timestamp": 0, + "owner": "128022", + "remoteLink": "", + "public": false, + "requests": [ + { + "id": "001b745f-fad9-3f41-38f1-6ef5baf011a6", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443830363372, + "name": "Create Termination Point on Given Bridge", + "description": "This restconf request creates port/interface (`testport`) and attach it to give bridge (`HYPERVISOR-NODE-ID`). Using ovsdb:option, you can pass the optional input to port/interface create optional. E.g. remote_ip=xx.xx.xx.xx.\n\n Note: Please change the attributes of the interface if you don't want to create this default termination point.", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3", + "rawModeData": "{\n \"network-topology:termination-point\": [\n \t{\n \t\t\t\"ovsdb:options\": [\n \t\t\t{\n \"ovsdb:option\": \"remote_ip\",\n \"ovsdb:value\" : \"10.10.14.11\"\n\t\t \t}\n\t \t\t],\n\t \t\t\"ovsdb:name\": \"testport\",\n \t\"ovsdb:interface-type\": \"ovsdb:interface-type-vxlan\",\n \t\t\t\"tp-id\": \"testport\",\n \"vlan-tag\": \"1\",\n \"trunks\": [\n {\n \"trunk\": \"5\"\n }\n ],\n \"vlan-mode\":\"access\"\n\t\t}\n ]\n}" + }, + { + "id": "22815a0a-75ca-f191-92b5-ca3b2fb67bd7", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443831851013, + "name": "OVSDB Bridge Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for specific bridge (`brtest`) present on given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "2cc24c37-d5f2-2ef3-d946-8cfe44eabf56", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443828713776, + "name": "OVSDB Bridge Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for specific bridge (`brtest`) present on the given ovsdb server/hypervisor(`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "31a9b08f-051b-c42d-9abd-612e8056c3b0", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443827769663, + "name": "Connect to the OVSDB Server", + "description": "This Restconf request will ask controller to initiate the connection to ovsdb server running on hypervisor. Controller assumes that ovsdb server is listening for tcp connection in passive mode. To configure the ovsdb server to listen in passive mode, please fire following command on hypervisor\n\n`ovs-vsctl set-manager ptcp:16640`\n\nwhatever port number you use here, you should use the same port number for HYPERVISOR-OVSDB-PORT key in \"Single Node Cluster Setup Environment\" Environmen file.\n\n Note: Please set the environment variable `HYPERVISOR-IP` to the hypervisor ip that is running OVSDB server and `HYPERVISOR-OVSDB-PORT` to the port number on which OVSDB server is listening. Both of these environment variables are present in the \"Single Node Cluster Setup Enviornment\" file. ", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}\",\n \"connection-info\": {\n \"ovsdb:remote-port\": \"{{HYPERVISOR-OVSDB-PORT}}\",\n \"ovsdb:remote-ip\": \"{{HYPERVISOR-IP}}\"\n }\n }\n ]\n}" + }, + { + "id": "58ee801a-3fa3-0d48-7672-14a390a0ea6d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443828628211, + "name": "Delete OVS Bridge on Hypervisor", + "description": "This restconf request deletes OVS bridge (`brtest`) on the hypervisor with the node-id provided through `HYPERVISOR-NODE-ID` environment variable set in the `Single Node Cluster Setup Environment` file.", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "655ce1b6-dc16-d38c-6ab4-4b8b9515e1ce", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443830167496, + "name": "Disconnect from OVSDB Server", + "description": "This restconf request ask controller to disconnect from the OVSDB server/hypervisor (`HYPERVISOR-NODE-ID`).\n", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "88edd164-76a3-c5a5-2b89-613ec89e82a4", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest", + "preRequestScript": "", + "pathVariables": {}, + "method": "PUT", + "data": [], + "dataMode": "raw", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443827829511, + "name": "Create OVS Bridge on Hypervisor", + "description": "This restconf request creates bridge (`brtest`) on the specified hypervisor running ovsdb server. Restconf URI need the node-id of the OVSDB server (hypervisor) where you need to get the bridge. You can find out the node id by using the \"GET Operational Topology\" request.\n\n Note: these %2F ('/') in the url are not there by mistake, those are there intentionally because node-id can contain '/'.\n", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3", + "rawModeData": "{\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb://{{HYPERVISOR-NODE-ID}}/bridge/brtest\",\n \"ovsdb:bridge-name\": \"brtest\",\n \"ovsdb:datapath-id\": \"00:00:b2:bf:48:25:f2:4b\",\n \"ovsdb:protocol-entry\": [\n {\n \"protocol\": \"ovsdb:ovsdb-bridge-protocol-openflow-13\"\n }\n ],\n \"ovsdb:controller-entry\": [\n {\n \"target\": \"tcp:11.11.11.11:6633\"\n }\n ],\n \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://{{HYPERVISOR-NODE-ID}}']\"\n }\n ]\n}" + }, + { + "id": "8b2d3563-28d4-91c8-5f2b-ce959c348f2d", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443829913657, + "name": "OVSDB Server Configuration Data", + "description": "This restconf request fetch the data from `Configuration` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "8fb3e047-f00a-1dff-df9c-c548b2749c1e", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443831912311, + "name": "Termination Point Operational Data", + "description": "This restconf request fetch data from `Operational` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "933a4c6d-cd57-1a68-012e-1d08a9c34bc6", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443831731294, + "name": "OVSDB Server Operational Data", + "description": "This restconf request fetch the data from `Operational` data store for given ovsdb server/hypervisor (`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "folder": null, + "id": "b09f9ed0-4df7-35d3-e81d-b9447313d722", + "name": "OVSDB Operational Topology", + "dataMode": "params", + "data": [], + "rawModeData": " {\n \"network-topology:node\": [\n {\n \"node-id\": \"ovsdb:node3\",\n \"connection-info\": {\n \"ovsdb:remote-port\": 16640,\n \"ovsdb:remote-ip\": \"192.168.201.129\"\n }\n }\n ]\n }", + "descriptionFormat": null, + "description": "This restconf request fetches the topology details from the `Operational` data store that contains details about all the connected hypervisor, bridges present on the hypervisor and termination point connected to each bridge.", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "method": "GET", + "pathVariables": {}, + "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/", + "preRequestScript": "", + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "b25cd26b-dd0b-369d-a246-ed1a29d0189b", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443831899373, + "name": "Termination Point Configuration Data", + "description": "This restconf request fetch data from `Configuration` data store for specific termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`).", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "id": "c7cb64ce-db7b-0c95-6268-bc265766a597", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n", + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2F{{HYPERVISOR-NODE-ID}}%2Fbridge%2Fbrtest/termination-point/testport/", + "preRequestScript": "", + "pathVariables": {}, + "method": "DELETE", + "data": [], + "dataMode": "params", + "version": 2, + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1443831952250, + "name": "Delete Termination Point on Given Bridge", + "description": "Delete termination point (`testport`) present on the given bridge (`HYPERVISOR-NODE-ID`). ", + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + }, + { + "folder": null, + "id": "dc447867-22db-fd3a-b482-6186bd3d190a", + "name": "OVSDB Configuration Topology", + "dataMode": "params", + "data": [], + "rawModeData": null, + "descriptionFormat": null, + "description": "This restconf request fetch the topology details from `Configuration` data store that is pushed by user..", + "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n", + "method": "GET", + "pathVariables": {}, + "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1", + "preRequestScript": "", + "tests": "", + "currentHelper": "normal", + "helperAttributes": {}, + "collectionId": "2de57d6a-ec2c-a568-c3a9-761f712622d3" + } + ] +} \ No newline at end of file diff --git a/resources/commons/README b/resources/commons/README index c5ab757162..98de4d5bab 100644 --- a/resources/commons/README +++ b/resources/commons/README @@ -9,8 +9,22 @@ Contents - Mininet_Demo_OVSDB_OF.json.postman_collection : Collection of REST-APIs used in the Mininet demo (http://www.youtube.com/watch?v=8iWhMVlflwE) -- OVSDB_Southbound.postman_collection : Collection of RESTCONF APIs for using the OVSDB MD-SAL Southbound - - Neutron-v2.0-LBaaS-API-Examples_July15.json.postman_collection.txt : Collection of REST-APIs to interact with LBaas pool/pool member/loadbalancer. - showOvsdbMdsal.py : Dumps mdsal related info from running ODL that is related to ovsdb and netvirt. Use 'showOvsdbMdsal.py -h' for usage + +- ODL-Clustering.json.postman_collection : Collection contains Restconf request to fetch clustering service related data to check the state of 3 node cluster and inventory/topology shards. + - Please import and load 3-Node-Cluster-Setup-Environment-Variables.postman_environment file, because Restconf request present in this collection depends on the variable defined in this collection. + +- Ovsdb-Southbound-Collection-for-Single-Node-Cluster.json.postman_collection : Collection contains Restconf request for doing CRUD operations (connection, bridge, termination point) on southbound plugin running in standalone controller. + - Please import and load Single-Node-Cluster-Setup-Environment-Variables.postman_environment file, because Restconf request present in this collection depends on the variable defined in this collection. + +- Ovsdb-Southbound-Collection-for-3-Node-Cluster.json.postman_collection : + - Please import and load 3-Node-Cluster-Setup-Environment-Variables.postman_environment file, because Restconf request present in this collection depends on the variable defined in this collection. + + +- Single-Node-Cluster-Setup-Environment-Variables.postman_environment : Postman environment file that defines variables for Restconf request for southbound plugin running in Single controller instance + +- 3-Node-Cluster-Setup-Environment-Variables.postman_environment : Postman environment file that defines variables for Restconf request for southbound plugin running in 3 node cluster environment + + diff --git a/resources/commons/Single-Node-Cluster-Setup-Environment-Variables.postman_environment b/resources/commons/Single-Node-Cluster-Setup-Environment-Variables.postman_environment new file mode 100644 index 0000000000..dd830405ce --- /dev/null +++ b/resources/commons/Single-Node-Cluster-Setup-Environment-Variables.postman_environment @@ -0,0 +1,37 @@ +{ + "id": "76b6f656-7d9c-e4cd-80a4-5d6a42f07cd3", + "name": "Single Node Cluster Setup Environment Variables", + "values": [ + { + "key": "CONTROLLER-IP", + "value": "localhost", + "type": "text", + "name": "CONTROLLER-IP", + "enabled": true + }, + { + "key": "HYPERVISOR-NODE-ID", + "value": "192.168.201.128:16640", + "type": "text", + "name": "HYPERVISOR-NODE-ID", + "enabled": true + }, + { + "key": "HYPERVISOR-IP", + "value": "192.168.201.128", + "type": "text", + "name": "HYPERVISOR-IP", + "enabled": true + }, + { + "key": "HYPERVISOR-OVSDB-PORT", + "value": "16640", + "type": "text", + "name": "HYPERVISOR-OVSDB-PORT", + "enabled": true + } + ], + "timestamp": 1443832146164, + "synced": false, + "syncedFilename": "" +} \ No newline at end of file