Hey, guy. Maybe you can do this function like net_dumpxml().

    cmd = "net-dumpxml %s %s" % (net_name, extra)
    result = command(cmd, **dargs)
    if to_file:
        result_file = open(to_file, 'w')
        result_file.write(result.stdout.strip())
        result_file.close()
    return result