2 * Copyright (c) 2017 Cisco Systems, Inc. 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.groupbasedpolicy.renderer.vpp.lisp.mappers;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp_renderer.rev160425.config.GbpSubnet;
13 import java.util.HashMap;
16 * Created by Shakib Ahmed on 5/3/17.
18 public class SubnetUuidToGbpSubnetMapper {
20 private HashMap<String, GbpSubnet> subnetInformation;
22 private static SubnetUuidToGbpSubnetMapper INSTANCE = new SubnetUuidToGbpSubnetMapper();
24 private SubnetUuidToGbpSubnetMapper() {
25 subnetInformation = new HashMap<>();
28 public static SubnetUuidToGbpSubnetMapper getInstance() {
32 public void addSubnetInfo(String subnetUuid, GbpSubnet subnetInfo) {
33 subnetInformation.put(subnetUuid, subnetInfo);
36 public GbpSubnet getSubnetInfo(String subnetUuid) {
37 return subnetInformation.get(subnetUuid);
40 public void removeSubnetInfo(String subnetUuid) {
41 subnetInformation.remove(subnetUuid);