Set the interface type as internal when an internal port is created 76/7876/1
authorVishal Patil <vpatil@extremenetworks.com>
Mon, 9 Jun 2014 21:45:37 +0000 (17:45 -0400)
committerVishal Patil <vpatil@extremenetworks.com>
Mon, 9 Jun 2014 21:51:11 +0000 (17:51 -0400)
Change-Id: I8b12c41d7cd44052f92927f2087556b91839f775
Signed-off-by: Vishal Patil <vpatil@extremenetworks.com>
ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/ConfigurationService.java

index 5b68bd13b1d2a36a4ce7819e7676b85982ff7fd9..8fec86bc7e826272831f5e55cf038bf98ea21ab7 100644 (file)
@@ -327,6 +327,7 @@ public class ConfigurationService implements IPluginInBridgeDomainConfigService,
                     interfaceRow.setName(portIdentifier);
 
                     if (type != null) {
+                        logger.debug("Port type : " + type);
                         if (type.equalsIgnoreCase(OvsdbType.PortType.TUNNEL.name())) {
                             interfaceRow.setType((String)configs.get(ConfigConstants.TUNNEL_TYPE));
                             if (options == null) options = new OvsDBMap<String, String>();
@@ -334,7 +335,8 @@ public class ConfigurationService implements IPluginInBridgeDomainConfigService,
                         } else if (type.equalsIgnoreCase(OvsdbType.PortType.VLAN.name())) {
                             tags = new OvsDBSet<BigInteger>();
                             tags.add(BigInteger.valueOf(Integer.parseInt((String)configs.get(ConfigConstants.VLAN))));
-                        } else if (type.equalsIgnoreCase(OvsdbType.PortType.PATCH.name())) {
+                        } else if (type.equalsIgnoreCase(OvsdbType.PortType.PATCH.name()) ||
+                                   type.equalsIgnoreCase(OvsdbType.PortType.INTERNAL.name())) {
                             interfaceRow.setType(type.toLowerCase());
                         }
                     }