-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at:
--          http://license.coscl.org.cn/MulanPSL2
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.
local mdb = require 'mc.mdb'
local class = require 'mc.class_mgnt'
local privilege = require 'mc.privilege'

local pc_ie_device_class_types = require 'class.types.PCIeDevice'
local pc_ie_card_class_types = require 'class.types.PCIeCard'
local pcie_addr_info_class_types = require 'class.types.PcieAddrInfo'
local business_connector_class_types = require 'class.types.BusinessConnector'
local ser_des_class_types = require 'class.types.SerDes'
local unit_configuration_class_types = require 'class.types.UnitConfiguration'
local business_topo_node_class_types = require 'class.types.BusinessTopoNode'
local bdf_config_class_types = require 'class.types.BDFConfig'
local cpu_bus_info_class_types = require 'class.types.CpuBusInfo'
local pc_ie_load_info_class_types = require 'class.types.PCIeLoadInfo'
local pc_ie_load_info_backup_class_types =
    require 'class.types.PCIeLoadInfoBackup'
local pc_ie_ipmi_channel_config_class_types =
    require 'class.types.PCIeIPMIChannelConfig'
local pc_ie_devices_intf_types = require 'pcie_device.json_types.PCIeDevices'
local properties_intf_types = require 'pcie_device.json_types.Properties'
local pc_ie_device_intf_types = require 'pcie_device.json_types.PCIeDevice'
local ras_intf_types = require 'pcie_device.json_types.RAS'
local pc_ie_card_intf_types = require 'pcie_device.json_types.PCIeCard'
local unit_intf_types = require 'pcie_device.json_types.Unit'
local pcie_addr_info_intf_types = require 'pcie_device.json_types.PcieAddrInfo'
local unit_config_error_intf_types =
    require 'pcie_device.json_types.UnitConfigError'

local PCIeDevices = {
    ['prop_configs'] = {},
    ['default_props'] = {},
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.PCIeDevices'] = {},
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Systems.PCIeDevices'] = {
            ['SetPcieErrorStatus'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备所属CPU ID',
                        ['param'] = 'SocketID'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '错误类型：CorrectableError可纠正错误、UncorrectableError不可纠正错误、FatalError致命错误、ParityError奇偶校验错误、SystemError系统错误',
                        ['param'] = 'ErrorType'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备是否发生错误, 取值: 0-未发生,1-发生',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '错误事件属性状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '根据错误类型设置不同错误事件属性状态'
            },
            ['SetBandwidthReduction'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = '带宽事件属性值',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '设置降带宽事件属性状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置PCIE降带宽事件属性'
            },
            ['SetUCEByBIOS'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = '上报的UCE故障值',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '设置上报的UCE故障状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置PCIE设备BIOS上报的UCE故障'
            },
            ['SetDiagnosticFault'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备所属CPU ID',
                        ['param'] = 'SocketID'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = '故障标志位值',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '设置故障标志位状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置故障标志位'
            },
            ['SetPredictiveFault'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备所属CPU ID',
                        ['param'] = 'SocketID'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = '预故障告警标志位值',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '预故障告警标志位状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置预故障告警标志位'
            },
            ['GetDeviceName'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备所属CPU ID',
                        ['param'] = 'SocketID'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '获取设备丝印名状态',
                        ['param'] = 'Status'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '设备丝印名称',
                        ['param'] = 'DeviceName'
                    }
                },
                ['description'] = '根据SSBDF获取设备丝印名'
            },
            ['GetPCIeCardNum'] = {
                ['req'] = {},
                ['rsp'] = {
                    {
                        ['baseType'] = 'U32',
                        ['description'] = 'PCIe卡数量',
                        ['param'] = 'PCIeCardNum'
                    }
                },
                ['description'] = '获取pcie卡数量'
            },
            ['SetFaultByBios'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe 卡故障状态',
                        ['param'] = 'FaultStatus'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '设置PCIERAID卡BIOS上报故障状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置PCIERAID卡BIOS上报故障状态'
            },
            ['SetLinkSpeedReduced'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                        ['param'] = 'Segment'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的总线号',
                        ['param'] = 'Bus'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的设备号',
                        ['param'] = 'Device'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备的功能号',
                        ['param'] = 'Function'
                    }, {
                        ['baseType'] = 'U8',
                        ['description'] = 'PCIe设备降速率事件属性值',
                        ['param'] = 'Value'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'U8',
                        ['description'] = '设置PCIe设备降速率事件属性状态',
                        ['param'] = 'Status'
                    }
                },
                ['description'] = '设置PCIe设备降速率事件属性'
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/PCIeDevices'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.PCIeDevices'] = {
            ['property_defaults'] = {},
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = pc_ie_devices_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local PCIeDevice = {
    ['table_name'] = 't_pcie_dev_info',
    ['prop_configs'] = {
        ['Container'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = pc_ie_device_class_types.Container
        },
        ['DeviceType'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = pc_ie_device_class_types.DeviceType
        },
        ['RefComponent'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['readOnly'] = true,
            ['validator'] = pc_ie_device_class_types.RefComponent
        },
        ['GroupPosition'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['primaryKey'] = true,
            ['validator'] = pc_ie_device_class_types.GroupPosition
        },
        ['MultihostPresence'] = {
            ['baseType'] = 'U32',
            ['validator'] = pc_ie_device_class_types.MultihostPresence
        }
    },
    ['default_props'] = {
        ['Container'] = pc_ie_device_class_types.Container.default[1],
        ['DeviceType'] = pc_ie_device_class_types.DeviceType.default[1],
        ['RefComponent'] = pc_ie_device_class_types.RefComponent.default[1],
        ['GroupPosition'] = pc_ie_device_class_types.GroupPosition.default[1],
        ['MultihostPresence'] = pc_ie_device_class_types.MultihostPresence
            .default[1]
    },
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.PCIeDevices.PCIeDevice'] = {
            ['SlotID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '槽位号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.SlotID
            },
            ['Segment'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.Segment
            },
            ['SocketID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'CPU ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.SocketID
            },
            ['Bus'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Bus',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.Bus
            },
            ['Device'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Device',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.Device
            },
            ['Function'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Function',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.Function
            },
            ['DevBus'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '设备总线',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.DevBus
            },
            ['DevDevice'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '设备的 Device',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.DevDevice
            },
            ['DevFunction'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '设备的 Function',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.DevFunction
            },
            ['DiagnosticFault'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '严重故障诊断告警状态',
                ['usage'] = {'CSR', 'ResetPer', 'SHM'},
                ['validator'] = pc_ie_device_intf_types.DiagnosticFault
            },
            ['PredictiveFault'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '预故障告警状态',
                ['usage'] = {'CSR', 'ResetPer', 'SHM'},
                ['validator'] = pc_ie_device_intf_types.PredictiveFault
            },
            ['UCEByBIOS'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'BIOS上报不可纠正错误标识，相当于V2 fatalerror',
                ['usage'] = {'CSR', 'ResetPer', 'SHM'},
                ['validator'] = pc_ie_device_intf_types.UCEByBIOS
            },
            ['BandwidthReduction'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIE降带宽检测失败上报事件属性',
                ['usage'] = {'CSR', 'ResetPer', 'SHM'},
                ['validator'] = pc_ie_device_intf_types.BandwidthReduction
            },
            ['LinkSpeedReduced'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备降速率检测告警上报事件属性(BIOS上报)',
                ['usage'] = {'CSR', 'ResetPer', 'SHM'},
                ['validator'] = pc_ie_device_intf_types.LinkSpeedReduced
            },
            ['FunctionClass'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIEe设备的功能分类',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.FunctionClass
            },
            ['DeviceName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '设备资源名称',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.DeviceName
            },
            ['Position'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '设备位置（容器名称）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.Position
            },
            ['FaultByBios'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'Bios上报的异常状态',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.FaultByBios
            },
            ['SlotType'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe槽位类型',
                ['enum'] = {
                    'FullLength', 'HalfLength', 'LowProfile', 'M2', 'Mini',
                    'OCP3Large', 'OCP3Small', 'OEM', 'U2'
                },
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.SlotType
            },
            ['FunctionProtocol'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe功能协议',
                ['enum'] = {'CXL', 'PCIe'},
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.FunctionProtocol
            },
            ['FunctionType'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe功能类型',
                ['enum'] = {'Physical', 'Virtual'},
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.FunctionType
            },
            ['PCIeType'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备所在槽位使用的规范版本',
                ['enum'] = {'Gen1', 'Gen2', 'Gen3', 'Gen4', 'Gen5'},
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.PCIeType
            },
            ['PCIeDeviceType'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备类型',
                ['enum'] = {
                    'MultiFunction', 'Retimer', 'Simulated', 'SingleFunction'
                },
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_device_intf_types.PCIeDeviceType
            }
        },
        ['bmc.kepler.Systems.PCIeDevices.PCIeDevice.RAS'] = {
            ['CorrectableError'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备发生可纠正错误, 取值: 0-未发生, 1-发生',
                ['usage'] = {'CSR'},
                ['validator'] = ras_intf_types.CorrectableError
            },
            ['UncorrectableError'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备发生不可纠正错误, 取值: 0-未发生,1-发生',
                ['usage'] = {'CSR'},
                ['validator'] = ras_intf_types.UncorrectableError
            },
            ['FatalError'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备发生致命错误, 取值: 0-未发生,1-发生',
                ['usage'] = {'CSR'},
                ['validator'] = ras_intf_types.FatalError
            },
            ['ParityError'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备发生奇偶校验错误, 取值: 0-未发生,1-发生',
                ['usage'] = {'CSR'},
                ['validator'] = ras_intf_types.ParityError
            },
            ['SystemError'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe设备发生系统错误, 取值: 0-未发生,1-发生',
                ['usage'] = {'CSR'},
                ['validator'] = ras_intf_types.SystemError
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/PCIeDevices/:Id'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.PCIeDevices.PCIeDevice'] = {
            ['property_defaults'] = {
                ['SlotID'] = pc_ie_device_intf_types.SlotID.default[1],
                ['Segment'] = pc_ie_device_intf_types.Segment.default[1],
                ['SocketID'] = pc_ie_device_intf_types.SocketID.default[1],
                ['Bus'] = pc_ie_device_intf_types.Bus.default[1],
                ['Device'] = pc_ie_device_intf_types.Device.default[1],
                ['Function'] = pc_ie_device_intf_types.Function.default[1],
                ['DevBus'] = pc_ie_device_intf_types.DevBus.default[1],
                ['DevDevice'] = pc_ie_device_intf_types.DevDevice.default[1],
                ['DevFunction'] = pc_ie_device_intf_types.DevFunction.default[1],
                ['DiagnosticFault'] = pc_ie_device_intf_types.DiagnosticFault
                    .default[1],
                ['PredictiveFault'] = pc_ie_device_intf_types.PredictiveFault
                    .default[1],
                ['UCEByBIOS'] = pc_ie_device_intf_types.UCEByBIOS.default[1],
                ['BandwidthReduction'] = pc_ie_device_intf_types.BandwidthReduction
                    .default[1],
                ['LinkSpeedReduced'] = pc_ie_device_intf_types.LinkSpeedReduced
                    .default[1],
                ['FunctionClass'] = pc_ie_device_intf_types.FunctionClass
                    .default[1],
                ['DeviceName'] = pc_ie_device_intf_types.DeviceName.default[1],
                ['Position'] = pc_ie_device_intf_types.Position.default[1],
                ['FaultByBios'] = pc_ie_device_intf_types.FaultByBios.default[1],
                ['SlotType'] = pc_ie_device_intf_types.SlotType.default[1],
                ['FunctionProtocol'] = pc_ie_device_intf_types.FunctionProtocol
                    .default[1],
                ['FunctionType'] = pc_ie_device_intf_types.FunctionType.default[1],
                ['PCIeType'] = pc_ie_device_intf_types.PCIeType.default[1],
                ['PCIeDeviceType'] = pc_ie_device_intf_types.PCIeDeviceType
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = pc_ie_device_intf_types
        },
        ['bmc.kepler.Systems.PCIeDevices.PCIeDevice.RAS'] = {
            ['property_defaults'] = {
                ['CorrectableError'] = ras_intf_types.CorrectableError.default[1],
                ['UncorrectableError'] = ras_intf_types.UncorrectableError
                    .default[1],
                ['FatalError'] = ras_intf_types.FatalError.default[1],
                ['ParityError'] = ras_intf_types.ParityError.default[1],
                ['SystemError'] = ras_intf_types.SystemError.default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = ras_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local PCIeCard = {
    ['prop_configs'] = {
        ['PcbID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = pc_ie_card_class_types.PcbID
        },
        ['RefChip'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8[]',
            ['refInterface'] = 'bmc.kepler.Chip.BlockIO',
            ['validator'] = pc_ie_card_class_types.RefChip
        },
        ['Protocol'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = pc_ie_card_class_types.Protocol
        },
        ['MaxFrameLen'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U32',
            ['validator'] = pc_ie_card_class_types.MaxFrameLen
        },
        ['DevBus'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = pc_ie_card_class_types.DevBus
        },
        ['DevDevice'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = pc_ie_card_class_types.DevDevice
        },
        ['DevFunction'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = pc_ie_card_class_types.DevFunction
        }
    },
    ['default_props'] = {
        ['PcbID'] = pc_ie_card_class_types.PcbID.default[1],
        ['RefChip'] = pc_ie_card_class_types.RefChip.default[1],
        ['Protocol'] = pc_ie_card_class_types.Protocol.default[1],
        ['MaxFrameLen'] = pc_ie_card_class_types.MaxFrameLen.default[1],
        ['DevBus'] = pc_ie_card_class_types.DevBus.default[1],
        ['DevDevice'] = pc_ie_card_class_types.DevDevice.default[1],
        ['DevFunction'] = pc_ie_card_class_types.DevFunction.default[1]
    },
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.PCIeDevices.PCIeCard'] = {
            ['Name'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '产品名称（SP580等）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Name
            },
            ['Model'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe卡的型号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Model
            },
            ['NodeID'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '通过PCIe卡所在容器和槽位得到的唯一标识符',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.NodeID
            },
            ['SlotID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '槽位号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SlotID
            },
            ['DeviceName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '设备资源名称',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.DeviceName
            },
            ['FunctionClass'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '功能分类（0:未知、1:RAID、2:网卡、3:GPU卡、4:存储卡（SSD卡/M.2卡）、5:SDI卡、6:加速卡、7:扩展卡（PCIe Riser）、8:FPGA卡、9:NPU卡）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.FunctionClass
            },
            ['Description'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '描述',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Description
            },
            ['PcbVersion'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCB版本',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.PcbVersion
            },
            ['BoardID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '单板ID（仅自研卡涉及）',
                ['usage'] = {'CSR'},
                ['default'] = 65535,
                ['validator'] = pc_ie_card_intf_types.BoardID
            },
            ['BoardName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '单板名称（仅自研卡涉及）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.BoardName
            },
            ['LinkWidthAbility'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '最大链路带宽',
                ['usage'] = {'CSR'},
                ['default'] = 'N/A',
                ['validator'] = pc_ie_card_intf_types.LinkWidthAbility
            },
            ['LinkWidth'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '链路带宽',
                ['usage'] = {'CSR'},
                ['default'] = 'N/A',
                ['validator'] = pc_ie_card_intf_types.LinkWidth
            },
            ['LinkSpeedCapability'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '最大链路速率',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LinkSpeedCapability
            },
            ['LinkSpeed'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '链路速率',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LinkSpeed
            },
            ['VendorID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '制造商ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.VendorID
            },
            ['DeviceID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '设备ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.DeviceID
            },
            ['SubVendorID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '子厂商ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SubVendorID
            },
            ['SubDeviceID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '子设备ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SubDeviceID
            },
            ['Position'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '位置信息(容器信息)',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Position
            },
            ['Manufacturer'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '厂商',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Manufacturer
            },
            ['LaneOwner'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '资源归属，起始值为1，表示当前卡挂在哪个CPU下',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LaneOwner
            },
            ['FirmwareVersion'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '固件版本',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.FirmwareVersion
            },
            ['PartNumber'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '部件编码',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.PartNumber
            },
            ['SerialNumber'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '序列号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SerialNumber
            },
            ['Health'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '健康状态',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Health
            },
            ['CardModel'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'const'},
                ['description'] = 'PCIe设备型号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.CardModel
            },
            ['CardManufacturer'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'const'},
                ['description'] = 'PCIe设备制造商',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.CardManufacturer
            },
            ['CardForServers'] = {
                ['baseType'] = 'U8[]',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'false'},
                ['description'] = 'PCIe设备服务的系统Id列表',
                ['validator'] = pc_ie_card_intf_types.CardForServers
            },
            ['RefComponent'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '关联部件对象',
                ['validator'] = pc_ie_card_intf_types.RefComponent
            },
            ['Presence'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '在位状态',
                ['validator'] = pc_ie_card_intf_types.Presence
            }
        },
        ['bmc.kepler.Systems.Board.Unit'] = {
            ['UID'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '组件唯一标识',
                ['usage'] = {'CSR'},
                ['validator'] = unit_intf_types.UID
            },
            ['Type'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '组件类型(枚举值:EXU,BCU,SEU,CLU,SEU)',
                ['validator'] = unit_intf_types.Type
            },
            ['HWSRVersion'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '天池组件Eeprom中的sr版本号',
                ['validator'] = unit_intf_types.HWSRVersion
            },
            ['CurrentUpgradeStatus'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '0表示未在升级，1:mcu正在升级，2cpld正在升级',
                ['validator'] = unit_intf_types.CurrentUpgradeStatus
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/PCIeDevices/PCIeCards/:Id'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.PCIeDevices.PCIeCard'] = {
            ['property_defaults'] = {
                ['Name'] = pc_ie_card_intf_types.Name.default[1],
                ['Model'] = pc_ie_card_intf_types.Model.default[1],
                ['NodeID'] = pc_ie_card_intf_types.NodeID.default[1],
                ['SlotID'] = pc_ie_card_intf_types.SlotID.default[1],
                ['DeviceName'] = pc_ie_card_intf_types.DeviceName.default[1],
                ['FunctionClass'] = pc_ie_card_intf_types.FunctionClass.default[1],
                ['Description'] = pc_ie_card_intf_types.Description.default[1],
                ['PcbVersion'] = pc_ie_card_intf_types.PcbVersion.default[1],
                ['BoardID'] = 65535,
                ['BoardName'] = pc_ie_card_intf_types.BoardName.default[1],
                ['LinkWidthAbility'] = 'N/A',
                ['LinkWidth'] = 'N/A',
                ['LinkSpeedCapability'] = pc_ie_card_intf_types.LinkSpeedCapability
                    .default[1],
                ['LinkSpeed'] = pc_ie_card_intf_types.LinkSpeed.default[1],
                ['VendorID'] = pc_ie_card_intf_types.VendorID.default[1],
                ['DeviceID'] = pc_ie_card_intf_types.DeviceID.default[1],
                ['SubVendorID'] = pc_ie_card_intf_types.SubVendorID.default[1],
                ['SubDeviceID'] = pc_ie_card_intf_types.SubDeviceID.default[1],
                ['Position'] = pc_ie_card_intf_types.Position.default[1],
                ['Manufacturer'] = pc_ie_card_intf_types.Manufacturer.default[1],
                ['LaneOwner'] = pc_ie_card_intf_types.LaneOwner.default[1],
                ['FirmwareVersion'] = pc_ie_card_intf_types.FirmwareVersion
                    .default[1],
                ['PartNumber'] = pc_ie_card_intf_types.PartNumber.default[1],
                ['SerialNumber'] = pc_ie_card_intf_types.SerialNumber.default[1],
                ['Health'] = pc_ie_card_intf_types.Health.default[1],
                ['CardModel'] = pc_ie_card_intf_types.CardModel.default[1],
                ['CardManufacturer'] = pc_ie_card_intf_types.CardManufacturer
                    .default[1],
                ['CardForServers'] = pc_ie_card_intf_types.CardForServers
                    .default[1],
                ['RefComponent'] = pc_ie_card_intf_types.RefComponent.default[1],
                ['Presence'] = pc_ie_card_intf_types.Presence.default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = pc_ie_card_intf_types
        },
        ['bmc.kepler.Systems.Board.Unit'] = {
            ['property_defaults'] = {
                ['UID'] = unit_intf_types.UID.default[1],
                ['Type'] = unit_intf_types.Type.default[1],
                ['HWSRVersion'] = unit_intf_types.HWSRVersion.default[1],
                ['CurrentUpgradeStatus'] = unit_intf_types.CurrentUpgradeStatus
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = unit_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local OCPCard = {
    ['prop_configs'] = {},
    ['default_props'] = {},
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.PCIeDevices.PCIeCard'] = {
            ['Name'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '产品名称（SP580等）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Name
            },
            ['Model'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCIe卡的型号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Model
            },
            ['NodeID'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '通过PCIe卡所在容器和槽位得到的唯一标识符',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.NodeID
            },
            ['SlotID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '槽位号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SlotID
            },
            ['DeviceName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '设备资源名称',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.DeviceName
            },
            ['FunctionClass'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '功能分类（0:未知、1:RAID、2:网卡、3:GPU卡、4:存储卡（SSD卡/M.2卡）、5:SDI卡、6:加速卡、7:扩展卡（PCIe Riser）、8:FPGA卡、9:NPU卡）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.FunctionClass
            },
            ['Description'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '描述',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Description
            },
            ['PcbVersion'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = 'PCB版本',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.PcbVersion
            },
            ['BoardID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '单板ID（仅自研卡涉及）',
                ['usage'] = {'CSR'},
                ['default'] = 65535,
                ['validator'] = pc_ie_card_intf_types.BoardID
            },
            ['BoardName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '单板名称（仅自研卡涉及）',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.BoardName
            },
            ['LinkWidthAbility'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '最大链路带宽',
                ['usage'] = {'CSR'},
                ['default'] = 'N/A',
                ['validator'] = pc_ie_card_intf_types.LinkWidthAbility
            },
            ['LinkWidth'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '链路带宽',
                ['usage'] = {'CSR'},
                ['default'] = 'N/A',
                ['validator'] = pc_ie_card_intf_types.LinkWidth
            },
            ['LinkSpeedCapability'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '最大链路速率',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LinkSpeedCapability
            },
            ['LinkSpeed'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '链路速率',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LinkSpeed
            },
            ['VendorID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '制造商ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.VendorID
            },
            ['DeviceID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '设备ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.DeviceID
            },
            ['SubVendorID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '子厂商ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SubVendorID
            },
            ['SubDeviceID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '子设备ID',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SubDeviceID
            },
            ['Position'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '位置信息(容器信息)',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Position
            },
            ['Manufacturer'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '厂商',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Manufacturer
            },
            ['LaneOwner'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '资源归属，起始值为1，表示当前卡挂在哪个CPU下',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.LaneOwner
            },
            ['FirmwareVersion'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '固件版本',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.FirmwareVersion
            },
            ['PartNumber'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '部件编码',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.PartNumber
            },
            ['SerialNumber'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '序列号',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.SerialNumber
            },
            ['Health'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '健康状态',
                ['usage'] = {'CSR'},
                ['validator'] = pc_ie_card_intf_types.Health
            },
            ['CardForServers'] = {
                ['baseType'] = 'U8[]',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'false'},
                ['description'] = 'PCIe设备服务的系统Id列表',
                ['validator'] = pc_ie_card_intf_types.CardForServers
            },
            ['RefComponent'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '关联部件对象',
                ['validator'] = pc_ie_card_intf_types.RefComponent
            },
            ['Presence'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '在位状态',
                ['validator'] = pc_ie_card_intf_types.Presence
            },
            ['CardModel'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'const'},
                ['description'] = 'PCIe设备型号',
                ['validator'] = pc_ie_card_intf_types.CardModel
            },
            ['CardManufacturer'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['options'] = {['emitsChangedSignal'] = 'const'},
                ['description'] = 'PCIe设备制造商',
                ['validator'] = pc_ie_card_intf_types.CardManufacturer
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/PCIeDevices/OCPCards/:Id'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.PCIeDevices.PCIeCard'] = {
            ['property_defaults'] = {
                ['Name'] = pc_ie_card_intf_types.Name.default[1],
                ['Model'] = pc_ie_card_intf_types.Model.default[1],
                ['NodeID'] = pc_ie_card_intf_types.NodeID.default[1],
                ['SlotID'] = pc_ie_card_intf_types.SlotID.default[1],
                ['DeviceName'] = pc_ie_card_intf_types.DeviceName.default[1],
                ['FunctionClass'] = pc_ie_card_intf_types.FunctionClass.default[1],
                ['Description'] = pc_ie_card_intf_types.Description.default[1],
                ['PcbVersion'] = pc_ie_card_intf_types.PcbVersion.default[1],
                ['BoardID'] = 65535,
                ['BoardName'] = pc_ie_card_intf_types.BoardName.default[1],
                ['LinkWidthAbility'] = 'N/A',
                ['LinkWidth'] = 'N/A',
                ['LinkSpeedCapability'] = pc_ie_card_intf_types.LinkSpeedCapability
                    .default[1],
                ['LinkSpeed'] = pc_ie_card_intf_types.LinkSpeed.default[1],
                ['VendorID'] = pc_ie_card_intf_types.VendorID.default[1],
                ['DeviceID'] = pc_ie_card_intf_types.DeviceID.default[1],
                ['SubVendorID'] = pc_ie_card_intf_types.SubVendorID.default[1],
                ['SubDeviceID'] = pc_ie_card_intf_types.SubDeviceID.default[1],
                ['Position'] = pc_ie_card_intf_types.Position.default[1],
                ['Manufacturer'] = pc_ie_card_intf_types.Manufacturer.default[1],
                ['LaneOwner'] = pc_ie_card_intf_types.LaneOwner.default[1],
                ['FirmwareVersion'] = pc_ie_card_intf_types.FirmwareVersion
                    .default[1],
                ['PartNumber'] = pc_ie_card_intf_types.PartNumber.default[1],
                ['SerialNumber'] = pc_ie_card_intf_types.SerialNumber.default[1],
                ['Health'] = pc_ie_card_intf_types.Health.default[1],
                ['CardForServers'] = pc_ie_card_intf_types.CardForServers
                    .default[1],
                ['RefComponent'] = pc_ie_card_intf_types.RefComponent.default[1],
                ['Presence'] = pc_ie_card_intf_types.Presence.default[1],
                ['CardModel'] = pc_ie_card_intf_types.CardModel.default[1],
                ['CardManufacturer'] = pc_ie_card_intf_types.CardManufacturer
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = pc_ie_card_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local PcieAddrInfo = {
    ['table_name'] = 't_pcie_addr_info',
    ['prop_configs'] = {
        ['ContainerUID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.ContainerUID
        },
        ['ContainerUnitType'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.ContainerUnitType
        },
        ['Location'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.Location
        },
        ['ContainerSlot'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.ContainerSlot
        },
        ['DevBus'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.DevBus
        },
        ['DevDevice'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.DevDevice
        },
        ['DevFunction'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['readOnly'] = true,
            ['validator'] = pcie_addr_info_class_types.DevFunction
        },
        ['GroupPosition'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['primaryKey'] = true,
            ['validator'] = pcie_addr_info_class_types.GroupPosition
        },
        ['MultihostPresence'] = {
            ['baseType'] = 'U32',
            ['validator'] = pcie_addr_info_class_types.MultihostPresence
        }
    },
    ['default_props'] = {
        ['ContainerUID'] = pcie_addr_info_class_types.ContainerUID.default[1],
        ['ContainerUnitType'] = pcie_addr_info_class_types.ContainerUnitType
            .default[1],
        ['Location'] = pcie_addr_info_class_types.Location.default[1],
        ['ContainerSlot'] = pcie_addr_info_class_types.ContainerSlot.default[1],
        ['DevBus'] = pcie_addr_info_class_types.DevBus.default[1],
        ['DevDevice'] = pcie_addr_info_class_types.DevDevice.default[1],
        ['DevFunction'] = pcie_addr_info_class_types.DevFunction.default[1],
        ['GroupPosition'] = pcie_addr_info_class_types.GroupPosition.default[1],
        ['MultihostPresence'] = pcie_addr_info_class_types.MultihostPresence
            .default[1]
    },
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.PcieAddrInfo'] = {
            ['GroupID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '逻辑组ID',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.GroupID
            },
            ['SlotID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '槽位id',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = pcie_addr_info_intf_types.SlotID
            },
            ['ComponentType'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '部件类型，与Component类的中的部件类型属性对应。（标准定义，如：8:PCIe标卡、13:NCI卡、83:OCP卡）',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.ComponentType
            },
            ['ControllerIndex'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe控制器索引，CPU内部同类型控制器的索引，从0开始编号',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.ControllerIndex
            },
            ['ControllerType'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'PCIe控制器类型（0:PCIeCore，1:NIC，2:SAS，3:SATA，4:ZIP，5:SEC）',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.ControllerType
            },
            ['SocketID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'CPU ID',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = pcie_addr_info_intf_types.SocketID
            },
            ['Segment'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = '用于多PCI Bridge场景的编号，每一个Segment对应一个PCI Bus空间',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.Segment
            },
            ['Bus'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Bus号',
                ['usage'] = {'CSR', 'ResetPer'},
                ['validator'] = pcie_addr_info_intf_types.Bus
            },
            ['Device'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Device号',
                ['usage'] = {'CSR', 'ResetPer'},
                ['validator'] = pcie_addr_info_intf_types.Device
            },
            ['Function'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'root port Function号',
                ['usage'] = {'CSR', 'ResetPer'},
                ['validator'] = pcie_addr_info_intf_types.Function
            },
            ['VendorID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '供应商id',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.VendorID
            },
            ['DeviceID'] = {
                ['baseType'] = 'U16',
                ['readOnly'] = true,
                ['description'] = '设备id',
                ['usage'] = {'CSR'},
                ['validator'] = pcie_addr_info_intf_types.DeviceID
            },
            ['PortID'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['description'] = 'pcie槽位对应的portId，用于上报bios槽位与portid对应的关系，计算对应槽位的rootBDF',
                ['usage'] = {'CSR', 'SHM'},
                ['default'] = 255,
                ['validator'] = pcie_addr_info_intf_types.PortID
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/PCIeDevices/PcieAddrInfo/:ID'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.PcieAddrInfo'] = {
            ['property_defaults'] = {
                ['GroupID'] = pcie_addr_info_intf_types.GroupID.default[1],
                ['SlotID'] = pcie_addr_info_intf_types.SlotID.default[1],
                ['ComponentType'] = pcie_addr_info_intf_types.ComponentType
                    .default[1],
                ['ControllerIndex'] = pcie_addr_info_intf_types.ControllerIndex
                    .default[1],
                ['ControllerType'] = pcie_addr_info_intf_types.ControllerType
                    .default[1],
                ['SocketID'] = pcie_addr_info_intf_types.SocketID.default[1],
                ['Segment'] = pcie_addr_info_intf_types.Segment.default[1],
                ['Bus'] = pcie_addr_info_intf_types.Bus.default[1],
                ['Device'] = pcie_addr_info_intf_types.Device.default[1],
                ['Function'] = pcie_addr_info_intf_types.Function.default[1],
                ['VendorID'] = pcie_addr_info_intf_types.VendorID.default[1],
                ['DeviceID'] = pcie_addr_info_intf_types.DeviceID.default[1],
                ['PortID'] = 255
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = pcie_addr_info_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local BusinessConnector = {
    ['prop_configs'] = {
        ['Name'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.Name
        },
        ['Direction'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.Direction
        },
        ['Slot'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = business_connector_class_types.Slot
        },
        ['LinkWidth'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.LinkWidth
        },
        ['MaxLinkRate'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.MaxLinkRate
        },
        ['ConnectorType'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.ConnectorType
        },
        ['SilkText'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.SilkText
        },
        ['UpstreamResources'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/Port'
            },
            ['validator'] = business_connector_class_types.UpstreamResources
        },
        ['ActualResourceOrder'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String[]',
            ['validator'] = business_connector_class_types.ActualResourceOrder
        },
        ['Ports'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/Port'
            },
            ['validator'] = business_connector_class_types.Ports
        },
        ['RefMgmtConnector'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['refInterface'] = 'bmc.kepler.Connector',
            ['validator'] = business_connector_class_types.RefMgmtConnector
        },
        ['RefMgmtConnectorTianChi'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['refInterface'] = 'bmc.kepler.Connector',
            ['validator'] = business_connector_class_types.RefMgmtConnectorTianChi
        },
        ['RefPCIeAddrInfo'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_connector_class_types.RefPCIeAddrInfo
        },
        ['BCUIndex'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = business_connector_class_types.BCUIndex
        }
    },
    ['default_props'] = {
        ['Name'] = business_connector_class_types.Name.default[1],
        ['Direction'] = business_connector_class_types.Direction.default[1],
        ['Slot'] = business_connector_class_types.Slot.default[1],
        ['LinkWidth'] = business_connector_class_types.LinkWidth.default[1],
        ['MaxLinkRate'] = business_connector_class_types.MaxLinkRate.default[1],
        ['ConnectorType'] = business_connector_class_types.ConnectorType.default[1],
        ['SilkText'] = business_connector_class_types.SilkText.default[1],
        ['UpstreamResources'] = business_connector_class_types.UpstreamResources
            .default[1],
        ['ActualResourceOrder'] = business_connector_class_types.ActualResourceOrder
            .default[1],
        ['Ports'] = business_connector_class_types.Ports.default[1],
        ['RefMgmtConnector'] = business_connector_class_types.RefMgmtConnector
            .default[1],
        ['RefMgmtConnectorTianChi'] = business_connector_class_types.RefMgmtConnectorTianChi
            .default[1],
        ['RefPCIeAddrInfo'] = business_connector_class_types.RefPCIeAddrInfo
            .default[1],
        ['BCUIndex'] = business_connector_class_types.BCUIndex.default[1]
    },
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.UnitConfigError'] = {
            ['Port1LinkInfo'] = {
                ['baseType'] = 'String',
                ['readOnly'] = false,
                ['description'] = '端口1连接信息',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port1LinkInfo
            },
            ['Port1Status'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = false,
                ['default'] = 255,
                ['description'] = '端口1状态（0：正常、1：组件配置错误）',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port1Status
            },
            ['Port2LinkInfo'] = {
                ['baseType'] = 'String',
                ['readOnly'] = false,
                ['description'] = '端口2连接信息',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port2LinkInfo
            },
            ['Port2Status'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = false,
                ['default'] = 255,
                ['description'] = '端口2状态',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port2Status
            },
            ['AbsenceAllowed'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['default'] = 0,
                ['description'] = '是否允许组件设备不在位（0：不允许不在位，当不在位时产生该告警、1：允许不在位，不产生告警）',
                ['validator'] = unit_config_error_intf_types.AbsenceAllowed
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/BusinessConnector/:Id'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.UnitConfigError'] = {
            ['property_defaults'] = {
                ['Port1LinkInfo'] = unit_config_error_intf_types.Port1LinkInfo
                    .default[1],
                ['Port1Status'] = 255,
                ['Port2LinkInfo'] = unit_config_error_intf_types.Port2LinkInfo
                    .default[1],
                ['Port2Status'] = 255,
                ['AbsenceAllowed'] = 0
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = unit_config_error_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local SerDes = {
    ['prop_configs'] = {
        ['Name'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = ser_des_class_types.Name
        },
        ['ID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = ser_des_class_types.ID
        },
        ['SocketID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = ser_des_class_types.SocketID
        },
        ['LinkWidth'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = ser_des_class_types.LinkWidth
        },
        ['WorkMode'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = ser_des_class_types.WorkMode
        },
        ['PCIePorts'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Struct',
            ['$ref'] = 'types.json#/defs/PortConfig',
            ['description'] = 'PCIe控制器类型为PCIeCore的链路配置',
            ['validator'] = ser_des_class_types.PCIePorts
        },
        ['SASPorts'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Struct',
            ['$ref'] = 'types.json#/defs/PortConfig',
            ['description'] = 'PCIe控制器类型为SAS的链路配置',
            ['validator'] = ser_des_class_types.SASPorts
        },
        ['ModeConfigs'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/SerdesModeConfig'
            },
            ['validator'] = ser_des_class_types.ModeConfigs
        }
    },
    ['default_props'] = {
        ['Name'] = ser_des_class_types.Name.default[1],
        ['ID'] = ser_des_class_types.ID.default[1],
        ['SocketID'] = ser_des_class_types.SocketID.default[1],
        ['LinkWidth'] = ser_des_class_types.LinkWidth.default[1],
        ['WorkMode'] = ser_des_class_types.WorkMode.default[1],
        ['PCIePorts'] = ser_des_class_types.PCIePorts.default[1],
        ['SASPorts'] = ser_des_class_types.SASPorts.default[1],
        ['ModeConfigs'] = ser_des_class_types.ModeConfigs.default[1]
    }
}

local UnitConfiguration = {
    ['prop_configs'] = {
        ['SlotType'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = unit_configuration_class_types.SlotType
        },
        ['SlotNumber'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = unit_configuration_class_types.SlotNumber
        },
        ['SlotSilkText'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = unit_configuration_class_types.SlotSilkText
        },
        ['ContainerUID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = unit_configuration_class_types.ContainerUID
        },
        ['ContainerSlot'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = unit_configuration_class_types.ContainerSlot
        },
        ['Configurations'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/Configuration'
            },
            ['validator'] = unit_configuration_class_types.Configurations
        }
    },
    ['default_props'] = {
        ['SlotType'] = unit_configuration_class_types.SlotType.default[1],
        ['SlotNumber'] = unit_configuration_class_types.SlotNumber.default[1],
        ['SlotSilkText'] = unit_configuration_class_types.SlotSilkText.default[1],
        ['ContainerUID'] = unit_configuration_class_types.ContainerUID.default[1],
        ['ContainerSlot'] = unit_configuration_class_types.ContainerSlot.default[1],
        ['Configurations'] = unit_configuration_class_types.Configurations
            .default[1]
    },
    ['mdb_prop_configs'] = {
        ['bmc.kepler.Systems.UnitConfigError'] = {
            ['Port1LinkInfo'] = {
                ['baseType'] = 'String',
                ['readOnly'] = false,
                ['description'] = '端口1连接信息',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port1LinkInfo
            },
            ['Port1Status'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = false,
                ['default'] = 255,
                ['description'] = '端口1状态（0：正常、1：组件配置错误）',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port1Status
            },
            ['Port2LinkInfo'] = {
                ['baseType'] = 'String',
                ['readOnly'] = false,
                ['description'] = '端口2连接信息',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port2LinkInfo
            },
            ['Port2Status'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = false,
                ['default'] = 255,
                ['description'] = '端口2状态',
                ['usage'] = {'CSR', 'SHM'},
                ['validator'] = unit_config_error_intf_types.Port2Status
            },
            ['AbsenceAllowed'] = {
                ['baseType'] = 'U8',
                ['readOnly'] = true,
                ['default'] = 0,
                ['description'] = '是否允许组件设备不在位（0：不允许不在位，当不在位时产生该告警、1：允许不在位，不产生告警）',
                ['usage'] = {'CSR'},
                ['validator'] = unit_config_error_intf_types.AbsenceAllowed
            }
        },
        ['bmc.kepler.Object.Properties'] = {
            ['ClassName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象类名',
                ['validator'] = properties_intf_types.ClassName
            },
            ['ObjectName'] = {
                ['baseType'] = 'String',
                ['readOnly'] = true,
                ['description'] = '对象名',
                ['validator'] = properties_intf_types.ObjectName
            },
            ['ObjectIdentifier'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = '#/defs/StructIdentifier',
                ['readOnly'] = true,
                ['description'] = '对象标志符',
                ['validator'] = properties_intf_types.ObjectIdentifier
            }
        }
    },
    ['mdb_method_configs'] = {
        ['bmc.kepler.Object.Properties'] = {
            ['GetOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'String',
                        ['description'] = '属性名',
                        ['param'] = 'Property'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['description'] = '按接口名和属性名查询属性的能力选项'
            },
            ['GetPropertiesByOptions'] = {
                ['req'] = {
                    {
                        ['baseType'] = 'String',
                        ['description'] = '接口名',
                        ['param'] = 'Interface'
                    }, {
                        ['baseType'] = 'Struct',
                        ['$ref'] = '#/defs/Options',
                        ['description'] = '属性能力选项，例如是否弃用、是否是易变属性等',
                        ['param'] = 'Options'
                    }
                },
                ['rsp'] = {
                    {
                        ['baseType'] = 'String[]',
                        ['description'] = '属性名列表',
                        ['param'] = 'Properties'
                    }
                },
                ['description'] = '按接口名和能力选项查询符合条件的所有属性'
            }
        }
    },
    ['mdb_classes'] = mdb.get_class_obj(
        '/bmc/kepler/Systems/:SystemId/UnitConfiguration/:Id'),
    ['new_mdb_objects'] = mdb.new_objects_builder({
        ['bmc.kepler.Systems.UnitConfigError'] = {
            ['property_defaults'] = {
                ['Port1LinkInfo'] = unit_config_error_intf_types.Port1LinkInfo
                    .default[1],
                ['Port1Status'] = 255,
                ['Port2LinkInfo'] = unit_config_error_intf_types.Port2LinkInfo
                    .default[1],
                ['Port2Status'] = 255,
                ['AbsenceAllowed'] = 0
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = unit_config_error_intf_types
        },
        ['bmc.kepler.Object.Properties'] = {
            ['property_defaults'] = {
                ['ClassName'] = properties_intf_types.ClassName.default[1],
                ['ObjectName'] = properties_intf_types.ObjectName.default[1],
                ['ObjectIdentifier'] = properties_intf_types.ObjectIdentifier
                    .default[1]
            },
            ['privileges'] = {['path'] = privilege.ConfigureSelf},
            ['interface_types'] = properties_intf_types
        }
    })
}

local BusinessTopoNode = {
    ['prop_configs'] = {
        ['Slot'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8',
            ['validator'] = business_topo_node_class_types.Slot
        },
        ['UID'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_topo_node_class_types.UID
        },
        ['Type'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'String',
            ['validator'] = business_topo_node_class_types.Type
        },
        ['RefSmcChip'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'U8[]',
            ['refInterface'] = 'bmc.kepler.Chip.BlockIO',
            ['validator'] = business_topo_node_class_types.RefSmcChip
        }
    },
    ['default_props'] = {
        ['Slot'] = business_topo_node_class_types.Slot.default[1],
        ['UID'] = business_topo_node_class_types.UID.default[1],
        ['Type'] = business_topo_node_class_types.Type.default[1],
        ['RefSmcChip'] = business_topo_node_class_types.RefSmcChip.default[1]
    }
}

local BDFConfig = {
    ['table_name'] = 't_bdf_config',
    ['prop_configs'] = {
        ['SocketId'] = {
            ['usage'] = {'CSR', 'PoweroffPer'},
            ['baseType'] = 'U8',
            ['primaryKey'] = true,
            ['notAllowNull'] = true,
            ['validator'] = bdf_config_class_types.SocketId
        },
        ['Type'] = {
            ['usage'] = {'CSR', 'PoweroffPer'},
            ['baseType'] = 'String',
            ['validator'] = bdf_config_class_types.Type
        },
        ['BDFConfigs'] = {
            ['usage'] = {'CSR', 'PoweroffPer'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/BDFConfiguration'
            },
            ['validator'] = bdf_config_class_types.BDFConfigs
        }
    },
    ['default_props'] = {
        ['SocketId'] = bdf_config_class_types.SocketId.default[1],
        ['Type'] = bdf_config_class_types.Type.default[1],
        ['BDFConfigs'] = bdf_config_class_types.BDFConfigs.default[1]
    }
}

local CpuBusInfo = {
    ['table_name'] = 't_cpu_bus_info',
    ['prop_configs'] = {
        ['SocketID'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['primaryKey'] = true,
            ['validator'] = cpu_bus_info_class_types.SocketID
        },
        ['SysId'] = {
            ['baseType'] = 'U8',
            ['default'] = 1,
            ['validator'] = cpu_bus_info_class_types.SysId
        },
        ['BusBaseAddr'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = cpu_bus_info_class_types.BusBaseAddr
        },
        ['BusSize'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = cpu_bus_info_class_types.BusSize
        }
    },
    ['default_props'] = {
        ['SocketID'] = 0,
        ['SysId'] = 1,
        ['BusBaseAddr'] = 0,
        ['BusSize'] = 0
    }
}

local PCIeLoadInfo = {
    ['table_name'] = 't_pcie_load_info',
    ['prop_configs'] = {
        ['Type'] = {
            ['baseType'] = 'String',
            ['default'] = 'NA',
            ['primaryKey'] = true,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.Type
        },
        ['SlotID'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['primaryKey'] = true,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.SlotID
        },
        ['ID'] = {
            ['baseType'] = 'U32',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.ID
        },
        ['AuxID'] = {
            ['baseType'] = 'U32',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.AuxID
        },
        ['Segment'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.Segment
        },
        ['SocketID'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.SocketID
        },
        ['DevBus'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.DevBus
        },
        ['DevDevice'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.DevDevice
        },
        ['DevFunction'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.DevFunction
        },
        ['MultihostPresence'] = {
            ['baseType'] = 'U32',
            ['default'] = 1,
            ['usage'] = {'ResetPer'},
            ['validator'] = pc_ie_load_info_class_types.MultihostPresence
        }
    },
    ['default_props'] = {
        ['Type'] = 'NA',
        ['SlotID'] = 0,
        ['ID'] = 0,
        ['AuxID'] = 0,
        ['Segment'] = 0,
        ['SocketID'] = 0,
        ['DevBus'] = 0,
        ['DevDevice'] = 0,
        ['DevFunction'] = 0,
        ['MultihostPresence'] = 1
    }
}

local PCIeLoadInfoBackup = {
    ['table_name'] = 't_pcie_load_info_backup',
    ['prop_configs'] = {
        ['Type'] = {
            ['baseType'] = 'String',
            ['default'] = 'NA',
            ['primaryKey'] = true,
            ['validator'] = pc_ie_load_info_backup_class_types.Type
        },
        ['SlotID'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['primaryKey'] = true,
            ['validator'] = pc_ie_load_info_backup_class_types.SlotID
        },
        ['ID'] = {
            ['baseType'] = 'U32',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.ID
        },
        ['AuxID'] = {
            ['baseType'] = 'U32',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.AuxID
        },
        ['Segment'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.Segment
        },
        ['SocketID'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.SocketID
        },
        ['DevBus'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.DevBus
        },
        ['DevDevice'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.DevDevice
        },
        ['DevFunction'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['validator'] = pc_ie_load_info_backup_class_types.DevFunction
        },
        ['MultihostPresence'] = {
            ['baseType'] = 'U32',
            ['default'] = 1,
            ['validator'] = pc_ie_load_info_backup_class_types.MultihostPresence
        },
        ['RecoverFlag'] = {
            ['baseType'] = 'U8',
            ['default'] = 0,
            ['description'] = '下次复位是否需要使用本地持久化数据 0不需要 1需要',
            ['validator'] = pc_ie_load_info_backup_class_types.RecoverFlag
        }
    },
    ['default_props'] = {
        ['Type'] = 'NA',
        ['SlotID'] = 0,
        ['ID'] = 0,
        ['AuxID'] = 0,
        ['Segment'] = 0,
        ['SocketID'] = 0,
        ['DevBus'] = 0,
        ['DevDevice'] = 0,
        ['DevFunction'] = 0,
        ['MultihostPresence'] = 1,
        ['RecoverFlag'] = 0
    }
}

local PCIeIPMIChannelConfig = {
    ['prop_configs'] = {
        ['Maps'] = {
            ['usage'] = {'CSR'},
            ['baseType'] = 'Array',
            ['items'] = {
                ['baseType'] = 'Struct',
                ['$ref'] = 'types.json#/defs/IPMIChannelConfig'
            },
            ['validator'] = pc_ie_ipmi_channel_config_class_types.Maps
        }
    },
    ['default_props'] = {
        ['Maps'] = pc_ie_ipmi_channel_config_class_types.Maps.default[1]
    }
}

local M = {}

function M.init(bus)
    class('PCIeDevices', PCIeDevices):set_bus(bus)
    class('PCIeDevice', PCIeDevice):set_bus(bus)
    class('PCIeCard', PCIeCard):set_bus(bus)
    class('OCPCard', OCPCard):set_bus(bus)
    class('PcieAddrInfo', PcieAddrInfo):set_bus(bus)
    class('BusinessConnector', BusinessConnector):set_bus(bus)
    class('SerDes', SerDes):set_bus(bus)
    class('UnitConfiguration', UnitConfiguration):set_bus(bus)
    class('BusinessTopoNode', BusinessTopoNode):set_bus(bus)
    class('BDFConfig', BDFConfig):set_bus(bus)
    class('CpuBusInfo', CpuBusInfo):set_bus(bus)
    class('PCIeLoadInfo', PCIeLoadInfo):set_bus(bus)
    class('PCIeLoadInfoBackup', PCIeLoadInfoBackup):set_bus(bus)
    class('PCIeIPMIChannelConfig', PCIeIPMIChannelConfig):set_bus(bus)
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetPcieErrorStatus(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetPcieErrorStatus =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetPcieErrorStatusReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetPcieErrorStatusRsp.new(cb(obj, ctx,
                                                                      req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetBandwidthReduction(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetBandwidthReduction =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetBandwidthReductionReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetBandwidthReductionRsp.new(cb(obj,
                                                                         ctx,
                                                                         req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetUCEByBIOS(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetUCEByBIOS =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetUCEByBIOSReq.new(...):validate(nil,
                                                                           nil,
                                                                           true)
            local rsp =
                pc_ie_devices_intf_types.SetUCEByBIOSRsp.new(cb(obj, ctx,
                                                                req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetDiagnosticFault(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetDiagnosticFault =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetDiagnosticFaultReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetDiagnosticFaultRsp.new(cb(obj, ctx,
                                                                      req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetPredictiveFault(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetPredictiveFault =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetPredictiveFaultReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetPredictiveFaultRsp.new(cb(obj, ctx,
                                                                      req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesGetDeviceName(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].GetDeviceName =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.GetDeviceNameReq.new(...):validate(nil,
                                                                            nil,
                                                                            true)
            local rsp =
                pc_ie_devices_intf_types.GetDeviceNameRsp.new(cb(obj, ctx,
                                                                 req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesGetPCIeCardNum(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].GetPCIeCardNum =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.GetPCIeCardNumReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.GetPCIeCardNumRsp.new(cb(obj, ctx,
                                                                  req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetFaultByBios(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetFaultByBios =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetFaultByBiosReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetFaultByBiosRsp.new(cb(obj, ctx,
                                                                  req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPCIeDevicesSetLinkSpeedReduced(cb)
    class('PCIeDevices')['bmc.kepler.Systems.PCIeDevices'].SetLinkSpeedReduced =
        function(obj, ctx, ...)
            local req =
                pc_ie_devices_intf_types.SetLinkSpeedReducedReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                pc_ie_devices_intf_types.SetLinkSpeedReducedRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPropertiesGetOptions(cb)
    class('PCIeDevices')['bmc.kepler.Object.Properties'].GetOptions = function(
        obj, ctx, ...)
        local req = properties_intf_types.GetOptionsReq.new(...):validate(nil,
                                                                          nil,
                                                                          true)
        local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                               req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicesPropertiesGetPropertiesByOptions(cb)
    class('PCIeDevices')['bmc.kepler.Object.Properties'].GetPropertiesByOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicePropertiesGetOptions(cb)
    class('PCIeDevice')['bmc.kepler.Object.Properties'].GetOptions = function(
        obj, ctx, ...)
        local req = properties_intf_types.GetOptionsReq.new(...):validate(nil,
                                                                          nil,
                                                                          true)
        local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                               req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeDevicePropertiesGetPropertiesByOptions(cb)
    class('PCIeDevice')['bmc.kepler.Object.Properties'].GetPropertiesByOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeCardPropertiesGetOptions(cb)
    class('PCIeCard')['bmc.kepler.Object.Properties'].GetOptions = function(obj,
                                                                            ctx, ...)
        local req = properties_intf_types.GetOptionsReq.new(...):validate(nil,
                                                                          nil,
                                                                          true)
        local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                               req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplPCIeCardPropertiesGetPropertiesByOptions(cb)
    class('PCIeCard')['bmc.kepler.Object.Properties'].GetPropertiesByOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplOCPCardPropertiesGetOptions(cb)
    class('OCPCard')['bmc.kepler.Object.Properties'].GetOptions = function(obj,
                                                                           ctx, ...)
        local req = properties_intf_types.GetOptionsReq.new(...):validate(nil,
                                                                          nil,
                                                                          true)
        local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                               req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplOCPCardPropertiesGetPropertiesByOptions(cb)
    class('OCPCard')['bmc.kepler.Object.Properties'].GetPropertiesByOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplPcieAddrInfoPropertiesGetOptions(cb)
    class('PcieAddrInfo')['bmc.kepler.Object.Properties'].GetOptions = function(
        obj, ctx, ...)
        local req = properties_intf_types.GetOptionsReq.new(...):validate(nil,
                                                                          nil,
                                                                          true)
        local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                               req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplPcieAddrInfoPropertiesGetPropertiesByOptions(cb)
    class('PcieAddrInfo')['bmc.kepler.Object.Properties'].GetPropertiesByOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                    nil, nil, true)
            local rsp =
                properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj, ctx,
                                                                       req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplBusinessConnectorPropertiesGetOptions(cb)
    class('BusinessConnector')['bmc.kepler.Object.Properties'].GetOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetOptionsReq.new(...):validate(nil, nil,
                                                                      true)
            local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                                   req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplBusinessConnectorPropertiesGetPropertiesByOptions(cb)
    class('BusinessConnector')['bmc.kepler.Object.Properties']
        .GetPropertiesByOptions = function(obj, ctx, ...)
        local req =
            properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                nil, nil, true)
        local rsp = properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj,
                                                                           ctx,
                                                                           req:unpack())):validate()
        return rsp:unpack(true)
    end
end

-- The callback needs to be registered during app initialization
function M.ImplUnitConfigurationPropertiesGetOptions(cb)
    class('UnitConfiguration')['bmc.kepler.Object.Properties'].GetOptions =
        function(obj, ctx, ...)
            local req =
                properties_intf_types.GetOptionsReq.new(...):validate(nil, nil,
                                                                      true)
            local rsp = properties_intf_types.GetOptionsRsp.new(cb(obj, ctx,
                                                                   req:unpack())):validate()
            return rsp:unpack(true)
        end
end

-- The callback needs to be registered during app initialization
function M.ImplUnitConfigurationPropertiesGetPropertiesByOptions(cb)
    class('UnitConfiguration')['bmc.kepler.Object.Properties']
        .GetPropertiesByOptions = function(obj, ctx, ...)
        local req =
            properties_intf_types.GetPropertiesByOptionsReq.new(...):validate(
                nil, nil, true)
        local rsp = properties_intf_types.GetPropertiesByOptionsRsp.new(cb(obj,
                                                                           ctx,
                                                                           req:unpack())):validate()
        return rsp:unpack(true)
    end
end

return M
