Efficient way of handling config data in get_conf_data

Also using get_config_data in the example test case

Signed-off-by: M S Vishwanath Bhat <vbhat@redhat.com>