2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.netvirt.elan.internal;
11 import java.util.ArrayList;
12 import java.util.Collection;
13 import java.util.List;
14 import java.util.concurrent.Future;
16 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
17 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
18 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
19 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
20 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
21 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
22 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
23 import org.opendaylight.netvirt.elan.utils.ElanForwardingEntriesHandler;
24 import org.opendaylight.netvirt.elanmanager.api.IElanService;
25 import org.opendaylight.netvirt.elanmanager.exceptions.MacNotFoundException;
26 import org.opendaylight.genius.datastoreutils.DataStoreJobCoordinator;
27 import org.opendaylight.netvirt.elan.l2gw.internal.ElanL2GatewayProvider;
28 import org.opendaylight.netvirt.elan.statisitcs.ElanStatisticsImpl;
29 import org.opendaylight.netvirt.elan.statusanddiag.ElanStatusMonitor;
30 import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
31 import org.opendaylight.netvirt.elan.utils.ElanConstants;
32 import org.opendaylight.netvirt.elan.utils.ElanUtils;
33 import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
34 import org.opendaylight.genius.itm.api.IITMProvider;
35 import org.opendaylight.genius.mdsalutil.MDSALUtil;
36 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
37 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInterfaces;
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan._interface.forwarding.entries.ElanInterfaceMac;
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceBuilder;
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceKey;
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface;
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceBuilder;
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceKey;
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.state.Elan;
48 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry;
49 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.statistics.rev150824.ElanStatisticsService;
50 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInput;
51 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInputBuilder;
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService;
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService;
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService;
55 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
56 import org.opendaylight.yangtools.yang.common.RpcResult;
57 import org.slf4j.Logger;
58 import org.slf4j.LoggerFactory;
60 import com.google.common.base.Optional;
62 public class ElanServiceProvider implements BindingAwareProvider, IElanService, AutoCloseable {
64 private IdManagerService idManager;
65 private IMdsalApiManager mdsalManager;
66 private IInterfaceManager interfaceManager;
67 private OdlInterfaceRpcService interfaceManagerRpcService;
68 private ElanInstanceManager elanInstanceManager;
69 private ElanForwardingEntriesHandler elanForwardingEntriesHandler;
70 private ElanBridgeManager bridgeMgr;
72 public IdManagerService getIdManager() {
76 public ElanForwardingEntriesHandler getElanForwardingEntriesHandler() {
77 return elanForwardingEntriesHandler;
80 public ElanPacketInHandler getElanPacketInHandler() {
81 return elanPacketInHandler;
84 public ElanSmacFlowEventListener getElanSmacFlowEventListener() {
85 return elanSmacFlowEventListener;
88 public ElanInterfaceStateChangeListener getElanInterfaceStateChangeListener() {
89 return elanInterfaceStateChangeListener;
92 public ElanInterfaceStateClusteredListener getInfStateChangeClusteredListener() {
93 return infStateChangeClusteredListener;
96 public ElanDpnInterfaceClusteredListener getElanDpnInterfaceClusteredListener() {
97 return elanDpnInterfaceClusteredListener;
100 public ElanNodeListener getElanNodeListener() {
101 return elanNodeListener;
104 public NotificationService getNotificationService() {
105 return notificationService;
108 public RpcProviderRegistry getRpcProviderRegistry() {
109 return rpcProviderRegistry;
112 public ElanL2GatewayProvider getElanL2GatewayProvider() {
113 return elanL2GatewayProvider;
116 public static ElanStatusMonitor getElanstatusmonitor() {
117 return elanStatusMonitor;
120 public ElanItmEventListener getElanItmEventListener() {
121 return elanItmEventListener;
124 public static Logger getLogger() {
128 private ElanInterfaceManager elanInterfaceManager;
129 private ElanPacketInHandler elanPacketInHandler;
130 private ElanSmacFlowEventListener elanSmacFlowEventListener;
131 private ElanInterfaceStateChangeListener elanInterfaceStateChangeListener;
132 private ElanInterfaceStateClusteredListener infStateChangeClusteredListener;
133 private ElanDpnInterfaceClusteredListener elanDpnInterfaceClusteredListener;
134 private ElanNodeListener elanNodeListener;
135 private NotificationService notificationService;
136 private RpcProviderRegistry rpcProviderRegistry;
137 private IITMProvider itmManager;
138 private ItmRpcService itmRpcService;
139 private DataBroker broker;
140 private ElanL2GatewayProvider elanL2GatewayProvider;
141 private ElanStatisticsService interfaceStatsService;
142 private EntityOwnershipService entityOwnershipService;
143 private static final ElanStatusMonitor elanStatusMonitor = ElanStatusMonitor.getInstance();
144 static DataStoreJobCoordinator dataStoreJobCoordinator;
145 private ElanOvsdbNodeListener elanOvsdbNodeListener;
147 private boolean generateIntBridgeMac = true;
149 public static void setDataStoreJobCoordinator(DataStoreJobCoordinator ds) {
150 dataStoreJobCoordinator = ds;
153 public void setBroker(DataBroker broker) {
154 this.broker = broker;
157 public static DataStoreJobCoordinator getDataStoreJobCoordinator() {
158 if (dataStoreJobCoordinator == null) {
159 dataStoreJobCoordinator = DataStoreJobCoordinator.getInstance();
161 return dataStoreJobCoordinator;
165 public ElanServiceProvider(RpcProviderRegistry rpcRegistry) {
166 rpcProviderRegistry = rpcRegistry;
167 elanStatusMonitor.registerMbean();
170 // private ElanInterfaceStateChangeListener elanInterfaceEventListener;
171 private ElanItmEventListener elanItmEventListener;
173 private static final Logger logger = LoggerFactory.getLogger(ElanServiceProvider.class);
176 public void onSessionInitiated(ProviderContext session) {
177 elanStatusMonitor.reportStatus("STARTING");
180 getDataStoreJobCoordinator();
181 broker = session.getSALService(DataBroker.class);
183 bridgeMgr = new ElanBridgeManager(broker);
184 elanOvsdbNodeListener = new ElanOvsdbNodeListener(broker, generateIntBridgeMac, bridgeMgr, this);
185 ElanUtils.setElanServiceProvider(this);
186 elanForwardingEntriesHandler = ElanForwardingEntriesHandler.getElanForwardingEntriesHandler(this);
187 elanInterfaceManager = ElanInterfaceManager.getElanInterfaceManager(this);
188 elanInstanceManager = ElanInstanceManager.getElanInstanceManager(this);
189 elanNodeListener = ElanNodeListener.getElanNodeListener(this);
190 elanPacketInHandler = ElanPacketInHandler.getElanPacketInHandler(this);
191 elanSmacFlowEventListener = ElanSmacFlowEventListener.getElanSmacFlowEventListener(this);
192 // Initialize statistics rpc provider for elan
193 interfaceStatsService = ElanStatisticsImpl.getElanStatisticsService(this);
194 rpcProviderRegistry.addRpcImplementation(ElanStatisticsService.class, interfaceStatsService);
195 elanInterfaceStateChangeListener = ElanInterfaceStateChangeListener.getElanInterfaceStateChangeListener(this);
196 infStateChangeClusteredListener = ElanInterfaceStateClusteredListener.getElanInterfaceStateClusteredListener(this);
197 elanDpnInterfaceClusteredListener = ElanDpnInterfaceClusteredListener.getElanDpnInterfaceClusteredListener(this);
198 ElanClusterUtils.setElanServiceProvider(this);
199 this.elanL2GatewayProvider = new ElanL2GatewayProvider(this);
200 elanInterfaceManager.registerListener(LogicalDatastoreType.CONFIGURATION,broker);
201 elanInstanceManager.registerListener(LogicalDatastoreType.CONFIGURATION,broker);
202 notificationService.registerNotificationListener(elanSmacFlowEventListener);
203 notificationService.registerNotificationListener(elanPacketInHandler);
204 elanStatusMonitor.reportStatus("OPERATIONAL");
205 } catch (Exception e) {
206 logger.error("Error initializing services", e);
207 elanStatusMonitor.reportStatus("ERROR");
213 public void setIdManager(IdManagerService idManager) {
214 this.idManager = idManager;
217 public void setMdsalManager(IMdsalApiManager mdsalManager) {
218 this.mdsalManager = mdsalManager;
221 public void setInterfaceManager(IInterfaceManager interfaceManager) {
222 this.interfaceManager = interfaceManager;
225 public void setEntityOwnershipService(EntityOwnershipService entityOwnershipService) {
226 this.entityOwnershipService = entityOwnershipService;
229 public IInterfaceManager getInterfaceManager() {
230 return this.interfaceManager;
233 public IMdsalApiManager getMdsalManager() {
237 public IITMProvider getItmManager() {
241 public DataBroker getBroker() {
245 public void setNotificationService(NotificationService notificationService) {
246 this.notificationService = notificationService;
249 public void setInterfaceManagerRpcService(OdlInterfaceRpcService interfaceManager) {
250 this.interfaceManagerRpcService = interfaceManager;
253 public OdlInterfaceRpcService getInterfaceManagerRpcService() {
254 return interfaceManagerRpcService;
257 public void setItmManager(IITMProvider itmManager) {
258 this.itmManager = itmManager;
261 public void setItmRpcService(ItmRpcService itmRpcService) {
262 this.itmRpcService = itmRpcService;
265 public ItmRpcService getItmRpcService() {
266 return itmRpcService;
269 public ElanInstanceManager getElanInstanceManager() {
270 return elanInstanceManager;
273 public ElanInterfaceManager getElanInterfaceManager() {
274 return elanInterfaceManager;
277 public EntityOwnershipService getEntityOwnershipService() {
278 return entityOwnershipService;
281 private void createIdPool() {
282 CreateIdPoolInput createPool = new CreateIdPoolInputBuilder().setPoolName(ElanConstants.ELAN_ID_POOL_NAME)
283 .setLow(ElanConstants.ELAN_ID_LOW_VALUE).setHigh(ElanConstants.ELAN_ID_HIGH_VALUE).build();
285 Future<RpcResult<Void>> result = idManager.createIdPool(createPool);
286 if ((result != null) && (result.get().isSuccessful())) {
287 logger.debug("ELAN Id Pool is created successfully");
289 } catch (Exception e) {
290 logger.error("Failed to create ELAN Id pool {}", e);
295 public boolean createElanInstance(String elanInstanceName, long macTimeout, String description) {
296 ElanInstance existingElanInstance = elanInstanceManager.getElanInstanceByName(elanInstanceName);
297 boolean isSuccess = true;
298 if (existingElanInstance != null) {
299 if (compareWithExistingElanInstance(existingElanInstance, macTimeout, description)) {
300 logger.debug("Elan Instance is already present in the Operational DS {}", existingElanInstance);
303 ElanInstance updateElanInstance = new ElanInstanceBuilder().setElanInstanceName(elanInstanceName)
304 .setDescription(description).setMacTimeout(macTimeout)
305 .setKey(new ElanInstanceKey(elanInstanceName)).build();
306 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
307 ElanUtils.getElanInstanceConfigurationDataPath(elanInstanceName), updateElanInstance);
308 logger.debug("Updating the Elan Instance {} with MAC TIME-OUT %l and Description %s ",
309 updateElanInstance, macTimeout, description);
312 ElanInstance elanInstance = new ElanInstanceBuilder().setElanInstanceName(elanInstanceName)
313 .setMacTimeout(macTimeout).setDescription(description).setKey(new ElanInstanceKey(elanInstanceName))
315 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
316 ElanUtils.getElanInstanceConfigurationDataPath(elanInstanceName), elanInstance);
317 logger.debug("Creating the new Elan Instance {}", elanInstance);
322 public static boolean compareWithExistingElanInstance(ElanInstance existingElanInstance, long macTimeOut,
323 String description) {
324 boolean isEqual = false;
325 if (existingElanInstance.getMacTimeout() == macTimeOut
326 && existingElanInstance.getDescription().equals(description)) {
333 public void updateElanInstance(String elanInstanceName, long newMacTimout, String newDescription) {
334 createElanInstance(elanInstanceName, newMacTimout, newDescription);
338 public boolean deleteElanInstance(String elanInstanceName) {
339 boolean isSuccess = false;
340 ElanInstance existingElanInstance = elanInstanceManager.getElanInstanceByName(elanInstanceName);
341 if (existingElanInstance == null) {
342 logger.debug("Elan Instance is not present {}", existingElanInstance);
345 logger.debug("Deletion of the existing Elan Instance {}", existingElanInstance);
346 ElanUtils.delete(broker, LogicalDatastoreType.CONFIGURATION,
347 ElanUtils.getElanInstanceConfigurationDataPath(elanInstanceName));
353 public void addElanInterface(String elanInstanceName, String interfaceName, List<String> staticMacAddresses,
354 String description) {
355 ElanInstance existingElanInstance = elanInstanceManager.getElanInstanceByName(elanInstanceName);
356 if (existingElanInstance != null) {
357 ElanInterface elanInterface;
358 if (staticMacAddresses == null) {
359 elanInterface = new ElanInterfaceBuilder().setElanInstanceName(elanInstanceName)
360 .setDescription(description).setName(interfaceName).setKey(new ElanInterfaceKey(interfaceName))
363 elanInterface = new ElanInterfaceBuilder().setElanInstanceName(elanInstanceName)
364 .setDescription(description).setName(interfaceName)
365 .setStaticMacEntries(getPhysAddress(staticMacAddresses))
366 .setKey(new ElanInterfaceKey(interfaceName)).build();
368 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
369 ElanUtils.getElanInterfaceConfigurationDataPathId(interfaceName), elanInterface);
370 logger.debug("Creating the new ELan Interface {}", elanInterface);
376 public void updateElanInterface(String elanInstanceName, String interfaceName,
377 List<String> updatedStaticMacAddresses, String newDescription) {
378 ElanInterface existingElanInterface = ElanUtils.getElanInterfaceByElanInterfaceName(interfaceName);
379 if (existingElanInterface == null) {
382 List<PhysAddress> existingMacAddress = existingElanInterface.getStaticMacEntries();
383 List<PhysAddress> updatedMacAddresses = getPhysAddress(updatedStaticMacAddresses);
384 List<PhysAddress> updatedPhysAddress = getUpdatedPhyAddress(existingMacAddress, updatedMacAddresses);
385 if (updatedPhysAddress.size() > 0) {
386 logger.debug("updating the ElanInterface with new Mac Entries {}", updatedStaticMacAddresses);
387 ElanInterface elanInterface = new ElanInterfaceBuilder().setElanInstanceName(elanInstanceName)
388 .setName(interfaceName).setDescription(newDescription).setStaticMacEntries(updatedPhysAddress)
389 .setKey(new ElanInterfaceKey(interfaceName)).build();
390 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
391 ElanUtils.getElanInterfaceConfigurationDataPathId(interfaceName), elanInterface);
396 public void deleteElanInterface(String elanInstanceName, String interfaceName) {
397 ElanInterface existingElanInterface = ElanUtils.getElanInterfaceByElanInterfaceName(interfaceName);
398 if (existingElanInterface != null) {
399 ElanUtils.delete(broker, LogicalDatastoreType.CONFIGURATION,
400 ElanUtils.getElanInterfaceConfigurationDataPathId(interfaceName));
401 logger.debug("deleting the Elan Interface {}", existingElanInterface);
406 public void addStaticMacAddress(String elanInstanceName, String interfaceName, String macAddress) {
407 ElanInterface existingElanInterface = ElanUtils.getElanInterfaceByElanInterfaceName(interfaceName);
408 PhysAddress updateStaticMacAddress = new PhysAddress(macAddress);
409 if (existingElanInterface != null) {
410 List<PhysAddress> existingMacAddress = existingElanInterface.getStaticMacEntries();
411 if (existingMacAddress.contains(updateStaticMacAddress)) {
414 existingMacAddress.add(updateStaticMacAddress);
415 ElanInterface elanInterface = new ElanInterfaceBuilder().setElanInstanceName(elanInstanceName)
416 .setName(interfaceName).setStaticMacEntries(existingMacAddress)
417 .setDescription(existingElanInterface.getDescription()).setKey(new ElanInterfaceKey(interfaceName))
419 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
420 ElanUtils.getElanInterfaceConfigurationDataPathId(interfaceName), elanInterface);
425 public void deleteStaticMacAddress(String elanInstanceName, String interfaceName, String macAddress)
426 throws MacNotFoundException {
427 ElanInterface existingElanInterface = ElanUtils.getElanInterfaceByElanInterfaceName(interfaceName);
428 PhysAddress physAddress = new PhysAddress(macAddress);
429 if (existingElanInterface == null) {
432 List<PhysAddress> existingMacAddress = existingElanInterface.getStaticMacEntries();
433 if (existingMacAddress.contains(physAddress)) {
434 existingMacAddress.remove(physAddress);
435 ElanInterface elanInterface = new ElanInterfaceBuilder().setElanInstanceName(elanInstanceName)
436 .setName(interfaceName).setStaticMacEntries(existingMacAddress)
437 .setDescription(existingElanInterface.getDescription()).setKey(new ElanInterfaceKey(interfaceName))
439 MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
440 ElanUtils.getElanInterfaceConfigurationDataPathId(interfaceName), elanInterface);
442 throw new MacNotFoundException("Mac Not Found Exception");
447 public Collection<MacEntry> getElanMacTable(String elanInstanceName) {
448 Elan elanInfo = ElanUtils.getElanByName(elanInstanceName);
449 List<MacEntry> macAddress = new ArrayList<>();
450 if (elanInfo == null) {
453 List<String> elanInterfaces = elanInfo.getElanInterfaces();
454 if (elanInterfaces != null && elanInterfaces.size() > 0) {
455 for (String elanInterface : elanInterfaces) {
456 ElanInterfaceMac elanInterfaceMac = ElanUtils.getElanInterfaceMacByInterfaceName(elanInterface);
457 if (elanInterfaceMac != null && elanInterfaceMac.getMacEntry() != null
458 && elanInterfaceMac.getMacEntry().size() > 0) {
459 macAddress.addAll(elanInterfaceMac.getMacEntry());
467 public void flushMACTable(String elanInstanceName) {
468 Elan elanInfo = ElanUtils.getElanByName(elanInstanceName);
469 if (elanInfo == null) {
472 List<String> elanInterfaces = elanInfo.getElanInterfaces();
473 if (elanInterfaces == null || elanInterfaces.isEmpty()) {
476 for (String elanInterface : elanInterfaces) {
477 ElanInterfaceMac elanInterfaceMac = ElanUtils.getElanInterfaceMacByInterfaceName(elanInterface);
478 if (elanInterfaceMac.getMacEntry() != null && elanInterfaceMac.getMacEntry().size() > 0) {
479 List<MacEntry> macEntries = elanInterfaceMac.getMacEntry();
480 for (MacEntry macEntry : macEntries) {
482 deleteStaticMacAddress(elanInstanceName, elanInterface, macEntry.getMacAddress().getValue());
483 } catch (MacNotFoundException e) {
484 logger.error("Mac Not Found Exception {}", e);
494 public void close() throws Exception {
495 this.elanInstanceManager.close();
496 this.elanL2GatewayProvider.close();
499 public static List<PhysAddress> getPhysAddress(List<String> macAddress) {
500 List<PhysAddress> physAddresses = new ArrayList<>();
501 for (String mac : macAddress) {
502 physAddresses.add(new PhysAddress(mac));
504 return physAddresses;
507 public List<PhysAddress> getUpdatedPhyAddress(List<PhysAddress> originalAddresses,
508 List<PhysAddress> updatePhyAddresses) {
509 if (updatePhyAddresses != null && !updatePhyAddresses.isEmpty()) {
510 List<PhysAddress> existingClonedPhyAddress = new ArrayList<>();
511 if (originalAddresses != null && !originalAddresses.isEmpty()) {
512 existingClonedPhyAddress.addAll(0, originalAddresses);
513 originalAddresses.removeAll(updatePhyAddresses);
514 updatePhyAddresses.removeAll(existingClonedPhyAddress);
517 return updatePhyAddresses;
521 public ElanInstance getElanInstance(String elanName) {
522 return ElanUtils.getElanInstanceByName(elanName);
526 public List<ElanInstance> getElanInstances() {
527 List<ElanInstance> elanList = new ArrayList<>();
528 InstanceIdentifier<ElanInstances> elanInstancesIdentifier = InstanceIdentifier.builder(ElanInstances.class)
530 Optional<ElanInstances> elansOptional = ElanUtils.read(broker, LogicalDatastoreType.CONFIGURATION,
531 elanInstancesIdentifier);
532 if (elansOptional.isPresent()) {
533 elanList.addAll(elansOptional.get().getElanInstance());
539 public List<String> getElanInterfaces(String elanInstanceName) {
540 List<String> elanInterfaces = new ArrayList<>();
541 InstanceIdentifier<ElanInterfaces> elanInterfacesIdentifier = InstanceIdentifier.builder(ElanInterfaces.class)
543 Optional<ElanInterfaces> elanInterfacesOptional = ElanUtils.read(broker, LogicalDatastoreType.CONFIGURATION,
544 elanInterfacesIdentifier);
545 if (!elanInterfacesOptional.isPresent()) {
546 return elanInterfaces;
548 List<ElanInterface> elanInterfaceList = elanInterfacesOptional.get().getElanInterface();
549 for (ElanInterface elanInterface : elanInterfaceList) {
550 if (elanInterface.getElanInstanceName().equals(elanInstanceName)) {
551 elanInterfaces.add(elanInterface.getName());
554 return elanInterfaces;
557 public boolean getGenerateIntBridgeMac() {
558 return generateIntBridgeMac;
561 public void setGenerateIntBridgeMac(boolean generateIntBridgeMac) {
562 this.generateIntBridgeMac = generateIntBridgeMac;