Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------------------------
- File: core/whois.py (Line: 253)
- Function: update
- 246 key=AS.get_by_asn(int(a[2:])).id,
- 247 delta=delay,
- 248 data={"whois_route": as_routes[a]},
- 249 )
- 250 delay += self.PER_AS_DELAY
- 251
- 252 def update(self):
- 253 ==> self.process_as_set_members()
- 254 self.process_origin_route()
- 255
- 256
- 257 def update_whois_cache():
- 258 loader = WhoisCacheLoader()
- 259 loader.update()
- Variables:
- self = <noc.core.whois.WhoisCacheLoader object at 0x7f1109e14310>
- ------------------------------------------------------------------------
- File: commands/whois.py (Line: 37)
- Function: handle_update_cache
- 30 connect()
- 31 return getattr(self, "handle_%s" % cmd.replace("-", "_"))(*args, **options)
- 32
- 33 def handle_update_cache(self, *args, **options):
- 34 from noc.core.whois import WhoisCacheLoader
- 35
- 36 loader = WhoisCacheLoader()
- 37 ==> loader.update()
- 38
- 39 def handle_prefix_list(self, as_set, name=None, profile=None, *args, **options):
- 40 from noc.peer.models.whoiscache import WhoisCache
- 41 from noc.sa.models.profile import Profile
- 42
- 43 p = Profile.get_by_name(profile)
- Variables:
- self = <__main__.Command object at 0x7f111738fee0>
- args = ()
- options = {}
- WhoisCacheLoader = <class 'noc.core.whois.WhoisCacheLoader'>
- loader = <noc.core.whois.WhoisCacheLoader object at 0x7f1109e14310>
- ------------------------------------------------------------------------
- File: commands/whois.py (Line: 31)
- Function: handle
- 24 "--profile", default="Cisco.IOS", help="Profile to generate"
- 25 )
- 26 prefix_list_parser.add_argument("--name", default="my-prefix-list", help="Prefix-list name")
- 27 prefix_list_parser.add_argument("as_set", nargs=argparse.REMAINDER, help="AS-set")
- 28
- 29 def handle(self, cmd, *args, **options):
- 30 connect()
- 31 ==> return getattr(self, "handle_%s" % cmd.replace("-", "_"))(*args, **options)
- 32
- 33 def handle_update_cache(self, *args, **options):
- 34 from noc.core.whois import WhoisCacheLoader
- 35
- 36 loader = WhoisCacheLoader()
- 37 loader.update()
- Variables:
- self = <__main__.Command object at 0x7f111738fee0>
- cmd = 'update-cache'
- args = ()
- options = {}
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 78)
- Function: run_from_argv
- 71 self.no_progressbar = cmd_options.pop("no_progressbar", False)
- 72 if enable_profiling:
- 73 # Start profiler
- 74 import yappi
- 75
- 76 yappi.start()
- 77 try:
- 78 ==> return self.handle(*args, **cmd_options) or 0
- 79 except CommandError as e:
- 80 self.print(str(e))
- 81 return 1
- 82 except KeyboardInterrupt:
- 83 self.print("Ctrl+C")
- 84 return 3
- Variables:
- self = <__main__.Command object at 0x7f111738fee0>
- argv = ['update-cache']
- parser =
- ArgumentParser(prog='noc whois', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- options = Namespace(cmd='update-cache')
- cmd_options = {'cmd': 'update-cache'}
- args = ()
- loglevel = 'info'
- enable_profiling = False
- show_metrics = False
- error_report = <function error_report at 0x7f10ea7b8430>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment