public void setUuid(List<String> uuidList) {
this.uuid = new UUID(uuidList.get(1));
}
- public ArrayList<Row<GenericTableSchema>> getRows() {
+ public List<Row<GenericTableSchema>> getRows() {
return rows;
}
public void setRows(ArrayList<Row<GenericTableSchema>> rows) {
databaseSchema = schema;
}
- public ArrayList<Operation> getOperations() {
+ public List<Operation> getOperations() {
return operations;
}
import static com.google.common.base.Preconditions.checkNotNull;
import java.math.BigInteger;
+import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
private ArpSender arpSender;
private SalFlowService flowService;
private final AtomicLong flowCookie = new AtomicLong();
- private final ConcurrentHashMap<Ipv4Address, ArpResolverMetadata> arpRemoveFlowInputAndL3EpKeyById =
+ private final Map<Ipv4Address, ArpResolverMetadata> arpRemoveFlowInputAndL3EpKeyById =
new ConcurrentHashMap<Ipv4Address, ArpResolverMetadata>();
private final int ARP_WATCH_BROTHERS = 10;
private final int WAIT_CYCLES = 3;
public class ProviderNetworkManagerImpl implements ConfigInterface, NetworkingProviderManager {
private static final Logger LOG = LoggerFactory.getLogger(ProviderNetworkManagerImpl.class);
- private HashMap<Long, ProviderEntry> providers = Maps.newHashMap();
- private HashMap<Node, NetworkingProvider> nodeToProviderMapping = Maps.newHashMap();
+ private Map<Long, ProviderEntry> providers = Maps.newHashMap();
+ private Map<Node, NetworkingProvider> nodeToProviderMapping = Maps.newHashMap();
private volatile OvsdbInventoryService ovsdbInventoryService;
@Override
@SuppressWarnings("unchecked")
@Test
public void testProgramOutboundIpRewriteStage1() throws Exception{
- HashSet<String> outboundIpRewriteCache = new HashSet<String>();
+ Set<String> outboundIpRewriteCache = new HashSet<String>();
MemberModifier.suppress(MemberMatcher.method(NeutronL3Adapter.class, "programOutboundIpRewriteStage2", floatingIpClass, Action.class));
import java.lang.reflect.Field;
import java.util.HashMap;
+import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
@Mock private OvsdbInventoryService ovsdbInventoryService;
- @Spy private HashMap<Node, NetworkingProvider> nodeToProviderMapping = Maps.newHashMap();
+ @Spy private Map<Node, NetworkingProvider> nodeToProviderMapping = Maps.newHashMap();
/**
* Test method {@link ProviderNetworkManagerImpl#getProvider(Node)}
*/
@Test
public void testProviderAddedAndRemoved() throws Exception {
- HashMap<?, ?> map = (HashMap<?, ?>) getField("providers");
+ Map<?, ?> map = (HashMap<?, ?>) getField("providers");
ServiceReference<?> ref = mock(ServiceReference.class);
when(ref.getProperty(org.osgi.framework.Constants.SERVICE_ID)).thenReturn(Long.valueOf(1));
NeutronNetwork neutronNetwork = mock(NeutronNetwork.class);
when(neutronNetwork.getProviderSegmentationID()).thenReturn(SEG_ID);
when(neutronNetwork.getNetworkUUID()).thenReturn(NETWORK_ID);
- ArrayList<NeutronNetwork> listNeutronNetwork = new ArrayList<NeutronNetwork>();
+ List<NeutronNetwork> listNeutronNetwork = new ArrayList<NeutronNetwork>();
listNeutronNetwork.add(neutronNetwork);
when(neutronNetworkCache.getAllNetworks()).thenReturn(listNeutronNetwork);
@Test
public void testGetNetworkId() {
NeutronNetwork neutronNetwork = mock(NeutronNetwork.class);
- ArrayList<NeutronNetwork> listNeutronNetwork = new ArrayList<NeutronNetwork>();
+ List<NeutronNetwork> listNeutronNetwork = new ArrayList<NeutronNetwork>();
listNeutronNetwork.add(neutronNetwork);
when(neutronNetwork.getProviderSegmentationID()).thenReturn("segId");
private void setOpenDaylightOtherConfig(Bridge bridge, OvsdbBridgeAugmentation ovsdbManagedNode) {
List<BridgeOtherConfigs> bridgeOtherConfig = ovsdbManagedNode.getBridgeOtherConfigs();
if (bridgeOtherConfig != null) {
- HashMap<String, String> otherConfigMap = new HashMap<String, String>();
+ Map<String, String> otherConfigMap = new HashMap<String, String>();
for (BridgeOtherConfigs otherConf : bridgeOtherConfig) {
otherConfigMap.put(otherConf.getBridgeOtherConfigKey(), otherConf.getBridgeOtherConfigValue());
}
// OpenVSwitchPart
OpenVSwitch ovs = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), OpenVSwitch.class);
- HashMap<String, String> externalIdsMap = new HashMap<String, String>();
+ Map<String, String> externalIdsMap = new HashMap<String, String>();
List<OpenvswitchExternalIds> externalIds = ovsdbNode.getOpenvswitchExternalIds();
List<OpenvswitchOtherConfigs> otherConfigs = ovsdbNode.getOpenvswitchOtherConfigs();
if (otherConfigs != null) {
- HashMap<String, String> otherConfigsMap = new HashMap<String, String>();
+ Map<String, String> otherConfigsMap = new HashMap<String, String>();
for (OpenvswitchOtherConfigs otherConfig : otherConfigs) {
otherConfigsMap.put(otherConfig.getOtherConfigKey(), otherConfig.getOtherConfigValue());
}
//Configure optional input
if (terminationPoint.getOptions() != null) {
- HashMap<String, String> optionsMap = new HashMap<String, String>();
+ Map<String, String> optionsMap = new HashMap<String, String>();
for (Options option : terminationPoint.getOptions()) {
optionsMap.put(option.getOption(), option.getValue());
}
List<InterfaceExternalIds> interfaceExternalIds =
terminationPoint.getInterfaceExternalIds();
if (interfaceExternalIds != null && !interfaceExternalIds.isEmpty()) {
- HashMap<String, String> externalIdsMap = new HashMap<String, String>();
+ Map<String, String> externalIdsMap = new HashMap<String, String>();
for (InterfaceExternalIds externalId: interfaceExternalIds) {
externalIdsMap.put(externalId.getExternalIdKey(), externalId.getExternalIdValue());
}
List<InterfaceOtherConfigs> interfaceOtherConfigs =
terminationPoint.getInterfaceOtherConfigs();
if (interfaceOtherConfigs != null && !interfaceOtherConfigs.isEmpty()) {
- HashMap<String, String> otherConfigsMap = new HashMap<String, String>();
+ Map<String, String> otherConfigsMap = new HashMap<String, String>();
for (InterfaceOtherConfigs interfaceOtherConfig : interfaceOtherConfigs) {
otherConfigsMap.put(interfaceOtherConfig.getOtherConfigKey(),
interfaceOtherConfig.getOtherConfigValue());
List<PortExternalIds> portExternalIds = terminationPoint.getPortExternalIds();
if (portExternalIds != null && !portExternalIds.isEmpty()) {
- HashMap<String, String> externalIdsMap = new HashMap<String, String>();
+ Map<String, String> externalIdsMap = new HashMap<String, String>();
for (PortExternalIds externalId: portExternalIds) {
externalIdsMap.put(externalId.getExternalIdKey(), externalId.getExternalIdValue());
}
List<PortOtherConfigs> portOtherConfigs =
terminationPoint.getPortOtherConfigs();
if (portOtherConfigs != null && !portOtherConfigs.isEmpty()) {
- HashMap<String, String> otherConfigsMap = new HashMap<String, String>();
+ Map<String, String> otherConfigsMap = new HashMap<String, String>();
for (PortOtherConfigs portOtherConfig : portOtherConfigs) {
otherConfigsMap.put(portOtherConfig.getOtherConfigKey(),
portOtherConfig.getOtherConfigValue());
//Configure optional input
if (terminationPoint.getOptions() != null) {
- HashMap<String, String> optionsMap = new HashMap<String, String>();
+ Map<String, String> optionsMap = new HashMap<String, String>();
for (Options option : terminationPoint.getOptions()) {
optionsMap.put(option.getOption(), option.getValue());
}
List<InterfaceExternalIds> interfaceExternalIds =
terminationPoint.getInterfaceExternalIds();
if (interfaceExternalIds != null && !interfaceExternalIds.isEmpty()) {
- HashMap<String, String> externalIdsMap = new HashMap<String, String>();
+ Map<String, String> externalIdsMap = new HashMap<String, String>();
for (InterfaceExternalIds externalId: interfaceExternalIds) {
externalIdsMap.put(externalId.getExternalIdKey(), externalId.getExternalIdValue());
}
List<InterfaceOtherConfigs> interfaceOtherConfigs =
terminationPoint.getInterfaceOtherConfigs();
if (interfaceOtherConfigs != null && !interfaceOtherConfigs.isEmpty()) {
- HashMap<String, String> otherConfigsMap = new HashMap<String, String>();
+ Map<String, String> otherConfigsMap = new HashMap<String, String>();
for (InterfaceOtherConfigs interfaceOtherConfig : interfaceOtherConfigs) {
otherConfigsMap.put(interfaceOtherConfig.getOtherConfigKey(),
interfaceOtherConfig.getOtherConfigValue());
List<PortExternalIds> portExternalIds = terminationPoint.getPortExternalIds();
if (portExternalIds != null && !portExternalIds.isEmpty()) {
- HashMap<String, String> externalIdsMap = new HashMap<String, String>();
+ Map<String, String> externalIdsMap = new HashMap<String, String>();
for (PortExternalIds externalId: portExternalIds) {
externalIdsMap.put(externalId.getExternalIdKey(), externalId.getExternalIdValue());
}
List<PortOtherConfigs> portOtherConfigs =
terminationPoint.getPortOtherConfigs();
if (portOtherConfigs != null && !portOtherConfigs.isEmpty()) {
- HashMap<String, String> otherConfigsMap = new HashMap<String, String>();
+ Map<String, String> otherConfigsMap = new HashMap<String, String>();
for (PortOtherConfigs portOtherConfig : portOtherConfigs) {
otherConfigsMap.put(portOtherConfig.getOtherConfigKey(),
portOtherConfig.getOtherConfigValue());
final List<Trunks> UPDATED_TRUNKS = buildTrunkList(Sets.newHashSet(2011));
ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portStr);
connectOvsdbNode(connectionInfo);
- ArrayList<Set<Integer>> vlanSets = generateVlanSets();
+ Iterable<Set<Integer>> vlanSets = generateVlanSets();
int testCase = 0;
for (Set<Integer> vlanSet : vlanSets) {
++testCase;
return ib;
}
- public static ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action>
- actionList (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action... actions) {
+ public static List<Action>
+ actionList(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action... actions) {
ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> alist
= new ArrayList<>();
}
public static Instructions getInstructions(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction... instructions) {
- ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> ins
+ List<Instruction> ins
= new ArrayList<>();
int order = 0;
for (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction i : instructions) {
*/
public static List<Instruction> getInstructionList(
org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction... instructions) {
- ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> ins
+ List<Instruction> ins
= new ArrayList<>();
int order = 0;
for (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction i : instructions) {
public static void addNxRegMatch(MatchBuilder match,
RegMatch... matches) {
- ArrayList<ExtensionList> extensions = new ArrayList<>();
+ List<ExtensionList> extensions = new ArrayList<>();
for (RegMatch rm : matches) {
Class<? extends ExtensionKey> key;
if (NxmNxReg0.class.equals(rm.reg)) {