As a user-oriented interface, the component configuration import and export function carries the interface data models of components through schemas. It uses a standard JSON Schema and custom extensions to implement the configuration import and export description and validation mechanism. All components must pass schema validation during configuration import and export to ensure the correctness of configuration data on both the service and user sides.
The configuration schema is stored in the profile_schema component repository. For details, see profile_schema.
Overall Process
The oms component implements the configuration import and export function:
- During the import, it serializes the configuration of the component according to the component name in the configuration file, and calls the
Importinterface underbmc.kepler.MicroComponent.ConfigManageto trigger the component import. - During the export, it obtains the names of all components from the MACA service. The specific interface is the
GetServiceNamesmethod ofbmc.kepler.Mdb. Then, it calls theExportinterface of each component respectively, collects the export data from each component, and returns the aggregated data to the user.
Resource collaboration interface information is as follows:
# 1. oms import and export interface
busctl --user introspect bmc.kepler.oms /bmc/kepler/Managers/1/Configurations
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
bmc.kepler.Managers.Configurations interface - - -
.Export method a{ss}s u -
.Import method a{ss}s u -
# 2. Component import and export interface
busctl --user introspect bmc.kepler.license /bmc/kepler/license/MicroComponent
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
bmc.kepler.MicroComponent.ConfigManage interface - - -
.Export method a{ss} s -
.Import method a{ss}s - -Configuration Fields
Standard Schema Keywords
type: JSON Schema data typeproperties: key-value pairs of JSON Schema object properties
Properties with Fixed Names
Description: component descriptionConfigData: component configuration data
Custom Data Collection Names
Accounts(example): data collection instance for importing and exporting custom component configurations
Extended Keywords
AttributeType: type of the property corresponding to the configuration data instanceValues:
ExportOnly: export onlyImportAndExport: import and export
HideValue: whether to hidevaluewhen the component exports data (defaults tofalse)Description:
- If this keyword is set to
true, the property value is hidden and displayed as"******". - If this keyword is not set in the component schema,
valueis not hidden in the exported file by default.
- If this keyword is set to
Import: default import behavior for exported data (defaults totrue)Description:
- This keyword can be set only when
AttributeTypeis set toImportAndExport. The valuetrueindicates that the property needs to be imported, and the valuefalseindicates that the property does not need to be imported. - This function is similar to the comment function in XML. Setting it to
falsecomments out the imported property so that it does not take effect after import. - The
Importfield must be verified in theImportmethod on the component side. Otherwise, the field does not take effect.
- This keyword can be set only when
Component Schema Configuration Example
{
"type": "object",
"properties": {
"Description": {
"const": "Configurations of Identity and Access Management"
},
"ConfigData": {
"type": "object",
"properties": {
"Accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "number",
"AttributeType": "ExportOnly"
},
"UserName": {
"type": "string",
"HideValue": true,
"AttributeType": "ImportAndExport"
},
"Privilege": {
"type": "string",
"Import": false,
"AttributeType": "ImportAndExport"
},
"UserRoleId": {
"type": "string",
"AttributeType": "ImportAndExport"
},
"PermitRuleIds": {
"type": "number",
"AttributeType": "ImportAndExport"
},
"LoginInterface": {
"type": "array",
"items": {
"type": "string",
"enum": ["SSH", "SNMP", "Local", "Redfish", "SFTP", "Web", "IPMI"]
},
"AttributeType": "ExportOnly"
},
"IsUserEnable": {
"type": "boolean",
"AttributeType": "ExportOnly"
},
"IsUserLocked": {
"type": "boolean",
"AttributeType": "ExportOnly"
}
},
"required": ["Id", "UserName", "Privilege"]
}
},
"LDAPController": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Id": {
"type": "number",
"AttributeType": "ExportOnly"
},
"BindDN": {
"type": "string",
"AttributeType": "ImportAndExport"
},
"CertVerifyEnabled": {
"type": "boolean",
"AttributeType": "ImportAndExport"
},
"CertVerifyLevel": {
"type": "number",
"AttributeType": "ImportAndExport"
},
"Enabled": {
"type": "boolean",
"AttributeType": "ImportAndExport"
},
"Folder": {
"type": "string",
"AttributeType": "ImportAndExport"
},
"HostAddr": {
"type": "string",
"AttributeType": "ImportAndExport"
},
"Port": {
"type": "number",
"AttributeType": "ImportAndExport"
},
"UserDomain": {
"type": "string",
"AttributeType": "ImportAndExport"
}
}
}
}
}
}
}
}Exported Configuration File Fields
GeneralInfo: general informationProductName: product nameProductSN: product serial numberVersion: software versionTimeStamp: timestamp information
Components: full configuration information of componentsDescription: component descriptionConfigData: component configuration dataValue: value of the property corresponding to the configuration data instanceAttributeType: type of the property corresponding to the configuration data instance
Values: -
ExportOnly: export only -ImportAndExport: import and exportImport: whether the property needs to be imported
Description: - This keyword can be set only when
AttributeTypeis set toImportAndExport. The valuetrueindicates that the property needs to be imported, and the valuefalseindicates that the property does not need to be imported. - AddImportfield verification to the import method. When importing configurations, you can choose whether to import a property by modifying itsImportkeyword.
{
"GeneralInfo": {
"ProductName": "S920X20",
"ProductSN": "1234567890",
"TimeStamp": "2025-02-11 10:04:49"
},
"Components": {
"iam": {
"Description": "Configurations of Identity and Access Management",
"ConfigData": {
"Accounts": [
{
"Id": {
"Value": 2,
"AttributeType": "ExportOnly",
"Import": false
},
"UserName": {
"Value": "******",
"AttributeType": "ImportAndExport",
"Import": false
},
"Privilege": {
"Value": "Administrator",
"AttributeType": "ImportAndExport",
"Import": false
},
"UserRoleId": {
"Value": "Administrator",
"AttributeType": "ImportAndExport",
"Import": true
},
"PermitRuleIds": {
"Value": 1,
"AttributeType": "ImportAndExport",
"Import": true
},
"LoginInterface": {
"Value": ["SSH", "SNMP", "Local", "Redfish", "SFTP", "Web", "IPMI"],
"AttributeType": "ExportOnly",
"Import": false
},
"IsUserEnable": {
"Value": true,
"AttributeType": "ExportOnly",
"Import": false
},
"IsUserLocked": {
"Value": false,
"AttributeType": "ExportOnly",
"Import": false
}
}
],
"LDAPController": [
]
}
},
"bios": {
"Description": "Configurations of Bios",
"ConfigData": {
"BiosConfig": {
"BootTypeOrder0": {
"Value": "DVDROMDrive",
"AttributeType": "ImportAndExport",
"Import": true
},
"BootTypeOrder1": {
"Value": "PXE",
"AttributeType": "ImportAndExport",
"Import": true
},
"BootTypeOrder2": {
"Value": "HardDiskDrive",
"AttributeType": "ImportAndExport",
"Import": true
},
"BootTypeOrder3": {
"Value": "Others",
"AttributeType": "ImportAndExport",
"Import": true
},
"DDRDebugLevel": {
"Value": "Minimum",
"AttributeType": "ImportAndExport",
"Import": true
},
"DDRFreqLimit": {
"Value": "Auto",
"AttributeType": "ImportAndExport",
"Import": true
},
"DdrRefreshSupport": {
"Value": true,
"AttributeType": "ImportAndExport",
"Import": true
}
}
}
},
"storage": {
"Description": "Configurations of Storage",
"ConfigData": {
"RAIDConfig": [
{
"Id": {
"Value": 802,
"AttributeType": "ExportOnly",
"Import": false
},
"Type": {
"Value": "SAS3508",
"AttributeType": "ExportOnly",
"Import": false
},
"Mode": {
"Value": 1,
"AttributeType": "ImportAndExport",
"Import": true
},
"CopybackEnabled": {
"Value": 1,
"AttributeType": "ImportAndExport",
"Import": true
},
"SMARTerCopybackEnabled": {
"Value": 0,
"AttributeType": "ImportAndExport",
"Import": true
},
"JBODEnabled": {
"Value": 0,
"AttributeType": "ImportAndExport",
"Import": true
},
"NoBatteryWriteCache": {
"Value": 255,
"AttributeType": "ImportAndExport",
"Import": true
},
"ReadCachePercent": {
"Value": 2,
"Import": 255,
"AttributeType": "ImportAndExport"
}
}
]
}
}
}
}