1#!/usr/bin/env python3
2
3# Copyright (c) 2022 The Chromium OS Authors
4# SPDX-License-Identifier: Apache-2.0
5
6"""This file contains XML constants defined to be used by generate_vif.py"""
7
8from constants import other_constants
9from constants import vif_element_constants
10
11XML_ENCODING = "utf-8"
12XML_ELEMENT_NAME_PREFIX = "vif"
13XML_ROOT_ELEMENT_NAME = "VIF"
14XML_VIF_NAMESPACE = "http://usb.org/VendorInfoFile.xsd"
15XML_NAMESPACE_ATTRIBUTES = {
16    "xmlns:vif": XML_VIF_NAMESPACE,
17}
18
19VIF_SPEC_ELEMENTS = {
20    "VIF_Specification": {
21        other_constants.TEXT: "3.19",
22    },
23    "VIF_App": {
24        other_constants.CHILD: {
25            "Description": {
26                other_constants.TEXT: "This VIF XML file is generated by the Zephyr GenVIF script",
27            }
28        }
29    },
30}
31
32VIF_SPEC_ELEMENTS_FROM_SOURCE_XML = {vif_element_constants.VENDOR_NAME,
33                                     vif_element_constants.MODEL_PART_NUMBER,
34                                     vif_element_constants.PRODUCT_REVISION,
35                                     vif_element_constants.TID,
36                                     vif_element_constants.VIF_PRODUCT_TYPE,
37                                     vif_element_constants.CERTIFICATION_TYPE, }
38