############################################################################
# Start BGP protocol                                                       #
############################################################################
_result_ = ixiangpf.test_control(action='start_all_protocols')
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('test_control', _result_)

print "Waiting for 45 seconds"
time.sleep(45)

############################################################################
# Retrieve protocol statistics                                             #
############################################################################
print "Fetching BGP aggregated statistics on Port1"
protostats = ixiangpf.emulation_bgp_info(\
    handle = bgpIpv4Peer_1_handle,
    mode   = 'stats')
if protostats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_bgp_info', protostats)

pprint(protostats)

print "Fetching BGP aggregated statistics on Port2"
protostats = ixiangpf.emulation_bgp_info(\
    handle = bgpIpv4Peer_2_handle,
    mode   = 'stats')
if protostats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_bgp_info', protostats)

pprint(protostats)
Beispiel #2
0
# Start All protocols                                                      #
############################################################################    
print ('Starting all protocol(s) ...')
   
_result_ = ixiangpf.test_control(action='start_all_protocols')
# Check status
if _result_['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('ixiangpf.test_control', _result_)
time.sleep(60)

############################################################################
# Retrieve protocol statistics                                             #
############################################################################
print ('Fetching BGP aggregated statistics')               
protostats = ixiangpf.emulation_bgp_info(\
        handle = bgpIpv4Peer_1_handle,
        mode   = 'stats')
if protostats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_bgp_info', protostats)

#pprint(protostats)
print(protostats)

############################################################################
# Retrieve protocol learned info                                           #
############################################################################
print "Fetching EVPN  learned info\n"
# Check Learned Info for port 2 using BGP Router handle
print "Check Learned Info using BGP Router handle ...\n"
linfostatus = ixiangpf.emulation_bgp_info(
        handle = bgpIpv4Peer_1_handle,
# Applying changes one the fly                                                 #
################################################################################
print "Applying changes on the fly"
applyChanges = ixiangpf.test_control(action='apply_on_the_fly_changes', )

if applyChanges['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('test_control', applyChanges)

time.sleep(10)

############################################################################
# Retrieve protocol statistics                                             #
############################################################################
print "Fetching BGP aggregated statistics"
protostats = ixiangpf.emulation_bgp_info(\
    handle = bgpInterface_1_handle,
    mode   = 'stats_per_device_group')

if protostats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_bgp_info', protostats)

pprint(protostats)

############################################################################
# Retrieve Learned Info                                                    #
############################################################################
print "Fetching BGP Learned Info"
learned_info = ixiangpf.emulation_bgp_info(\
    handle = bgpInterface_1_handle,
    mode   = 'learned_info')