Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataStorageLoSCapabilities_v1_2_2_DataStorageLoSCapabilities SupportedLinesOfService #136

Open
commonism opened this issue May 31, 2024 · 1 comment

Comments

@commonism
Copy link

Hi,

using v1.2.6 the mockup http://service-based-mockups.swordfishmockups.com fails validation using the provided openapi description documents.
The PathItems

/redfish/v1/StorageServices/FileService/DataProtectionLoSCapabilities/
/redfish/v1/StorageServices/1/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/1/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOConnectivityLoSCapabilities/
/redfish/v1/StorageServices/1/DataProtectionLoSCapabilities/
/redfish/v1/StorageServices/FileService/DataSecurityLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/1/DataSecurityLoSCapabilities/
/redfish/v1/StorageServices/1/DataStorageLoSCapabilities/

fail validation.

The problem is in the SupportedLinesOfService property:

       10 validation errors for DataStorageLoSCapabilities_v1_2_2_DataStorageLoSCapabilities
SupportedLinesOfService.0.`@odata.type`
  Extra inputs are not permitted [type=extra_forbidden, input_value='#DataSecurityLineOfServi...taSecurityLineOfService', input_type=str]
    For further information visit https://errors.pydantic.dev/2.5/v/extra_forbidden
SupportedLinesOfService.0.Id
  Extra inputs are not permitted [type=extra_forbidden, input_value='SecureData', input_type=str]
    For further information visit https://errors.pydantic.dev/2.5/v/extra_forbidden
…

which is defined as

        SupportedLinesOfService:
          description: Collection of known and supported DataStorageLinesOfService.
          items:
            $ref: http://redfish.dmtf.org/schemas/v1/odata-v4.yaml#/components/schemas/odata-v4_idRef
          readOnly: false
          type: array
          x-autoExpand: true
          x-longDescription: The collection shall contain known and supported DataStorageLinesOfService.

but served as:


    "SupportedLinesOfService": [
        {
            "@odata.type": "#DataSecurityLineOfService.v1_1_1.DataSecurityLineOfService",
            "Id": "SecureData",
            "Name": "SecureData",
            "MediaEncryptionStrength": "Bits_256",
            "ChannelEncryptionStrength": "Bits_128",
            "HostAuthenticationType": "Ticket",
            "UserAuthenticationType": "Password",
            "SecureChannelProtocol": "TLS",
            "AntivirusScanPolicies": [],
            "DataSanitizationPolicy": "CryptographicErase",
            "@odata.id": "/redfish/v1/StorageServices/FileService/LinesOfService/DataSecurityLinesOfService/SecureData"
        }

this is most likely due to missing auto-expansion when generating the OpenAPI description documents (c.f. DMTF/Redfish-Service-Validator#588).
Changing the type to the "expanded" in the description documents works for me.

@rahlvers
Copy link
Contributor

rahlvers commented Jun 3, 2024

Cross-logged in Swordfish TWG repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants