Guest User

Untitled

a guest
Oct 23rd, 2020
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. ------------------------------------------------------------------------
  2. File: core/whois.py (Line: 253)
  3. Function: update
  4. 246 key=AS.get_by_asn(int(a[2:])).id,
  5. 247 delta=delay,
  6. 248 data={"whois_route": as_routes[a]},
  7. 249 )
  8. 250 delay += self.PER_AS_DELAY
  9. 251
  10. 252 def update(self):
  11. 253 ==> self.process_as_set_members()
  12. 254 self.process_origin_route()
  13. 255
  14. 256
  15. 257 def update_whois_cache():
  16. 258 loader = WhoisCacheLoader()
  17. 259 loader.update()
  18. Variables:
  19. self = <noc.core.whois.WhoisCacheLoader object at 0x7f1109e14310>
  20. ------------------------------------------------------------------------
  21. File: commands/whois.py (Line: 37)
  22. Function: handle_update_cache
  23. 30 connect()
  24. 31 return getattr(self, "handle_%s" % cmd.replace("-", "_"))(*args, **options)
  25. 32
  26. 33 def handle_update_cache(self, *args, **options):
  27. 34 from noc.core.whois import WhoisCacheLoader
  28. 35
  29. 36 loader = WhoisCacheLoader()
  30. 37 ==> loader.update()
  31. 38
  32. 39 def handle_prefix_list(self, as_set, name=None, profile=None, *args, **options):
  33. 40 from noc.peer.models.whoiscache import WhoisCache
  34. 41 from noc.sa.models.profile import Profile
  35. 42
  36. 43 p = Profile.get_by_name(profile)
  37. Variables:
  38. self = <__main__.Command object at 0x7f111738fee0>
  39. args = ()
  40. options = {}
  41. WhoisCacheLoader = <class 'noc.core.whois.WhoisCacheLoader'>
  42. loader = <noc.core.whois.WhoisCacheLoader object at 0x7f1109e14310>
  43. ------------------------------------------------------------------------
  44. File: commands/whois.py (Line: 31)
  45. Function: handle
  46. 24 "--profile", default="Cisco.IOS", help="Profile to generate"
  47. 25 )
  48. 26 prefix_list_parser.add_argument("--name", default="my-prefix-list", help="Prefix-list name")
  49. 27 prefix_list_parser.add_argument("as_set", nargs=argparse.REMAINDER, help="AS-set")
  50. 28
  51. 29 def handle(self, cmd, *args, **options):
  52. 30 connect()
  53. 31 ==> return getattr(self, "handle_%s" % cmd.replace("-", "_"))(*args, **options)
  54. 32
  55. 33 def handle_update_cache(self, *args, **options):
  56. 34 from noc.core.whois import WhoisCacheLoader
  57. 35
  58. 36 loader = WhoisCacheLoader()
  59. 37 loader.update()
  60. Variables:
  61. self = <__main__.Command object at 0x7f111738fee0>
  62. cmd = 'update-cache'
  63. args = ()
  64. options = {}
  65. ------------------------------------------------------------------------
  66. File: core/management/base.py (Line: 78)
  67. Function: run_from_argv
  68. 71 self.no_progressbar = cmd_options.pop("no_progressbar", False)
  69. 72 if enable_profiling:
  70. 73 # Start profiler
  71. 74 import yappi
  72. 75
  73. 76 yappi.start()
  74. 77 try:
  75. 78 ==> return self.handle(*args, **cmd_options) or 0
  76. 79 except CommandError as e:
  77. 80 self.print(str(e))
  78. 81 return 1
  79. 82 except KeyboardInterrupt:
  80. 83 self.print("Ctrl+C")
  81. 84 return 3
  82. Variables:
  83. self = <__main__.Command object at 0x7f111738fee0>
  84. argv = ['update-cache']
  85. parser =
  86. ArgumentParser(prog='noc whois', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  87. options = Namespace(cmd='update-cache')
  88. cmd_options = {'cmd': 'update-cache'}
  89. args = ()
  90. loglevel = 'info'
  91. enable_profiling = False
  92. show_metrics = False
  93. error_report = <function error_report at 0x7f10ea7b8430>
  94. ------------------------------------------------------------------------
  95. END OF TRACEBACK
  96.  
Advertisement
Add Comment
Please, Sign In to add comment