use of org.onosproject.vpls.api.VplsData in project onos by opennetworkinglab.
the class VplsStoreTest method testRemoveVpls.
/**
* Removes a VPLS from store; checks if config store is also updated.
*/
@Test
public void testRemoveVpls() {
VplsData vplsData = VplsData.of(VPLS1, VLAN);
vplsStore.addVpls(vplsData);
vplsStore.removeVpls(vplsData);
Collection<VplsData> vplsDataCollection = vplsStore.getAllVpls();
assertEquals(0, vplsDataCollection.size());
VplsAppConfig storedConfig = vplsStore.networkConfigService.getConfig(null, VplsAppConfig.class);
assertNotEquals(-1L, storedConfig.updateTime());
assertEquals(0, storedConfig.vplss().size());
}
use of org.onosproject.vpls.api.VplsData in project onos by opennetworkinglab.
the class VplsManager method removeInterface.
@Override
public Interface removeInterface(VplsData vplsData, Interface iface) {
requireNonNull(vplsData);
requireNonNull(iface);
VplsData newData = VplsData.of(vplsData);
newData.removeInterface(iface);
updateVplsStatus(newData, VplsData.VplsState.UPDATING);
return iface;
}
use of org.onosproject.vpls.api.VplsData in project onos by opennetworkinglab.
the class VplsManager method removeVpls.
@Override
public VplsData removeVpls(VplsData vplsData) {
requireNonNull(vplsData);
VplsData newData = VplsData.of(vplsData);
newData.state(VplsData.VplsState.REMOVING);
vplsStore.removeVpls(vplsData);
return vplsData;
}
use of org.onosproject.vpls.api.VplsData in project onos by opennetworkinglab.
the class VplsManager method addInterface.
@Override
public void addInterface(VplsData vplsData, Interface iface) {
requireNonNull(vplsData);
requireNonNull(iface);
VplsData newData = VplsData.of(vplsData);
newData.addInterface(iface);
updateVplsStatus(newData, VplsData.VplsState.UPDATING);
}
use of org.onosproject.vpls.api.VplsData in project onos by opennetworkinglab.
the class VplsManager method createVpls.
@Override
public VplsData createVpls(String vplsName, EncapsulationType encapsulationType) {
requireNonNull(vplsName);
requireNonNull(encapsulationType);
if (vplsStore.getVpls(vplsName) != null) {
return null;
}
VplsData vplsData = VplsData.of(vplsName, encapsulationType);
vplsStore.addVpls(vplsData);
return vplsData;
}
Aggregations