status = interface2['status']
if (status == '0') :
    print("set interface on port2 failed")
    print(interface2)
else:
    print("***** set interface on port2 successfully")


########################################
# Step3. Create multicast group 
########################################
print "Configure Multicast group"
groupStatus = sth.emulation_multicast_group_config (
        ip_addr_start                                    = '225.0.0.1',
        mode                                             = 'create',
        num_groups                                       = '5')
        
status = groupStatus['status']
if (status == '0') :
    print("***** Created Multicast Group failed")
    print(groupStatus)
else:
    print("***** Created Multicast Group successfully")
    
McGroupHandle = groupStatus['handle']

##############################################################
# Step 4. Configure IGMP client on port2
##############################################################
print "Config IGMP client on Port2"
Ejemplo n.º 2
0
test_ctrl_sta = sth.test_control(action='enable')

status = test_ctrl_sta['status']
if (status == '0'):
    print("run sth.test_control failed")
    print(test_ctrl_sta)
else:
    print("***** run sth.test_control successfully")

##############################################################
# Step2.Config multicast groups
##############################################################
device_ret0_pim_group0_macstgroup = sth.emulation_multicast_group_config(
    mode='create',
    ip_prefix_len='32',
    ip_addr_start='225.18.0.10',
    ip_addr_step='1',
    num_groups='10000',
    pool_name='Ipv4Group_1')

status = device_ret0_pim_group0_macstgroup['status']
if (status == '0'):
    print("run sth.emulation_multicast_group_config failed")
    print(device_ret0_pim_group0_macstgroup)
else:
    print("***** run sth.emulation_multicast_group_config successfully")

device_ret1_pim_group0_macstgroup = sth.emulation_multicast_group_config(
    mode='create',
    ip_prefix_len='32',
    ip_addr_start='225.19.0.10',