- InterfaceManagerCommonUtils.createInterfaceChildEntry(defaultConfigShardTransaction, parentRefs.getParentInterface(), interfaceNew.getName());
- futures.add(defaultConfigShardTransaction.submit());
+ private final DataBroker dataBroker;
+ private final InterfaceManagerCommonUtils interfaceManagerCommonUtils;
+
+ @Inject
+ public OvsVlanMemberConfigAddHelper(DataBroker dataBroker,
+ InterfaceManagerCommonUtils interfaceManagerCommonUtils) {
+ this.dataBroker = dataBroker;
+ this.interfaceManagerCommonUtils = interfaceManagerCommonUtils;
+ }
+
+ public List<ListenableFuture<Void>> addConfiguration(ParentRefs parentRefs, Interface interfaceNew) {
+ LOG.info("adding vlan member configuration for interface {}", interfaceNew.getName());
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
+ WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
+ interfaceManagerCommonUtils.createInterfaceChildEntry(parentRefs.getParentInterface(), interfaceNew.getName(),
+ writeTransaction);
+ futures.add(writeTransaction.submit());