djsmiley2k

Untitled

Apr 14th, 2021
488
4 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         for site_statistics in vpn_tree:
  2.             if site_statistics.tag != 'siteStatistics':
  3.                 continue
  4.  
  5.             for tunnel_stats in site_statistics.iter('tunnelStats'):
  6.                 current_tunnel = {}
  7.  
  8.                 for attribute_tag in tunnel_stats.iter(
  9.                     'tunnelStatus',
  10.                     'peerSubnet',
  11.                 ):
  12.                     current_tunnel[attribute_tag.tag] = attribute_tag.text
  13.  
  14.                 tunnels[
  15.                     current_tunnel['peerSubnet']
  16.                 ] = current_tunnel['tunnelStatus']
  17.  
  18.         if all(tunnel == 'up' for tunnel in edge['tunnels'].values()):
  19.             edge['status'] = 'OK'
  20.         else:
  21.             edge['status'] = 'ERROR'
  22.  
  23.     return data
  24.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×