def format_influx_measurement_record(record):
    """Format the record from Influx in proper manner for the insertion in Kafka bus

    Args:
        record (dict): The measurement record after query in influxDB

    Returns:
        dict: OSM-related information
    """
    flavor = {
        "vcpus": record.get("vdu_flavor_vcpus", None),
        "disk": record.get("vdu_flavor_disk", None),
        "ram": record.get("vdu_flavor_ram", None)
    }
    return {
        "ns": {
            "id": record.get('ns_uuid', None),
            "name": record.get('ns_name', None),
            "nsd_id": record.get('nsd_id', None),
            "nsd_name": record.get('nsd_name', None)
        },
        "vnf": {
            "id": record.get("vnf_uuid", None),
            "name": record.get("vnf_name", None),
            "short_name": record.get("vnf_short_name", None),
            "vnfd_id": record.get('vnfd_id', None),
            "vnfd_name": record.get('vnfd_name', None)
        },
        "vdu": {
            "id": record.get("vdu_uuid", None),
            "image_id": record.get("vdu_image_uuid", None),
            "flavor": flavor,
            "status": record.get("vdu_state", None),
            "ip_address": record.get("ip_address", None),
            "mgmt-interface": record.get("mgmt-interface", None)
        }
    }