Lines Matching +full:redfish +full:- +full:messages
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
31 namespace redfish namespace
37 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfishGet()
41 asyncResp->res.jsonValue["v1"] = "/redfish/v1/"; in redfishGet()
48 asyncResp->res.addHeader(boost::beast::http::field::allow, ""); in redfish404()
52 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish404()
63 messages::resourceNotFound(asyncResp->res, "", name); in redfish404()
72 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish405()
78 asyncResp->res.result(boost::beast::http::status::method_not_allowed); in redfish405()
81 messages::resourceCannotBeDeleted(asyncResp->res); in redfish405()
85 messages::operationNotAllowed(asyncResp->res); in redfish405()
93 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in jsonSchemaIndexGet()
97 nlohmann::json& json = asyncResp->res.jsonValue; in jsonSchemaIndexGet()
98 json["@odata.id"] = "/redfish/v1/JsonSchemas"; in jsonSchemaIndexGet()
106 "/usr/share/www/redfish/v1/JsonSchemas", ec); in jsonSchemaIndexGet()
109 messages::internalError(asyncResp->res); in jsonSchemaIndexGet()
123 boost::urls::format("/redfish/v1/JsonSchemas/{}", split[0]); in jsonSchemaIndexGet()
135 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in jsonSchemaGet()
142 "/usr/share/www/redfish/v1/JsonSchemas", ec); in jsonSchemaGet()
145 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGet()
163 nlohmann::json& json = asyncResp->res.jsonValue; in jsonSchemaGet()
165 boost::urls::format("/redfish/v1/JsonSchemas/{}", schema); in jsonSchemaGet()
181 "http://redfish.dmtf.org/schemas/v1/{}", filename); in jsonSchemaGet()
183 "/redfish/v1/JsonSchemas/{}/{}", schema, filename); in jsonSchemaGet()
191 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGet()
201 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.") != in jsonSchemaGetFile()
204 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGetFile()
207 // Schema path should look like /redfish/v1/JsonSchemas/Foo/Foo.x.json in jsonSchemaGetFile()
211 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGetFile()
214 std::filesystem::path filepath("/usr/share/www/redfish/v1/JsonSchemas"); in jsonSchemaGetFile()
218 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGetFile()
222 crow::OpenCode ec = asyncResp->res.openFile(filepath); in jsonSchemaGetFile()
225 messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema); in jsonSchemaGetFile()
231 messages::internalError(asyncResp->res); in jsonSchemaGetFile()
238 BMCWEB_ROUTE(app, "/redfish/") in requestRoutesRedfish()
242 BMCWEB_ROUTE(app, "/redfish/v1/JsonSchemas/<str>/<str>") in requestRoutesRedfish()
243 .privileges(redfish::privileges::getJsonSchemaFile) in requestRoutesRedfish()
246 BMCWEB_ROUTE(app, "/redfish/v1/JsonSchemas/<str>/") in requestRoutesRedfish()
247 .privileges(redfish::privileges::getJsonSchemaFileCollection) in requestRoutesRedfish()
251 BMCWEB_ROUTE(app, "/redfish/v1/JsonSchemas/") in requestRoutesRedfish()
252 .privileges(redfish::privileges::getJsonSchemaFile) in requestRoutesRedfish()
257 BMCWEB_ROUTE(app, "/redfish/<path>") in requestRoutesRedfish()
259 .privileges(redfish::privileges::privilegeSetLogin)( in requestRoutesRedfish()
262 BMCWEB_ROUTE(app, "/redfish/<path>") in requestRoutesRedfish()
264 .privileges(redfish::privileges::privilegeSetLogin)( in requestRoutesRedfish()
268 } // namespace redfish