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: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2023-10-09 19:44:58 -07:00
commit a4cd2f311a
7 changed files with 52 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -278,36 +278,28 @@ attribute-sets:
attributes:
-
name: parent-id
type: u32
-
name: direction
type: u32
-
name: prio
type: u32
-
name: state
type: u32
-
name: pin-parent-pin
subset-of: pin
attributes:
-
name: parent-id
type: u32
-
name: state
type: u32
-
name: frequency-range
subset-of: pin
attributes:
-
name: frequency-min
type: u64
-
name: frequency-max
type: u64
operations:
enum-name: dpll_cmd

View File

@ -818,13 +818,10 @@ attribute-sets:
attributes:
-
name: hist-bkt-low
type: u32
-
name: hist-bkt-hi
type: u32
-
name: hist-val
type: u64
-
name: stats
attributes: