blob: a0668bec58a3f03fc6153e5a487eafe2557c3299 [file] [log] [blame]
/*
* Copyright 2019-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.%
*/
package org.onosproject.pipelines.fabric.impl.behaviour.bng;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onosproject.core.ApplicationId;
import org.onosproject.net.behaviour.BngProgrammable;
/**
* Mock implementation of BngProgrammable.Attachment.
*/
class MockAttachment implements BngProgrammable.Attachment {
private final VlanId stag;
private final VlanId ctag;
private final MacAddress macAddress;
MockAttachment(int seed) {
this.stag = VlanId.vlanId((short) seed);
this.ctag = VlanId.vlanId((short) seed);
this.macAddress = MacAddress.valueOf(seed);
}
@Override
public ApplicationId appId() {
return null;
}
@Override
public VlanId sTag() {
return stag;
}
@Override
public VlanId cTag() {
return ctag;
}
@Override
public MacAddress macAddress() {
return macAddress;
}
@Override
public IpAddress ipAddress() {
return null;
}
@Override
public boolean lineActive() {
return false;
}
@Override
public AttachmentType type() {
return null;
}
@Override
public short pppoeSessionId() {
return 0;
}
}