summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Redfish.md8
-rw-r--r--redfish-core/include/redfish.hpp1
-rw-r--r--redfish-core/include/schemas.hpp1
-rw-r--r--redfish-core/lib/aggregation_service.hpp32
-rwxr-xr-xscripts/update_schemas.py1
-rw-r--r--static/redfish/v1/$metadata/index.xml3
-rw-r--r--static/redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json99
-rw-r--r--static/redfish/v1/schema/AggregationSourceCollection_v1.xml69
8 files changed, 214 insertions, 0 deletions
diff --git a/Redfish.md b/Redfish.md
index deae38e9b4..689b586304 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -72,9 +72,17 @@ Fields common to all schemas
#### AggregationService
+- AggregationSources
- Description
- ServiceEnabled
+### /redfish/v1/AggregationService/AggregationSources
+
+#### AggregationSourceCollection
+
+- Members
+- Members@odata.count
+
### /redfish/v1/AccountService/Accounts/
#### ManagerAccountCollection
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index 9d7bbaa5b9..954dfc7db9 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -74,6 +74,7 @@ class RedfishService
requestAccountServiceRoutes(app);
#ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION
requestAggregationServiceRoutes(app);
+ requestAggregationSourcesRoutes(app);
#endif
requestRoutesRoles(app);
requestRoutesRoleCollection(app);
diff --git a/redfish-core/include/schemas.hpp b/redfish-core/include/schemas.hpp
index c81e304526..c2cbb8bd94 100644
--- a/redfish-core/include/schemas.hpp
+++ b/redfish-core/include/schemas.hpp
@@ -18,6 +18,7 @@ namespace redfish
"AccountService",
"ActionInfo",
"AggregationService",
+ "AggregationSourceCollection",
"Assembly",
"AttributeRegistry",
"Bios",
diff --git a/redfish-core/lib/aggregation_service.hpp b/redfish-core/lib/aggregation_service.hpp
index e03047aac4..f0eb651dc2 100644
--- a/redfish-core/lib/aggregation_service.hpp
+++ b/redfish-core/lib/aggregation_service.hpp
@@ -46,6 +46,8 @@ inline void handleAggregationServiceGet(
json["Name"] = "Aggregation Service";
json["Description"] = "Aggregation Service";
json["ServiceEnabled"] = true;
+ json["AggregationSources"]["@odata.id"] =
+ "/redfish/v1/AggregationService/AggregationSources";
}
inline void requestAggregationServiceRoutes(App& app)
@@ -60,4 +62,34 @@ inline void requestAggregationServiceRoutes(App& app)
std::bind_front(handleAggregationServiceGet, std::ref(app)));
}
+inline void handleAggregationSourcesGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+{
+ if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+ {
+ return;
+ }
+ asyncResp->res.addHeader(
+ boost::beast::http::field::link,
+ "</redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json>; rel=describedby");
+ nlohmann::json& json = asyncResp->res.jsonValue;
+ json["@odata.id"] = "/redfish/v1/AggregationService/AggregationSources";
+ json["@odata.type"] =
+ "#AggregationSourceCollection.AggregationSourceCollection";
+ json["Name"] = "Aggregation Source Collection";
+ json["Members"] = nlohmann::json::array();
+ json["Members@odata.count"] = 0;
+
+ // TODO: Query D-Bus for satellite configs and add them to the Members array
+}
+
+inline void requestAggregationSourcesRoutes(App& app)
+{
+ BMCWEB_ROUTE(app, "/redfish/v1/AggregationService/AggregationSources/")
+ .privileges(redfish::privileges::getAggregationService)
+ .methods(boost::beast::http::verb::get)(
+ std::bind_front(handleAggregationSourcesGet, std::ref(app)));
+}
+
} // namespace redfish
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index 7fea60be7e..a27c156298 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -28,6 +28,7 @@ include_list = [
"AccountService",
"ActionInfo",
"AggregationService",
+ "AggregationSourceCollection",
"Assembly",
"AttributeRegistry",
"Bios",
diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml
index 0ef12fa517..92bcc0935d 100644
--- a/static/redfish/v1/$metadata/index.xml
+++ b/static/redfish/v1/$metadata/index.xml
@@ -118,6 +118,9 @@
<edmx:Include Namespace="AggregationService.v1_0_0"/>
<edmx:Include Namespace="AggregationService.v1_0_1"/>
</edmx:Reference>
+ <edmx:Reference Uri="/redfish/v1/schema/AggregationSourceCollection_v1.xml">
+ <edmx:Include Namespace="AggregationSourceCollection"/>
+ </edmx:Reference>
<edmx:Reference Uri="/redfish/v1/schema/Assembly_v1.xml">
<edmx:Include Namespace="Assembly"/>
<edmx:Include Namespace="Assembly.v1_0_0"/>
diff --git a/static/redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json b/static/redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json
new file mode 100644
index 0000000000..64ce2d45da
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/AggregationSourceCollection/AggregationSourceCollection.json
@@ -0,0 +1,99 @@
+{
+ "$id": "http://redfish.dmtf.org/schemas/v1/AggregationSourceCollection.json",
+ "$ref": "#/definitions/AggregationSourceCollection",
+ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
+ "copyright": "Copyright 2014-2022 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
+ "definitions": {
+ "AggregationSourceCollection": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/idRef"
+ },
+ {
+ "additionalProperties": false,
+ "description": "The collection of AggregationSource resource instances.",
+ "longDescription": "This resource shall represent a resource collection of AggregationSource instances for a Redfish implementation.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "integer",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "@odata.context": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
+ },
+ "@odata.etag": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
+ },
+ "@odata.id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
+ },
+ "@odata.type": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
+ },
+ "Description": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "readonly": true
+ },
+ "Members": {
+ "description": "The members of this collection.",
+ "items": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/AggregationSource.json#/definitions/AggregationSource"
+ },
+ "longDescription": "This property shall contain an array of links to the members of this collection.",
+ "readonly": true,
+ "type": "array"
+ },
+ "Members@odata.count": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
+ },
+ "Members@odata.nextLink": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/nextLink"
+ },
+ "Name": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
+ "readonly": true
+ },
+ "Oem": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+ "description": "The OEM extension property.",
+ "longDescription": "This property shall contain the OEM extensions. All values for properties contained in this object shall conform to the Redfish Specification-described requirements."
+ }
+ },
+ "required": [
+ "Members",
+ "Members@odata.count",
+ "@odata.id",
+ "@odata.type",
+ "Name"
+ ],
+ "type": "object"
+ }
+ ],
+ "deletable": false,
+ "insertable": true,
+ "updatable": false,
+ "uris": [
+ "/redfish/v1/AggregationService/AggregationSources"
+ ]
+ }
+ },
+ "owningEntity": "DMTF",
+ "title": "#AggregationSourceCollection.AggregationSourceCollection"
+} \ No newline at end of file
diff --git a/static/redfish/v1/schema/AggregationSourceCollection_v1.xml b/static/redfish/v1/schema/AggregationSourceCollection_v1.xml
new file mode 100644
index 0000000000..22dde6c446
--- /dev/null
+++ b/static/redfish/v1/schema/AggregationSourceCollection_v1.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!---->
+<!--################################################################################ -->
+<!--# Redfish Schema: AggregationSourceCollection -->
+<!--# -->
+<!--# For a detailed change log, see the README file contained in the DSP8010 bundle, -->
+<!--# available at http://www.dmtf.org/standards/redfish -->
+<!--# Copyright 2014-2022 DMTF. -->
+<!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
+<!--################################################################################ -->
+<!---->
+<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
+
+ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
+ <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
+ </edmx:Reference>
+ <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Capabilities.V1.xml">
+ <edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities"/>
+ </edmx:Reference>
+ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
+ <edmx:Include Namespace="Resource.v1_0_0"/>
+ </edmx:Reference>
+ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
+ <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
+ </edmx:Reference>
+ <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/AggregationSource_v1.xml">
+ <edmx:Include Namespace="AggregationSource"/>
+ </edmx:Reference>
+
+ <edmx:DataServices>
+
+ <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="AggregationSourceCollection">
+ <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
+
+ <EntityType Name="AggregationSourceCollection" BaseType="Resource.v1_0_0.ResourceCollection">
+ <Annotation Term="OData.Description" String="The collection of AggregationSource resource instances."/>
+ <Annotation Term="OData.LongDescription" String="This resource shall represent a resource collection of AggregationSource instances for a Redfish implementation."/>
+ <Annotation Term="Capabilities.InsertRestrictions">
+ <Record>
+ <PropertyValue Property="Insertable" Bool="true"/>
+ </Record>
+ </Annotation>
+ <Annotation Term="Capabilities.UpdateRestrictions">
+ <Record>
+ <PropertyValue Property="Updatable" Bool="false"/>
+ </Record>
+ </Annotation>
+ <Annotation Term="Capabilities.DeleteRestrictions">
+ <Record>
+ <PropertyValue Property="Deletable" Bool="false"/>
+ </Record>
+ </Annotation>
+ <Annotation Term="Redfish.Uris">
+ <Collection>
+ <String>/redfish/v1/AggregationService/AggregationSources</String>
+ </Collection>
+ </Annotation>
+ <NavigationProperty Name="Members" Type="Collection(AggregationSource.AggregationSource)">
+ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
+ <Annotation Term="OData.Description" String="The members of this collection."/>
+ <Annotation Term="OData.LongDescription" String="This property shall contain an array of links to the members of this collection."/>
+ <Annotation Term="OData.AutoExpandReferences"/>
+ <Annotation Term="Redfish.Required"/>
+ </NavigationProperty>
+ </EntityType>
+ </Schema>
+
+ </edmx:DataServices>
+</edmx:Edmx>