Commit a4cd2f31 authored by Jakub Kicinski's avatar Jakub Kicinski

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.usSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c0423539 7049fd5d
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment