aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mactime
AgeCommit message (Expand)AuthorFilesLines
2021-04-19interface: interface-output end node reworkDamjan Marion1-3/+2
2021-03-11misc: fix gcc-11 buildDamjan Marion1-5/+3
2020-12-14misc: move to new pool_foreach macrosDamjan Marion4-18/+18
2020-11-20ip-neighbor: Use ip_address_t rather than ip46_address_tNeale Ranns2-2/+2
2020-10-07misc: Purge unused pg includesNeale Ranns1-1/+0
2020-08-13stats: remove offsets on vpp sideOle Troan1-16/+14
2020-06-07mactime: print error if feature not enabledDave Barach1-1/+8
2020-05-06docs: clean up make docs jobPaul Vinciguerra1-1/+2
2020-03-12vppinfra: refactor clib_timebase_tDave Barach3-4/+6
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-1/+1
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns4-26/+48
2019-12-10api: multiple connections per processDave Barach2-2/+2
2019-12-06mactime: update api to use explicit typesOle Troan2-11/+15
2019-11-06build: add yaml file linting to make checkstylePaul Vinciguerra1-0/+1
2019-11-05misc: Fix python scripts shebang lineRenato Botelho do Couto1-1/+1
2019-10-18mactime: fix handle_get_mactime fcn prototypeDave Barach1-4/+5
2019-10-14mactime: add the "mactime.json" builtin URLDave Barach5-1/+181
2019-10-13mactime: pass context in reply to mactime_dumpKeith Burns1-0/+1
2019-10-10tests: add cli_return_response to vpp_papi_providerDave Barach1-1/+6
2019-10-10mactime: fix undefined symbol in mactime_testOle Troan1-1/+2
2019-10-07mactime: add a "top" command to watch device statsDave Barach7-25/+938
2019-10-07mactime: remove unnecessary function declarationNeale Ranns1-2/+0
2019-09-30mactime: remove api boilerplateOle Troan6-214/+10
2019-08-22tests: move plugin tests to src/plugins/*/testDave Wallace1-0/+155
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-1/+1
2019-07-09vat: unload unused vat pluginsDave Barach1-19/+1
2019-06-08mactime: add per-mac allow-with-quota featureDave Barach5-15/+73
2019-06-04mactime: upstream new featuresDave Barach6-25/+161
2019-05-09add mactime plugin unit / code coverage testsDave Barach1-5/+2
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
2019-01-30Use IP and MAC API types for neighborsNeale Ranns2-3/+2
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-5/+6
2018-11-01Fix API name_crc format stored in msg_api_tableIgor Mikhailov (imichail)1-1/+1
2018-10-23c11 safe string handling supportDave Barach1-3/+3
2018-09-11VAT: plugin load errorsOle Troan1-2/+19
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+4
2018-08-25cmake: handle api_test_plugins in add_vpp_plugin macroDamjan Marion1-4/+1
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-3/+6
2018-08-22Consolidate the [un]format_mac_address implementationsNeale Ranns2-24/+1
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+24
2018-07-11VPP-1338: fix coverity warning in mactime pluginDave Barach1-1/+3
2018-06-23Tx feature node, for accounting purposesDave Barach3-136/+204
2018-06-21Null terminate name stringDave Barach1-1/+1
2018-06-20Nested-loop index typo. Oops.Dave Barach1-6/+6
2018-06-19Driver level time-based src mac filterDave Barach7-0/+1458
pan> "Subprocess returned unanticipated error running `file' " "utility on core-file, " "%s", e) def poll_vpp(self): """ Poll the vpp status and throw an exception if it's not running :raises VppDiedError: exception if VPP is not running anymore """ if self.test.vpp_dead: # already dead, nothing to do return self.test.vpp.poll() if self.test.vpp.returncode is not None: self.test.vpp_dead = True raise framework.VppDiedError(rv=self.test.vpp.returncode) core_path = get_core_path(self.test.tempdir) if os.path.isfile(core_path): self.on_crash(core_path) def before_api(self, api_name, api_args): """ Check if VPP died before executing an API :param api_name: name of the API :param api_args: tuple containing the API arguments :raises VppDiedError: exception if VPP is not running anymore """ super(PollHook, self).before_api(api_name, api_args) self.poll_vpp() def before_cli(self, cli): """ Check if VPP died before executing a CLI :param cli: CLI string :raises Exception: exception if VPP is not running anymore """ super(PollHook, self).before_cli(cli) self.poll_vpp() class StepHook(PollHook): """ Hook which requires user to press ENTER before doing any API/CLI """ def __init__(self, test): self.skip_stack = None self.skip_num = None self.skip_count = 0 super(StepHook, self).__init__(test) def skip(self): if self.skip_stack is None: return False stack = traceback.extract_stack() counter = 0 skip = True for e in stack: if counter > self.skip_num: break if e[0] != self.skip_stack[counter][0]: skip = False if e[1] != self.skip_stack[counter][1]: skip = False counter += 1 if skip: self.skip_count += 1 return True else: print("%d API/CLI calls skipped in specified stack " "frame" % self.skip_count) self.skip_count = 0 self.skip_stack = None self.skip_num = None return False def user_input(self): print('number\tfunction\tfile\tcode') counter = 0 stack = traceback.extract_stack() for e in stack: print('%02d.\t%s\t%s:%d\t[%s]' % (counter, e[2], e[0], e[1], e[3])) counter += 1 print(single_line_delim) print("You may enter a number of stack frame chosen from above") print("Calls in/below that stack frame will be not be stepped anymore") print(single_line_delim) while True: print("Enter your choice, if any, and press ENTER to continue " "running the testcase...") choice = sys.stdin.readline().rstrip('\r\n') if choice == "": choice = None try: if choice is not None: num = int(choice) except ValueError: print("Invalid input") continue if choice is not None and (num < 0 or num >= len(stack)): print("Invalid choice") continue break if choice is not None: self.skip_stack = stack self.skip_num = num def before_cli(self, cli): """ Wait for ENTER before executing CLI """ if self.skip(): print("Skip pause before executing CLI: %s" % cli) else: print(double_line_delim) print("Test paused before executing CLI: %s" % cli) print(single_line_delim) self.user_input() super(StepHook, self).before_cli(cli) def before_api(self, api_name, api_args): """ Wait for ENTER before executing API """ if self.skip(): print("Skip pause before executing API: %s (%s)" % (api_name, api_args)) else: print(double_line_delim) print("Test paused before executing API: %s (%s)" % (api_name, api_args)) print(single_line_delim) self.user_input() super(StepHook, self).before_api(api_name, api_args)