Search in sources :

Example 6 with DhcpRelayService

use of org.onosproject.dhcprelay.api.DhcpRelayService in project onos by opennetworkinglab.

the class DhcpRelayWebResource method resetDhcpRelayCountersInternal.

/**
 * To reset dhcp relay counters.
 *
 * @return counterArray type ArrayNode.
 */
private void resetDhcpRelayCountersInternal() {
    DhcpRelayService dhcpDelayService = get(DhcpRelayService.class);
    Collection<DhcpRecord> records = dhcpDelayService.getDhcpRecords();
    records.forEach(record -> {
        DhcpRelayCounters v6Counters = record.getV6Counters();
        v6Counters.resetCounters();
    });
}
Also used : DhcpRelayCounters(org.onosproject.dhcprelay.store.DhcpRelayCounters) DhcpRelayService(org.onosproject.dhcprelay.api.DhcpRelayService) DhcpRecord(org.onosproject.dhcprelay.store.DhcpRecord)

Aggregations

DhcpRelayService (org.onosproject.dhcprelay.api.DhcpRelayService)6 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)4 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)3 DhcpRecord (org.onosproject.dhcprelay.store.DhcpRecord)3 DhcpServerInfo (org.onosproject.dhcprelay.api.DhcpServerInfo)2 DhcpRelayCounters (org.onosproject.dhcprelay.store.DhcpRelayCounters)2 DELETE (javax.ws.rs.DELETE)1 Path (javax.ws.rs.Path)1 IpAddress (org.onlab.packet.IpAddress)1 DhcpRelayCommand (org.onosproject.dhcprelay.cli.DhcpRelayCommand)1 Route (org.onosproject.routeservice.Route)1 RouteStore (org.onosproject.routeservice.RouteStore)1 FpmRecord (org.onosproject.routing.fpm.api.FpmRecord)1