/*
- * Copyright (c) 2013 Ericsson AB. All rights reserved.
- *
+ * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
*
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.vpnservice.mdsalutil;
@Override
public void setMatch(MatchBuilder matchBuilderInOut, MatchInfo matchInfo, Map<Class<?>, Object> mapMatchBuilder) {
- StringBuffer nodeConnectorId = new StringBuffer().append("openflow:").append(matchInfo.getMatchValues()[0])
- .append(':').append(matchInfo.getMatchValues()[1]);
+ StringBuffer nodeConnectorId = new StringBuffer().append("openflow:").append(matchInfo.getBigMatchValues()[0])
+ .append(':').append(matchInfo.getBigMatchValues()[1]);
matchBuilderInOut.setInPort(new NodeConnectorId(nodeConnectorId.toString()));
}
},
}
BigInteger[] tunnelIdValues = matchInfo.getBigMatchValues();
- tunnelBuilder.setTunnelId(tunnelIdValues[0]).setTunnelMask(tunnelIdValues[1]).build();
+ tunnelBuilder.setTunnelId(tunnelIdValues[0]);
+ if(tunnelIdValues.length > 1){
+ tunnelBuilder.setTunnelMask(tunnelIdValues[1]);
+ }
+ tunnelBuilder.build();
}
@Override