wred_id = nas_qos_wred_example.wred_profile_create_example() if wred_id is None: sys.exit(0) port_id = 17 pool_id = buffer_pool_id print "### set up a queue to use the buffer pool" queue_id = nas_qos_queue_example.queue_modify_buffer_profile_example( port_id, 'UCAST', 1, buffer_profile_id) if queue_id is None: sys.exit(0) print "### create Port Buffer Pool for management" port_pool_id = port_pool_create_example(port_id, pool_id) if port_pool_id is None: sys.exit(0) port_pool_get_example(port_id, pool_id) print "### modify Port Buffer Pool to use new WRED id" port_pool_id = port_pool_modify_example(port_id, pool_id, wred_id) if port_pool_id is None: sys.exit(0) port_pool_get_example(port_id, pool_id) port_pool_delete_example(port_id, pool_id) nas_qos_buffer_profile_example.buffer_profile_delete_example( buffer_profile_id) nas_qos_buffer_pool_example.buffer_pool_delete_example(buffer_pool_id) nas_qos_wred_example.wred_profile_delete_example(wred_id)
buffer_profile_id = nas_qos_buffer_profile_example.buffer_profile_create_example(buffer_pool_id) if buffer_profile_id is None: exit() local_id = 1 priority_group_get_example(port_id, local_id) priority_group_id = priority_group_modify_buffer_profile_example(port_id, local_id, buffer_profile_id) if priority_group_id is None: exit() priority_group_get_example(port_id, local_id) # stats get print '### Show buffer_pool stat of buffer_pool_id %d ###' % buffer_pool_id buffer_pool_stat_get_example (buffer_pool_id) # stats get print '### Show priority_group stat of port %d local_id %d ###' % (port_id, local_id) priority_group_stat_get_example (port_id, local_id ) # reset priority_group_id = priority_group_modify_buffer_profile_example(port_id, local_id, 0) if priority_group_id is None: exit() nas_qos_buffer_profile_example.buffer_profile_delete_example(buffer_profile_id) nas_qos_buffer_pool_example.buffer_pool_delete_example(buffer_pool_id)