OpenFabrics / sunfish_library_reference

The core Sunfish implementation
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Associating resources with managing agents #9

Closed christian-pinto closed 5 months ago

christian-pinto commented 6 months ago

When an agent registers with the Sunfish framework it also notifies of any resources it wats Sunfish to be aware of. Sunfish starts a discovery process that populates the ResourcesAccessed array in the AggregationSource associated with the sepcific agent. See below snippet.

"Links" : {
    "ResourcesAccessed" : [
        {"@odata.id" : "/redfish/v1/...."}
    ]
}

However, whenever an action is executed through Sunfish (e.g., a client POSTs a new fabric connection) on an object managed by an agent it is cumbersome ti identify which agent (i.e., which AggregationSource) should be used for forwarding the request.

For this reason we propose an ad-hoc extension to the Redfish schema via the Oem field. This extension must be used on each RedFish object that is added to the sunfish tree via an agent. This set of properties is then used by Sunfish during runtime to discriminate across agents and perform housekeeping of the RedFish tree. It is a requirement that the Agent is registered as AggregationSource with a valid ID before any of its objects are imported into the Sunfish tree, and therefore before this extension is used on any resource.

_Extension type: SunfishExtensions.v1_0_0.ResourcesManagement OEM Extensions shortname: SunfishRM

Property Type Notes
ManagingAgent { Object Links a RedFish resource in the Sunfish tree to the managing agent
@odata.id String Link to the AggregationSource object representing the Agent
} Cell

The below snippet shows an example of how to use this extension:

{
    "Oem": {
        "Sunfish_RM":{
            "@odata.type": "#SunfishExtensions.v1_0_0.ResourceExtensions",
            "ManagingAgent": {
                "@odata.id": "/redfish/v1/AggregationService/AggregationSource/AgentID"
            }
        }
    }
}