Coder Social home page Coder Social logo

nicklela / edk2-redfish-client-deprecated Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 217.78 MB

Edk2 RedfishClientPkg workplace

License: Other

Python 2.61% C 93.95% Assembly 0.85% Makefile 0.02% C++ 0.28% NASL 0.36% Shell 0.03% Batchfile 0.02% HTML 0.01% Roff 0.01% GAP 0.14% R 0.01% ANTLR 0.01% Rich Text Format 0.46% Perl 0.01% ASL 0.02% GDB 0.01% CMake 1.06% NSIS 0.01% Pawn 0.18%

edk2-redfish-client-deprecated's Introduction

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Core CI Build Status

Host Type & Toolchain Build Status Test Status Code Coverage
Windows_VS2019 WindowsCiBuild WindowsCiTest WindowsCiCoverage
Ubuntu_GCC5 UbuntuCiBuild UbuntuCiTest UbuntuCiCoverage

More CI Build information

Platform CI Build Status

Microsoft Windows VS2019

Toolchain CONFIG DEBUG RELEASE NOOPT
EmulatorPkg_Win_VS2019
IA32
em32d em32r em32n

X64
em64d em64r em64n

IA32 FULL
em32fd em32fr em32fn

X64 FULL
em64fd em64fr em64fn
OvmfPkg_Win_VS2019
IA32
op32d op32r op32n

X64
op64d op64r op64n

IA32 X64
op3264d op3264r op3264n

IA32 X64 FULL
op3264fd op3264fr TCBZ_2661

Ubuntu 18.04 GCC5

Toolchain CONFIG DEBUG RELEASE NOOPT
ArmVirtPkg_Ubuntu_GCC5
AARCH64
avAArch64du avAArch64ru avAArch64nu

ARM
avArmdu avArmru avArmnu
EmulatorPkg_Ubuntu_GCC5
IA32
em32du em32ru em32nu

X64
em64du em64ru em64nu

IA32 FULL
em32fdu em32fru em32fnu

X64 FULL
em64fdu em64fru em64fnu
OvmfPkg_Ubuntu_GCC5
IA32
op32du op32ru op32nu

X64
op64du op64ru op64nu

IA32 X64
op3264du op3264ru op3264nu

IA32 X64 FULL
op3264fdu op3264fru op3264fru

TCBZ_2668 - EmulatorPkg Ubuntu GCC5 Segfaults during execution.

TCBZ_2639 - EmulatorPkg Ubuntu GCC5 Segfaults during execution.

More ArmVirtPkg CI Build Information

More EmulatorPkg CI Build Information

More OvmfPkg CI Build Information

License Details

The majority of the content in the EDK II open source project uses a BSD-2-Clause Plus Patent License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II open source project uses content from upstream projects as git submodules that are covered by additional licenses.

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources

Code Contributions

To make a contribution to a TianoCore project, follow these steps.

  1. Create a change description in the format specified below to
    use in the source control commit log.
  2. Your commit message must include your Signed-off-by signature
  3. Submit your code to the TianoCore project using the process
    that the project documents on its web page. If the process is not documented, then submit the code on development email list for the project.
  4. It is preferred that contributions are submitted using the same
    copyright license as the base project. When that is not possible, then contributions using the following licenses can be accepted:

For documentation:

Contributions of code put into the public domain can also be accepted.

Contributions using other licenses might be accepted, but further review will be required.

Developer Certificate of Origin

Your change description should use the standard format for a commit message, and must include your Signed-off-by signature.

In order to keep track of who did what, all patches contributed must include a statement that to the best of the contributor's knowledge they have the right to contribute it under the specified license.

The test for this is as specified in the Developer's Certificate of Origin (DCO) 1.1. The contributor certifies compliance by adding a line saying

Signed-off-by: Developer Name [email protected]

where Developer Name is the contributor's real name, and the email address is one the developer is reachable through at the time of contributing.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Sample Change Description / Commit Message

From: Contributor Name <[email protected]>
Subject: [Repository/Branch PATCH] Pkg-Module: Brief-single-line-summary

Full-commit-message

Signed-off-by: Contributor Name <[email protected]>

Notes for sample patch email

  • The first line of commit message is taken from the email's subject line following [Repository/Branch PATCH]. The remaining portion of the commit message is the email's content.
  • git format-patch is one way to create this format

Definitions for sample patch email

  • Repository is the identifier of the repository the patch applies.

    This identifier should only be provided for repositories other than edk2. For example edk2-BuildSpecification or staging.

  • Branch is the identifier of the branch the patch applies. This

    identifier should only be provided for branches other than

    edk2/master.

    For example edk2/UDK2015,

    edk2-BuildSpecification/release/1.27, or

    staging/edk2-test.

  • Module is a short identifier for the affected code or documentation. For example MdePkg, MdeModulePkg/UsbBusDxe, Introduction, or

    EDK II INF File Format.

  • Brief-single-line-summary is a short summary of the change.

  • The entire first line should be less than ~70 characters.

  • Full-commit-message a verbose multiple line comment describing

    the change. Each line should be less than ~70 characters.

  • Signed-off-by is the contributor's signature identifying them

    by their real/legal name and their email address.

Submodules

Submodule in EDK II is allowed but submodule chain should be avoided as possible as we can. Currently EDK II contains the following submodules

  • CryptoPkg/Library/OpensslLib/openssl
  • ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3
  • MdeModulePkg/Universal/RegularExpressionDxe/oniguruma
  • MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
  • BaseTools/Source/C/BrotliCompress/brotli

ArmSoftFloatLib is actually required by OpensslLib. It's inevitable in openssl-1.1.1 (since stable201905) for floating point parameter conversion, but should be dropped once there's no such need in future release of openssl.

To get a full, buildable EDK II repository, use following steps of git command

git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init
cd ..

If there's update for submodules, use following git commands to get the latest submodules code.

cd edk2
git pull
git submodule update

Note: When cloning submodule repos, '--recursive' option is not recommended. EDK II itself will not use any code/feature from submodules in above submodules. So using '--recursive' adds a dependency on being able to reach servers we do not actually want any code from, as well as needlessly downloading code we will not use.

edk2-redfish-client-deprecated's People

Contributors

lgao4 avatar lersek avatar niruiyu avatar lzeng14 avatar ydong10 avatar jljusten avatar hwu25 avatar jljusten2 avatar mdkinney avatar jyao1 avatar dandanbi avatar oliviermartin avatar vanjeff avatar jiaxinwu avatar jcarsey avatar shenglei10 avatar sun-rui avatar bobcf avatar sfu5 avatar pierregondois avatar jwang36 avatar ftian1 avatar zhangchaointel avatar samimujawar avatar lcp avatar zhichaogao avatar hhtian avatar zhijufan avatar chenc2 avatar yunhuafx avatar

Watchers

Nickle Wang avatar Abner Chang avatar Simon Wang avatar

edk2-redfish-client-deprecated's Issues

[Design] how to find BMC exposed NIC in BIOS?

In our current implementation, we use MAC address to identify Redfish network interface. However, from OpenBMC implementation, the MAC on host side is different from the MAC on BMC side. BMC engineer suggest us to use VID and DID in order to identify the network interface on BMC.

SMBIOS type 42 provides this information as below
image

If this is the case, we need to update RedfishConfigHandler driver.

[Design] How to configure station IP address from SMBIOS type 42 record

We need to have a way to configure station IP address.

  • If it is DHCP, we are done.
  • If it is static ip, we can configure station IP address based on Redfish service IP because they need to talk with each other.

While Redfish service IP can be determinated by existing IPMI network command (need to check), we can define a rule like host IP address is Redfish service IP minus one. Other filed like format, type and netmask must to be the same as Redfish service IP type, format and netmask, so that they can talk with each other.

Auto-generate configure language

Currently, developer has to manually write configure language in UNI file so that HII option can be mapped to Redfish. This task will utilize UEFI defined "EFI_IFR_FLAG_REST_STYLE" and "EFI_HII_REST_STYLE_FORMSET_GUID" flag and generate configure language automatically. And customer has no need to write configure language on their own (Ref: https://uefi.org/specs/UEFI/2.10/33_Human_Interface_Infrastructure.html?highlight=rest_style)
UEFI_REST_STYLE

This can be done in RedfishPlatformConfigDxe driver. When above HII opcode is detected, the driver will generate the configure language automatically.

[Code] Support Conditional/Atomic HTTP operations to secure BIOS

http://redfish.dmtf.org/schemas/DSP0266_1.6.1.html

6.1.5. ETags
In order to reduce the cases of unnecessary RESTful accesses to resources, the Redfish Service should support associating a separate ETag with each resource.

Implementations should support returning ETag properties for each resource.
Implementations should support returning ETag headers for each response that represents a single resource.
Implementations shall support returning ETag headers for GET requests of ManagerAccount resources.
The ETag is generated and provided as part of the resource payload because the service is in the best position to know if the new version of the object is different enough to be considered substantial. There are two types of ETags: weak and strong. If an ETag is supported for a given resource, it shall use the strong ETag format as specified in RFC7232.

This specification does not mandate a particular algorithm for creating the ETag, but ETags should be highly collision-free. An ETag could be a hash, a generation ID, a time stamp or some other value that changes when the underlying object changes.

If a client PUTs or PATCHes a resource, it should include an ETag in the HTTP If-Match/If-None-Match header from a previous GET. If a service supports returning the ETag header on a resource, the service may respond with status code 428 if the If-Match/If-None-Match header is missing from the PUT/PATCH request for the same resource, as specified in RFC6585.

In addition to returning the ETag property on each resource,

A Redfish Service should return the ETag header on client PUT/POST/PATCH
A Redfish Service should return the ETag header on a GET of an individual resource
The format of the ETag header is:

[Code] upstream RedfishDebugLib to edk2

Update RedfishDebugLib to edk2/redfishpkg and modify edk2/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c to use this library.

Propose new BIT like: BIT15 Redfish Driver message.

  #  BIT12 - BlockIo Driver message.<BR>
  #  BIT14 - Network Driver message.<BR>
  #  BIT16 - UNDI Driver message.<BR>

[Design] how to identify the request between BIOS and OOB user

Idea:
Bootstrap credential + ComputerSystem.BootProgress

  • only host FW can get bootstrap credential. credential is generated on each request and it gets deleted on system reset.
  • OS or option rom can also get bootstrap credential. So, BMC can identify it is BIOS by checking the boot progress code. (OpenBMC has boot progress code implemented)
  • Boot progress support is a requirement from ARM SBMR specification:
    image

[Code] Error handling support and return error message in Messages object

Current feature driver has no ability to return error back to user. Redfish allow application to put error message in Message object. Below is an example

Image

Ref:
Redfish spec. 1.15.1 chapter 8.6 Error responses:
HTTP status codes often do not provide enough information to enable deterministic error semantics. .... Additionally, the service may provide Redfish standardized errors, OEMdefined errors, or both, depending on the implementation's ability to convey the most useful information about the underlying error.

Image

[code] Update RedfishCredentailDxe driver

Based on edk2 discussion, update RedfishCredentailDxe driver to follow below design:

  • New function to determinate authentication method will be created in this driver. The idea is as below:
    • Get URI path to computer system by parsing redfish service root (/redfish/v1)
  • Issue HTTP GET to "/redfish/v1/Systems" (which normally require authentication) without authentication method.
    a) if client receive 200 OK, "No Auth" is used and we don't need to get credentials
    b) if client receive 401 Unauthorized, check the "WWW-Authenticate" field in returned HTTP header. "Basic realm" or "X-Auh-Token realm" or both two methods will be specified. Then client can know what method to use. Two methods all require credential.
  • Will need to update edk2/RedfishPkg/Include/Library/RedfishCredentialLib.h and remove EDKII_REDFISH_AUTH_METHOD from API.
  • Add new design of getting permanent credentials in this driver. And leave the implementation to vendor as optional feature.

[Design] feature driver OEM or hook support for customized attributes

A way of giving platform to customize attributes or support OEM attributes.

Some idea:

  • Library hook
  • Override protocol/callback

Discussion about data structure:

  • Use Json C structure
    • The driver or library will have schema dependency
    • platform can only add customization to what schema provided.
  • JSON string/object.
    • The function can be coded in single driver / library but platform has to manipulate JSON on their own.
    • Give full freedom for platform to add anything they like. (e.g. some additional control field that BMC requested)

For example (protocol + JSON object version):

EFI_STAUTS 
(EFIAPI *FEATURE_DRIVER_OVERRIDE) (
 IN       PROTOCOL       *This,
 IN       CHAR8          *Uri,
 IN       CHAR8          *Schema,
 IN OUT EDKII_JSON_VALUE *Json
);

typedef struct _FEATURE_DRIVER_OVERRIDE_PROTOCOL {
  UINT64                   Revision;
  FEATURE_DRIVER_OVERRIDE  OverrideCallback;
} FEATURE_DRIVER_OVERRIDE_PROTOCOL;

Redfish error report lib

Server usually has its own error logging mechanism. Although Redfish has error report definition. Do we consider to create a library so plat form can link to their own error logging system?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.