2 * Copyright (c) 2016 Cisco Systems, Inc. and others. 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
8 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.test;
10 import java.util.ArrayList;
12 import org.opendaylight.groupbasedpolicy.api.sf.EtherTypeClassifierDefinition;
13 import org.opendaylight.groupbasedpolicy.api.sf.IpProtoClassifierDefinition;
14 import org.opendaylight.groupbasedpolicy.api.sf.L4ClassifierDefinition;
15 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.statistics.flowcache.FlowCacheFactoryTest;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ParameterName;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValue;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValueBuilder;
20 public class ParameterValueList extends ArrayList<ParameterValue> {
22 public ParameterValueList() {
26 public ParameterValueList addEthertype(Long value) {
27 this.add(newParameterValue(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, value));
31 public ParameterValueList addProto(Long value) {
32 this.add(newParameterValue(IpProtoClassifierDefinition.PROTO_PARAM, value));
36 public ParameterValueList addDstPort(Long value) {
37 this.add(newParameterValue(L4ClassifierDefinition.DST_PORT_PARAM, value));
41 public ParameterValueList addSrcPort(Long value) {
42 this.add(newParameterValue(L4ClassifierDefinition.SRC_PORT_PARAM, value));
46 public ParameterValue newParameterValue(String parameterName, Long intValue) {
47 return new ParameterValueBuilder().setName(new ParameterName(parameterName))
48 .setIntValue(intValue).build();