def slowpath_pps_meteradd(datapath=None, pps=0): """Add a PPS meter towards controller.""" return parser.OFPMeterMod(datapath=datapath, command=ofp.OFPMC_ADD, flags=ofp.OFPMF_PKTPS, meter_id=ofp.OFPM_SLOWPATH, bands=[parser.OFPMeterBandDrop(rate=pps)])
def meterdel(datapath=None, meter_id=ofp.OFPM_ALL): """Delete a meter (default all meters).""" return parser.OFPMeterMod(datapath, ofp.OFPMC_DELETE, 0, meter_id)
def slowpath_pps_meterdel(datapath=None): """Delete a PPS meter towards controller.""" return parser.OFPMeterMod(datapath=datapath, command=ofp.OFPMC_DELETE, flags=ofp.OFPMF_PKTPS, meter_id=ofp.OFPM_SLOWPATH)