Search in sources :

Example 1 with VpnToPseudoPortDataKey

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataKey in project netvirt by opendaylight.

the class AddVpnPseudoPortDataJob method call.

@Override
public List<ListenableFuture<Void>> call() {
    LOG.debug("Adding VpnToPseudoPortMap: vpnRd={}  vpnPseudoLportTag={}  scfTag={}  scfTable={}", super.vpnRd, vpnPseudoLportTag, scfTag, scfTableIdToGo);
    VpnToPseudoPortData newValue = new VpnToPseudoPortDataBuilder().setKey(new VpnToPseudoPortDataKey(super.vpnRd)).setVrfId(super.vpnRd).setScfTableId(scfTableIdToGo).setScfTag(scfTag).setVpnLportTag(vpnPseudoLportTag).build();
    LOG.trace("Adding lportTag={} to VpnToLportTag map for VPN with rd={}", vpnPseudoLportTag, vpnRd);
    InstanceIdentifier<VpnToPseudoPortData> path = VpnServiceChainUtils.getVpnToPseudoPortTagIid(vpnRd);
    return Collections.singletonList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(tx -> tx.put(LogicalDatastoreType.CONFIGURATION, path, newValue, WriteTransaction.CREATE_MISSING_PARENTS)));
}
Also used : Logger(org.slf4j.Logger) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) VpnToPseudoPortDataKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataKey) LogicalDatastoreType(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType) VpnToPseudoPortDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataBuilder) LoggerFactory(org.slf4j.LoggerFactory) VpnServiceChainUtils(org.opendaylight.netvirt.cloudservicechain.utils.VpnServiceChainUtils) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) List(java.util.List) VpnToPseudoPortData(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortData) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) Collections(java.util.Collections) VpnToPseudoPortDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataBuilder) VpnToPseudoPortData(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortData) VpnToPseudoPortDataKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataKey)

Aggregations

ListenableFuture (com.google.common.util.concurrent.ListenableFuture)1 Collections (java.util.Collections)1 List (java.util.List)1 DataBroker (org.opendaylight.controller.md.sal.binding.api.DataBroker)1 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)1 LogicalDatastoreType (org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType)1 VpnServiceChainUtils (org.opendaylight.netvirt.cloudservicechain.utils.VpnServiceChainUtils)1 VpnToPseudoPortData (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortData)1 VpnToPseudoPortDataBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataBuilder)1 VpnToPseudoPortDataKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.cloud.servicechain.state.rev160711.vpn.to.pseudo.port.list.VpnToPseudoPortDataKey)1 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1