Please enable JavaScript.
Coggle requires JavaScript to display documents.
HostInterface, HostInterfaceSupport = require("extensions.host…
HostInterface
local map = require("notify_fn_map")
for _i, callback in pairs(map[path]) do
/sync_agent-6.104.0.0.0-src/data/app/RTP_1_5/subagents/notify_fn.lua
-- Getting notify_map entries from all the extensions folder name
local extension_modules = utils.get_modules("extensions", "notify_fn_map")
local extension_extend_modules = utils.get_modules("extensions", "notify_fn_extend_map")
-- Getting notify_map entries from all the OEMs folder name
local oem_modules = utils.get_modules("oem", "notify_fn_map")
local oem_extend_modules = utils.get_modules("oem", "notify_fn_extend_map")
/sync_agent-6.104.0.0.0-src/data/app/RTP_1_5/
notify_fn_map.lua
local sync = require("extensions.host-interface.hi-sync-helpers")
local inventory_handler = require("extensions.host-interface.hi-inventory-helper")
map["/tmp/redfish-start"] = {os.execute(
"ifconfig usb0 "
.. CONFIG.DEFAULT_HI_USBADDRESS ..
" netmask
" .. CONFIG.DEFAULT_HI_USBMASK ..
" up"
)
,"/usr/local/sync-agent/subagents
/init-agent.lua
"}
map["/tmp/hi_bios_files"] = {sync.handle_bios_reg}
map["/tmp/hi_bios_static_files"] = {sync.handle_bios_static}
map["/conf/redfish/bios/static"] = {sync.CalculateCRC}
map["/tmp/hi_inventory_files"] = {
inventory_handler.handle_Inventory_Data
}
map["/conf/redfish/bios"] = {sync.handle_bios_registry}
/gami_hostinterface_module-6.82.0.0.0-src/data/RTP_1_5/extensions/host-interface/
notify_fn_map.lua
**local host_interface = require("init-hostinterface")
init_script = host_interface,
/gami_hostinterface_module-6.82.0.0.0-src/data/RTP_1_5/extensions/host-interface/init-agent.lua
create a file "touch /var/lan_over_usb_ifc_started"
get usb ethernet value then put into redis=> ipaddr, HWaddr, Mask
create a file "touch /var/lan_over_usb_ifc_ready"
/init_agent_scripts/init-hostinterface.lua
>>_HIInventoryHelper.handle_Inventory_Data = function(file_name)
HIInventoryDataHandler.init(request_data)
/gami_hostinterface_module-6.82.0.0.0-src/data/RTP_1_5/extensions/host-interface/hi-inventory-helper.lua
>>_HIInventoryDataHandler.init = function(request_data)
HIInventoryDataHandler.systems_data(prefix..":Systems",pl,entry,redis)
<<Trace back>>
request_data
success, request_data = pcall(cjson.decode,contents)
local contents = fd:read("*all")
local fd = io.open(file_path, "r")
1 more item...
>>_HIInventoryDataHandler.systems_data = function(prefix,pl,request_data)
for _i, property in pairs(basic_props) do
if request_data[property] then
pl:set(prefix .. ":" .. property, tostring(request_data[property]))
end
end
local basic_props={
"Name",
"Description",
"SystemType",
"AssetTag",
"Manufacturer",
"Model",
"SKU",
"SerialNumber",
"PartNumber",
"UUID",
"HostName",
"IndicatorLED",
"PowerState",
"BiosVersion"}
if request_data.Processors ~= nil and flag_CPU then
HIInventoryDataHandler.systems_processor_data(_prefix,pl,entry)
HIInventoryDataHandler.systems_processor_data = function(prefix,pl,request_data)
if type(request_data.Socket) ~= "nil" then
pl:set(prefix .. ":Socket", tostring(request_data.Socket)
1 more item...
Read "/tmp/hi_bios_static_files/" BiosAttributeRegistryxxxxx.json
create a new file in /conf/redfish/bios/BiosAttributeRegistryxxxxx.json_stripped
handle_bios_reg
local sync = require("ipmi-sync-helpers_update")
map["/mnt/fwupdate/state"] = {sync.FwUpdate.getStatus}
map["/mnt/fwupdate/progress"] = {sync.FwUpdate.getStatus}
/gami_bmc_update_module-6.45.0.0.0-src/data/RTP_1_5/extensions/update_service/
notify_fn_map.lua
local sync = require("ipmi-sync-helpers")
map["/var/run/"] = {sync.ami.chk_file_exits}
map["/conf/ncml.conf"] = {sync.ami.get_service_config}
map[IPMIConfPath] = {sync.ami.get_service_config}
map["/var/run/hdserver.pid"] = {sync.transport.get_lan_configuration, sync.ami.get_service_config, sync.ami.restart_upnp}
map["/tmp/bios_files"] = {sync.ami.handle_bios_reg}
map["/conf/ssdp.conf"] = {sync.ami.get_service_config}
/gami_manager_module-6.353.0.0.0-src/data/RTP_1_5/extensions/ipmi/
notify_fn_map.lua
Getting notify_map entries from all the OEMs
/gami_dynamic_extension-6.16.0.0.0-src/data/RTP_1_5/oem/dre/
notify_fn_map.lua
local ca = require("sync-helpers.ca")
map["/conf/ca.pem"] = {ca.restart_webserver}
/gami_common_module-6.22.0.0.0-src/data/RTP_1_5/extensions/common/
notify_fn_map.lua
local sync = require("ipmi-sync-helpers_ami")
map["/conf/invphypresence.txt"] = {sync.amiBios.get_physical_presence}
/gami_amioem_module-6.24.0.0.0-src/data/RTP_1_5/extensions/ami/
notify_fn_map.lua
HostInterfaceSupport = require("extensions.host-interface.host-interface-support-module")
local HostInterfaceCollectionHandler = require("extensions.host-interface.hostinterface-collection")
local SystemHandler = require("extensions.host-interface.hi-handlers.system")
/host_interface_redfish_extension-6.134.0.0.0-src/data/app/RTP_1_5/extensions/redfish-resource/hostinterface/
redfish-resource-handler.lua
Create
https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/EthernetInterfaces
URL
/host-interface/host-ethernet-interface-collection.lua
do the same thing get systems inventory info
function SystemHandler:hi_get_instance(response)
/host-interface/hi-handlers/system.lua
function SystemHandler:get_instance(response)
/redfish_core-6.959.0.0.0-src/data/app/RTP_1_5/redfish/system.lua
/host-interface/
host-interface-support-module.lua
function HostInterfaceSupport:included(HandlerClass)
function HostInterfaceSupport:check_host_interface_connection(db)
Check redis is not empty
check_host_interface_connection
check
redis usb0 IPv4Addresses
("Redfish:Managers:Self:EthernetInterfaces:usb0:IPv4Addresses") and
X-HOST ip
(header X-Host or Host) is matching
if host_x_header == db_address
set is_host_interface_connection true
check_host_interface_enable
get value "Redfish:Managers:Self:HostInterfaces:Self:InterfaceEnabled" in redis is enable or not
check Authentication Modes from ffi
local auth_modes = yield(redis:smembers("Redfish:Managers:Self:HostInterfaces:Self:AuthenticationModes"))
if corefeatures.
IsFeatureEnabled
(ffi.cast("char *","CONFIG_SPX_FEATURE_HOST_INTERFACE_NO_AUTH")) > 0 then
/gami_hostinterface_module-6.82.0.0.0-src/data/RTP_1_5/extensions/host-interface/init_agent_scripts/init-hostinterface.lua
/gami_amioem_module-6.24.0.0.0-src/data/RTP_1_5/extensions/ami/cdefs/libipmi_ffi.lua
function HostInterfaceSupport:check_host_interface_enable(req_method, redis)
Inventory init
LAN over USB