use of org.onosproject.cpman.codec.ControlLoadSnapshotCodec in project onos by opennetworkinglab.
the class ControlMetricsResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
final CodecManager codecService = new CodecManager();
codecService.activate();
codecService.registerCodec(ControlLoadSnapshot.class, new ControlLoadSnapshotCodec());
ServiceDirectory testDirectory = new TestServiceDirectory().add(ControlPlaneMonitorService.class, mockControlPlaneMonitorService).add(ClusterService.class, mockClusterService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
nodeId = new NodeId("1");
mockControlLoad = new MockControlLoad();
ControllerNode mockControllerNode = new MockControllerNode(nodeId);
expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
replay(mockClusterService);
}
use of org.onosproject.cpman.codec.ControlLoadSnapshotCodec in project onos by opennetworkinglab.
the class CPManCodecRegistrator method activate.
@Activate
public void activate() {
codecService.registerCodec(ControlLoadSnapshot.class, new ControlLoadSnapshotCodec());
log.info("Started");
}
Aggregations