/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ * Copyright (c) 2016 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,
BigInteger dpn) {
InterfaceBuilder builder = new InterfaceBuilder().setKey(new InterfaceKey(ifName)).setName(ifName)
.setDescription(desc).setEnabled(enabled).setType((Class<? extends InterfaceType>) ifType);
- ParentRefs parentRefs = new ParentRefsBuilder().setDatapathNodeIdentifier(dpn).build();
+ ParentRefs parentRefs = new ParentRefsBuilder().setDatapathNodeIdentifier(dpn).setParentInterface(ifName).build();
builder.addAugmentation(ParentRefs.class, parentRefs);
if(ifType.equals(L2vlan.class)){
IfL2vlan l2vlan = new IfL2vlanBuilder().setVlanId(VlanId.getDefaultInstance("0"))
- .setL2vlanMode(IfL2vlan.L2vlanMode.Access).build();
+ .setL2vlanMode(IfL2vlan.L2vlanMode.Trunk).build();
builder.addAugmentation(IfL2vlan.class, l2vlan);
}else if(ifType.equals(IfTunnel.class)){
IfTunnel tunnel = new IfTunnelBuilder().setTunnelDestination(null).setTunnelGateway(null).setTunnelSource(null)
IpAddress remoteIp = new IpAddress(Ipv4Address.getDefaultInstance(remoteIpStr));
IpAddress localIp = new IpAddress(Ipv4Address.getDefaultInstance(localIpStr));
IfTunnel tunnel = new IfTunnelBuilder().setTunnelDestination(remoteIp).setTunnelGateway(localIp).setTunnelSource(localIp)
- .setTunnelInterfaceType( tunType).build();
+ .setTunnelInterfaceType( tunType).setInternal(true).build();
builder.addAugmentation(IfTunnel.class, tunnel);
return builder.build();
}
public static String buildflowRef(BigInteger dpId,String servicaName,String boundServicename, short servicePriority)
{
String flowRef = new StringBuffer().append(dpId).append(NwConstants.VLAN_INTERFACE_INGRESS_TABLE).append(NwConstants.FLOWID_SEPARATOR).
- append(servicaName).append(NwConstants.FLOWID_SEPARATOR).append(boundServicename).
- append(NwConstants.FLOWID_SEPARATOR).append(servicePriority).toString();
+ append(servicaName).append(NwConstants.FLOWID_SEPARATOR).append(servicePriority).toString();
return flowRef;
}