Commit a4cd2f31 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'tools-ynl-gen-lift-type-requirement-for-attribute-subsets'

Jiri Pirko says:

====================
tools: ynl-gen: lift type requirement for attribute subsets

Remove the requirement from schema files to specify the "type" for
attribute subsets and adjust existing schema files.
====================

Link: https://lore.kernel.org/r/20231006114436.1725425-1-jiri@resnulli.us


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c0423539 7049fd5d
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ properties:
          type: array
          items:
            type: object
            required: [ name, type ]
            required: [ name ]
            additionalProperties: False
            properties:
              name:
@@ -215,6 +215,18 @@ properties:
          not:
            required: [ name-prefix ]

      # type property is only required if not in subset definition
      if:
        properties:
          subset-of:
            not:
              type: string
      then:
        properties:
          attributes:
            items:
              required: [ type ]

  operations:
    description: Operations supported by the protocol.
    type: object
+13 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ properties:
          type: array
          items:
            type: object
            required: [ name, type ]
            required: [ name ]
            additionalProperties: False
            properties:
              name:
@@ -254,6 +254,18 @@ properties:
          not:
            required: [ name-prefix ]

      # type property is only required if not in subset definition
      if:
        properties:
          subset-of:
            not:
              type: string
      then:
        properties:
          attributes:
            items:
              required: [ type ]

  operations:
    description: Operations supported by the protocol.
    type: object
+13 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ properties:
          type: array
          items:
            type: object
            required: [ name, type ]
            required: [ name ]
            additionalProperties: False
            properties:
              name:
@@ -184,6 +184,18 @@ properties:
          not:
            required: [ name-prefix ]

      # type property is only required if not in subset definition
      if:
        properties:
          subset-of:
            not:
              type: string
      then:
        properties:
          attributes:
            items:
              required: [ type ]

  operations:
    description: Operations supported by the protocol.
    type: object
+13 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ properties:
          type: array
          items:
            type: object
            required: [ name, type ]
            required: [ name ]
            additionalProperties: False
            properties:
              name:
@@ -261,6 +261,18 @@ properties:
          not:
            required: [ name-prefix ]

      # type property is only required if not in subset definition
      if:
        properties:
          subset-of:
            not:
              type: string
      then:
        properties:
          attributes:
            items:
              required: [ type ]

  operations:
    description: Operations supported by the protocol.
    type: object
+0 −10
Original line number Diff line number Diff line
@@ -199,54 +199,44 @@ attribute-sets:
    attributes:
      -
        name: reload-stats
        type: nest
      -
        name: remote-reload-stats
        type: nest
  -
    name: dl-reload-stats
    subset-of: devlink
    attributes:
      -
        name: reload-action-info
        type: nest
  -
    name: dl-reload-act-info
    subset-of: devlink
    attributes:
      -
        name: reload-action
        type: u8
      -
        name: reload-action-stats
        type: nest
  -
    name: dl-reload-act-stats
    subset-of: devlink
    attributes:
      -
        name: reload-stats-entry
        type: nest
  -
    name: dl-reload-stats-entry
    subset-of: devlink
    attributes:
      -
        name: reload-stats-limit
        type: u8
      -
        name: reload-stats-value
        type: u32
  -
    name: dl-info-version
    subset-of: devlink
    attributes:
      -
        name: info-version-name
        type: string
      -
        name: info-version-value
        type: string

operations:
  enum-model: directional
Loading