private ListenerRegistration<PodListener> listenerRegistration;
private final JobCoordinator jobCoordinator;
private final ManagedNewTransactionRunner txRunner;
+ private final CoeUtils coeUtils;
@Inject
- public PodListener(final DataBroker dataBroker, JobCoordinator jobCoordinator) {
+ public PodListener(final DataBroker dataBroker, JobCoordinator jobCoordinator, CoeUtils coeUtils) {
registerListener(LogicalDatastoreType.CONFIGURATION, dataBroker);
this.txRunner = new ManagedNewTransactionRunnerImpl(dataBroker);
this.jobCoordinator = jobCoordinator;
+ this.coeUtils = coeUtils;
}
protected InstanceIdentifier<Pods> getWildCardPath() {
LOG.warn("pod {} added with insufficient information to process", pods.getName());
return;
}
- jobCoordinator.enqueueJob(pods.getName(), new PodConfigAddWorker(txRunner, instanceIdentifier,
- pods, podInterface));
+ jobCoordinator.enqueueJob(pods.getName(), new PodConfigAddWorker(txRunner, coeUtils,
+ instanceIdentifier, pods, podInterface));
}
private void update(InstanceIdentifier<Pods> instanceIdentifier, Pods podsAfter, Pods podsBefore,
// issue a delete of all previous configuration, and add the new one.
//jobCoordinator.enqueueJob(podsAfter.getName(), new PodConfigRemoveWorker(txRunner, podsBefore));
//}
- jobCoordinator.enqueueJob(podsAfter.getName(), new PodConfigAddWorker(txRunner, instanceIdentifier,
- podsAfter, podInterfaceAfter));
+ jobCoordinator.enqueueJob(podsAfter.getName(), new PodConfigAddWorker(txRunner, coeUtils,
+ instanceIdentifier, podsAfter, podInterfaceAfter));
}
}
return;
}
- jobCoordinator.enqueueJob(pods.getName(), new PodConfigRemoveWorker(txRunner, pods));
+ jobCoordinator.enqueueJob(pods.getName(), new PodConfigRemoveWorker(txRunner, coeUtils, pods));
}
private static class PodConfigAddWorker implements Callable<List<ListenableFuture<Void>>> {
private final Pods pods;
private final Interface podInterface;
private final ManagedNewTransactionRunner txRunner;
+ private final CoeUtils coeUtils;
- PodConfigAddWorker(ManagedNewTransactionRunner txRunner, InstanceIdentifier<Pods> podsInstanceIdentifier,
+ PodConfigAddWorker(ManagedNewTransactionRunner txRunner, CoeUtils coeUtils,
+ InstanceIdentifier<Pods> podsInstanceIdentifier,
Pods pods, Interface podInterface) {
this.pods = pods;
this.podInterface = podInterface;
this.txRunner = txRunner;
this.podsInstanceIdentifier = podsInstanceIdentifier;
+ this.coeUtils = coeUtils;
}
@Override
public List<ListenableFuture<Void>> call() {
LOG.trace("Adding Pod : {}", podInterface);
- String interfaceName = CoeUtils.buildInterfaceName(pods.getClusterId().getValue(), pods.getName());
+ String interfaceName = coeUtils.buildInterfaceName(pods.getClusterId().getValue(), pods.getName());
List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
String nodeIp = pods.getHostIpAddress().stringValue();
- ElanInstance elanInstance = CoeUtils.createElanInstanceForTheFirstPodInTheNetwork(
+ ElanInstance elanInstance = coeUtils.createElanInstanceForTheFirstPodInTheNetwork(
pods.getClusterId().getValue(), nodeIp, podInterface, tx);
LOG.info("interface creation for pod {}", interfaceName);
- String portInterfaceName = CoeUtils.createOfPortInterface(interfaceName, tx);
+ String portInterfaceName = coeUtils.createOfPortInterface(interfaceName, tx);
LOG.debug("Creating ELAN Interface for pod {}", interfaceName);
- CoeUtils.createElanInterface(portInterfaceName,
+ coeUtils.createElanInterface(portInterfaceName,
elanInstance.getElanInstanceName(), tx);
LOG.debug("Creating VPN instance for namespace {}", pods.getNetworkNS());
List<String> rd = Arrays.asList("100:1");
- CoeUtils.createVpnInstance(pods.getClusterId().getValue(), rd, null, null,
+ coeUtils.createVpnInstance(pods.getClusterId().getValue(), rd, null, null,
VpnInstance.Type.L3, 0, IpVersionChoice.IPV4, tx);
}));
if (podInterface.getIpAddress() != null) {
futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
- CoeUtils.createPodNameToPodUuidMap(interfaceName, podsInstanceIdentifier, tx);
+ coeUtils.createPodNameToPodUuidMap(interfaceName, podsInstanceIdentifier, tx);
}));
}
return futures;
private static class PodConfigRemoveWorker implements Callable<List<ListenableFuture<Void>>> {
private final Pods pods;
private final ManagedNewTransactionRunner txRunner;
+ private final CoeUtils coeUtils;
-
- PodConfigRemoveWorker(ManagedNewTransactionRunner txRunner,
+ PodConfigRemoveWorker(ManagedNewTransactionRunner txRunner, CoeUtils coeUtils,
Pods pods) {
this.pods = pods;
this.txRunner = txRunner;
+ this.coeUtils = coeUtils;
}
@Override
public List<ListenableFuture<Void>> call() {
List<ListenableFuture<Void>> futures = new ArrayList<>();
- String podInterfaceName = CoeUtils.buildInterfaceName(pods.getClusterId().getValue(), pods.getName());
+ String podInterfaceName = coeUtils.buildInterfaceName(pods.getClusterId().getValue(), pods.getName());
futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
LOG.trace("Deleting Pod : {}", podInterfaceName);
LOG.debug("Deleting VPN Interface for pod {}", podInterfaceName);
- CoeUtils.deleteVpnInterface(podInterfaceName, tx);
+ coeUtils.deleteVpnInterface(podInterfaceName, tx);
LOG.debug("Deleting ELAN Interface for pod {}", podInterfaceName);
- CoeUtils.deleteElanInterface(podInterfaceName, tx);
+ coeUtils.deleteElanInterface(podInterfaceName, tx);
LOG.info("interface deletion for pod {}", podInterfaceName);
- CoeUtils.deleteOfPortInterface(podInterfaceName, tx);
- CoeUtils.unbindKubeProxyService(podInterfaceName, tx);
+ coeUtils.deleteOfPortInterface(podInterfaceName, tx);
+ coeUtils.unbindKubeProxyService(podInterfaceName, tx);
// TODO delete elan-instance if this is the last pod in the host
// TODO delete vpn-instance if this is the last pod in the network
}));
futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
- CoeUtils.deletePodNameToPodUuidMap(podInterfaceName, tx);
+ coeUtils.deletePodNameToPodUuidMap(podInterfaceName, tx);
}));
return futures;
}
private final PodsCache podsCache;
private final DataTreeEventCallbackRegistrar eventCallbacks;
private final ManagedNewTransactionRunner txRunner;
+ private final CoeUtils coeUtils;
@Inject
public TerminationPointStateListener(DataBroker dataBroker,
- PodsCache podsCache, DataTreeEventCallbackRegistrar eventCallbacks) {
+ PodsCache podsCache, DataTreeEventCallbackRegistrar eventCallbacks, CoeUtils coeUtils) {
super(dataBroker, LogicalDatastoreType.OPERATIONAL,
InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class).child(Node.class)
.child(TerminationPoint.class).augmentation(OvsdbTerminationPointAugmentation.class).build());
this.podsCache = podsCache;
this.eventCallbacks = eventCallbacks;
this.txRunner = new ManagedNewTransactionRunnerImpl(dataBroker);
+ this.coeUtils = coeUtils;
}
@Override
public void update(@Nullable OvsdbTerminationPointAugmentation tpOld, OvsdbTerminationPointAugmentation tpNew) {
LOG.debug("Received Update DataChange Notification for ovsdb termination point {}", tpNew.getName());
- SouthboundInterfaceInfo tpNewDetails = CoeUtils.getSouthboundInterfaceDetails(tpNew);
- SouthboundInterfaceInfo tpOldDetails = CoeUtils.getSouthboundInterfaceDetails(tpOld);
+ SouthboundInterfaceInfo tpNewDetails = coeUtils.getSouthboundInterfaceDetails(tpNew);
+ SouthboundInterfaceInfo tpOldDetails = coeUtils.getSouthboundInterfaceDetails(tpOld);
if (!Objects.equals(tpNewDetails, tpOldDetails)) {
Optional<String> interfaceNameOptional = tpNewDetails.getInterfaceName();
LOG.debug("Detected external interface-id {} and attached mac address {} for {}", interfaceName,
macAddress, tpNew.getName());
eventCallbacks.onAddOrUpdate(LogicalDatastoreType.OPERATIONAL,
- CoeUtils.getPodMetaInstanceId(interfaceName), (unused, alsoUnused) -> {
+ coeUtils.getPodMetaInstanceId(interfaceName), (unused, alsoUnused) -> {
LOG.info("Pod configuration {} detected for termination-point {},"
+ "proceeding with l2 and l3 configurations", interfaceName, tpNew.getName());
ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(
CONFIGURATION, tx -> {
- InstanceIdentifier<Pods> instanceIdentifier = CoeUtils.getPodUUIDforPodName(
+ InstanceIdentifier<Pods> instanceIdentifier = coeUtils.getPodUUIDforPodName(
interfaceName, getDataBroker());
Pods pods = podsCache.get(instanceIdentifier).get();
if (pods != null) {
IpAddress podIpAddress = pods.getInterface().get(0).getIpAddress();
- CoeUtils.updateElanInterfaceWithStaticMac(macAddress, podIpAddress,
+ coeUtils.updateElanInterfaceWithStaticMac(macAddress, podIpAddress,
interfaceName, tx);
if (!isServiceGateway) {
- CoeUtils.createVpnInterface(pods.getClusterId().getValue(), pods, interfaceName,
+ coeUtils.createVpnInterface(pods.getClusterId().getValue(), pods, interfaceName,
macAddress,false, tx);
LOG.debug("Bind Kube Proxy Service for {}", interfaceName);
bindKubeProxyService(tx, interfaceName);
update(null, tpNew);
}
- private static void bindKubeProxyService(TypedReadWriteTransaction<Datastore.Configuration> tx,
+ private void bindKubeProxyService(TypedReadWriteTransaction<Datastore.Configuration> tx,
String interfaceName) {
int priority = ServiceIndex.getIndex(NwConstants.COE_KUBE_PROXY_SERVICE_NAME,
NwConstants.COE_KUBE_PROXY_SERVICE_INDEX);
NwConstants.COE_KUBE_PROXY_SERVICE_INDEX),
priority, NwConstants.COOKIE_COE_KUBE_PROXY_TABLE, instructions);
InstanceIdentifier<BoundServices> boundServicesInstanceIdentifier =
- CoeUtils.buildKubeProxyServicesIId(interfaceName);
+ coeUtils.buildKubeProxyServicesIId(interfaceName);
tx.put(boundServicesInstanceIdentifier, serviceInfo,true);
}
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
+import javax.inject.Inject;
+import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.infra.TypedWriteTransaction;
import org.opendaylight.genius.mdsalutil.NwConstants;
+import org.opendaylight.genius.networkutils.VniUtils;
import org.opendaylight.netvirt.coe.api.SouthboundInterfaceInfo;
import org.opendaylight.netvirt.coe.api.SouthboundInterfaceInfoBuilder;
import org.opendaylight.netvirt.neutronvpn.api.enums.IpVersionChoice;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Singleton
public final class CoeUtils {
private static final Logger LOG = LoggerFactory.getLogger(CoeUtils.class);
.put(NetworkAttributes.NetworkType.VXLAN, SegmentTypeVxlan.class)
.build();
- private CoeUtils() { }
+ private final VniUtils vniUtils;
+
+ @Inject
+ public CoeUtils(VniUtils vniUtils) {
+ this.vniUtils = vniUtils;
+ }
public static InstanceIdentifier<Interface> buildVlanInterfaceIdentifier(String interfaceName) {
InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508
return new StringBuilder().append(networkNS).append(SEPARATOR).append(podName).toString();
}
+ public static Class<? extends SegmentTypeBase> getSegmentTypeFromNetwork(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.coe.northbound.pod.rev170611.pod_attributes.Interface
+ elanInterface) {
+ return CoeUtils.NETWORK_MAP.get(elanInterface.getNetworkType());
+ }
+
+ public static String buildElanInstanceName(String nodeIp, String networkNS) {
+ return new StringBuilder().append(nodeIp).append(SEPARATOR).append(networkNS).toString();
+ }
+
+ public static InstanceIdentifier<PodIdentifier> getPodMetaInstanceId(String externalInterfaceId) {
+ return InstanceIdentifier.builder(PodidentifierInfo.class)
+ .child(PodIdentifier.class, new PodIdentifierKey(externalInterfaceId)).build();
+ }
+
+ public static InstanceIdentifier<BoundServices> buildKubeProxyServicesIId(String interfaceName) {
+ return InstanceIdentifier.builder(ServiceBindings.class)
+ .child(ServicesInfo.class, new ServicesInfoKey(interfaceName, ServiceModeIngress.class))
+ .child(BoundServices.class, new BoundServicesKey(NwConstants.COE_KUBE_PROXY_SERVICE_INDEX)).build();
+ }
+
+ static InstanceIdentifier<VpnInterface> buildVpnInterfaceIdentifier(String ifName) {
+ InstanceIdentifier<VpnInterface> id = InstanceIdentifier.builder(VpnInterfaces.class).child(VpnInterface
+ .class, new VpnInterfaceKey(ifName)).build();
+ return id;
+ }
+
+ static InstanceIdentifier<ElanInstance> createElanInstanceIdentifier(String elanInstanceName) {
+ InstanceIdentifier<ElanInstance> id = InstanceIdentifier.builder(ElanInstances.class).child(ElanInstance.class,
+ new ElanInstanceKey(elanInstanceName)).build();
+ return id;
+ }
+
static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces
.Interface buildInterface(String interfaceName) {
IfL2vlan.L2vlanMode l2VlanMode = IfL2vlan.L2vlanMode.Trunk;
return interfaceBuilder.build();
}
- static ElanInstance buildElanInstance(String elanInstanceName, Class<? extends SegmentTypeBase> segmentType,
- String segmentationId,
- Boolean isExternal) {
+ ElanInstance buildElanInstance(String elanInstanceName, Class<? extends SegmentTypeBase> segmentType,
+ Boolean isExternal) throws ExecutionException, InterruptedException {
ElanInstanceBuilder elanInstanceBuilder = new ElanInstanceBuilder().setElanInstanceName(elanInstanceName);
if (segmentType != null) {
elanInstanceBuilder.setSegmentType(segmentType);
- if (segmentationId != null) {
- elanInstanceBuilder.setSegmentationId(Long.valueOf(segmentationId));
- }
+ elanInstanceBuilder.setSegmentationId(vniUtils.getVNI(elanInstanceName).longValue());
}
elanInstanceBuilder.setExternal(isExternal);
return elanInstanceBuilder.build();
}
- public static void createElanInterface(String elanInterfaceName, String elanInstanceName,
+ public void createElanInterface(String elanInterfaceName, String elanInstanceName,
TypedReadWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
InstanceIdentifier<ElanInterface> id = InstanceIdentifier.builder(ElanInterfaces.class).child(ElanInterface
.class, new ElanInterfaceKey(elanInterfaceName)).build();
LOG.debug("Creating new ELAN Interface {}", elanInterface);
}
- public static void updateElanInterfaceWithStaticMac(String macAddress, IpAddress ipAddress,
+ public void updateElanInterfaceWithStaticMac(String macAddress, IpAddress ipAddress,
String elanInterfaceName,
TypedReadWriteTransaction<Datastore.Configuration>
wrtConfigTxn) {
LOG.debug("Updating ELAN Interface with static mac {}", elanInterface);
}
- public static void createPodNameToPodUuidMap(String podName, InstanceIdentifier<Pods> pod,
+ public void createPodNameToPodUuidMap(String podName, InstanceIdentifier<Pods> pod,
TypedWriteTransaction<Datastore.Operational> writeTransaction) {
InstanceIdentifier<PodIdentifier> id = InstanceIdentifier.builder(PodidentifierInfo.class)
.child(PodIdentifier.class, new PodIdentifierKey(podName)).build();
LOG.debug("Creating podnametouuid map {} to {}", podName, pod);
}
- public static void deletePodNameToPodUuidMap(String podName,
+ public void deletePodNameToPodUuidMap(String podName,
TypedWriteTransaction<Datastore.Operational> writeTransaction) {
InstanceIdentifier<PodIdentifier> id = InstanceIdentifier.builder(PodidentifierInfo.class)
.child(PodIdentifier.class, new PodIdentifierKey(podName)).build();
LOG.debug("Deleting podnametouuid map for {}", podName);
}
- public static InstanceIdentifier<Pods> getPodUUIDforPodName(String podName, DataBroker dataBroker)
+ public InstanceIdentifier<Pods> getPodUUIDforPodName(String podName, DataBroker dataBroker)
throws ExecutionException, InterruptedException {
ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();
InstanceIdentifier<PodIdentifier> id = InstanceIdentifier.builder(PodidentifierInfo.class)
return null;
}
- public static void deleteElanInterface(String elanInterfaceName,
+ public void deleteElanInterface(String elanInterfaceName,
TypedWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
InstanceIdentifier<ElanInterface> id = InstanceIdentifier.builder(ElanInterfaces.class).child(ElanInterface
.class, new ElanInterfaceKey(elanInterfaceName)).build();
LOG.debug("Deleting ELAN Interface {}", elanInterfaceName);
}
- public static String createOfPortInterface(String interfaceName,
+ public String createOfPortInterface(String interfaceName,
TypedReadWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface inf =
buildInterface(interfaceName);
return infName;
}
- public static void deleteOfPortInterface(String infName,
+ public void deleteOfPortInterface(String infName,
TypedWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
LOG.debug("Deleting OFPort Interface {}", infName);
InstanceIdentifier interfaceIdentifier = CoeUtils.buildVlanInterfaceIdentifier(infName);
wrtConfigTxn.delete(interfaceIdentifier);
}
- static InstanceIdentifier<ElanInstance> createElanInstanceIdentifier(String elanInstanceName) {
- InstanceIdentifier<ElanInstance> id = InstanceIdentifier.builder(ElanInstances.class).child(ElanInstance.class,
- new ElanInstanceKey(elanInstanceName)).build();
- return id;
- }
-
- public static Class<? extends SegmentTypeBase> getSegmentTypeFromNetwork(
- org.opendaylight.yang.gen.v1.urn.opendaylight.coe.northbound.pod.rev170611.pod_attributes.Interface
- elanInterface) {
- return CoeUtils.NETWORK_MAP.get(elanInterface.getNetworkType());
- }
-
- public static String buildElanInstanceName(String nodeIp, String networkNS) {
- return new StringBuilder().append(nodeIp).append(SEPARATOR).append(networkNS).toString();
- }
-
- public static ElanInstance
+ public ElanInstance
createElanInstanceForTheFirstPodInTheNetwork(String clusterId, String nodeIp,
org.opendaylight.yang.gen.v1.urn.opendaylight.coe.northbound.pod
.rev170611.pod_attributes.Interface podInterface,
return existingElanInstance;
}
Class<? extends SegmentTypeBase> segmentType = getSegmentTypeFromNetwork(podInterface);
- String segmentationId = String.valueOf(podInterface.getSegmentationId());
//FIXME String physicalNetworkName = ??
// TODO external network support not added currently
Boolean isExternal = false;
- ElanInstance elanInstance = CoeUtils.buildElanInstance(elanInstanceName, segmentType,
- segmentationId, isExternal);
+ ElanInstance elanInstance = buildElanInstance(elanInstanceName, segmentType, isExternal);
wrtConfigTxn.put(id, elanInstance);
LOG.info("ELAN instance created for the first pod in the network {}", podInterface.getUid());
return elanInstance;
}
- public static SouthboundInterfaceInfo getSouthboundInterfaceDetails(OvsdbTerminationPointAugmentation ovsdbTp) {
+ public SouthboundInterfaceInfo getSouthboundInterfaceDetails(OvsdbTerminationPointAugmentation ovsdbTp) {
SouthboundInterfaceInfoBuilder southboundInterfaceInfoBuilder = new SouthboundInterfaceInfoBuilder();
if (ovsdbTp != null) {
List<InterfaceExternalIds> ifaceExtIds = ovsdbTp.getInterfaceExternalIds();
return southboundInterfaceInfoBuilder.build();
}
- public static InstanceIdentifier<PodIdentifier> getPodMetaInstanceId(String externalInterfaceId) {
- return InstanceIdentifier.builder(PodidentifierInfo.class)
- .child(PodIdentifier.class, new PodIdentifierKey(externalInterfaceId)).build();
- }
-
- public static void createVpnInstance(String vpnName, List<String> rd, List<String> irt, List<String> ert,
+ public void createVpnInstance(String vpnName, List<String> rd, List<String> irt, List<String> ert,
VpnInstance.Type type, long l3vni, IpVersionChoice ipVersion,
TypedReadWriteTransaction<Datastore.Configuration> tx) {
List<VpnTarget> vpnTargetList = new ArrayList<>();
tx.put(vpnIdentifier, newVpn);
}
- static InstanceIdentifier<VpnInterface> buildVpnInterfaceIdentifier(String ifName) {
- InstanceIdentifier<VpnInterface> id = InstanceIdentifier.builder(VpnInterfaces.class).child(VpnInterface
- .class, new VpnInterfaceKey(ifName)).build();
- return id;
- }
-
- public static void createVpnInterface(String vpnName, Pods pod, String interfaceName, String macAddress,
+ public void createVpnInterface(String vpnName, Pods pod, String interfaceName, String macAddress,
boolean isRouterInterface,
TypedReadWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
LOG.trace("createVpnInterface for Port: {}, isRouterInterface: {}", interfaceName, isRouterInterface);
}
- public static void deleteVpnInterface(String interfaceName,
+ public void deleteVpnInterface(String interfaceName,
TypedWriteTransaction<Datastore.Configuration> wrtConfigTxn) {
LOG.trace("deleteVpnInterface for Pod {}", interfaceName);
InstanceIdentifier<VpnInterface> vpnIfIdentifier = buildVpnInterfaceIdentifier(interfaceName);
wrtConfigTxn.delete(vpnIfIdentifier);
}
- static Adjacencies createPortIpAdjacencies(Pods pod, String interfaceName, String macAddress) {
+ Adjacencies createPortIpAdjacencies(Pods pod, String interfaceName, String macAddress) {
List<Adjacency> adjList = new ArrayList<>();
LOG.trace("create config adjacencies for Port: {}", interfaceName);
IpAddress ip = pod.getInterface().get(0).getIpAddress();
return new AdjacenciesBuilder().setAdjacency(adjList).build();
}
- public static InstanceIdentifier<BoundServices> buildKubeProxyServicesIId(String interfaceName) {
- return InstanceIdentifier.builder(ServiceBindings.class)
- .child(ServicesInfo.class, new ServicesInfoKey(interfaceName, ServiceModeIngress.class))
- .child(BoundServices.class, new BoundServicesKey(NwConstants.COE_KUBE_PROXY_SERVICE_INDEX)).build();
- }
-
- public static void unbindKubeProxyService(String interfaceName, TypedWriteTransaction<Datastore.Configuration> tx) {
+ public void unbindKubeProxyService(String interfaceName, TypedWriteTransaction<Datastore.Configuration> tx) {
tx.delete(buildKubeProxyServicesIId(interfaceName));
}
}