Skip to content

Commit

Permalink
Add a SecY container object to group all SecY properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sasubrata committed Jan 18, 2025
1 parent dca3c14 commit c0365c2
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 58 deletions.
16 changes: 8 additions & 8 deletions device/macsec/basic.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
components:
schemas:
Macsec.Basic:
Macsec.SecY.Basic:
description: >-
A container of basic properties for a MACsec interface.
A container of basic properties for a SecY.
type: object
properties:
key_generation:
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration'
$ref: '#/components/schemas/Macsec.SecY.Basic.KeyGeneration'
x-field-uid: 1
Macsec.Basic.KeyGeneration:
Macsec.SecY.Basic.KeyGeneration:
description: >-
Key Generation.
type: object
properties:
choice:
description: >-
The type of control protocol of MACsec.
The type of control protocol of SecY.
type: string
default: mka
x-field-uid: 1
Expand All @@ -25,9 +25,9 @@ components:
static:
x-field-uid: 2
static:
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static'
$ref: '#/components/schemas/Macsec.SecY.Basic.KeyGeneration.Static'
x-field-uid: 2
Macsec.Basic.KeyGeneration.Static:
Macsec.SecY.Basic.KeyGeneration.Static:
description: >-
The container for static key settings.
type: object
Expand Down Expand Up @@ -60,7 +60,7 @@ components:
x-field-uid: 2
50:
x-field-uid: 3
Macsec.Basic.KeyGeneration.Static.Sak:
Macsec.SecY.Basic.KeyGeneration.Static.Sak:
description: >-
The container for SAK.
type: object
Expand Down
48 changes: 22 additions & 26 deletions device/macsec/cryptoengine.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
components:
schemas:
Macsec.CryptoEngine:
Macsec.SecY.CryptoEngine:
description: >-
A container of crypto engine properties for a MACsec interface.
A container of crypto engine properties of a SecY.
type: object
properties:
engine_type:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type'
x-field-uid: 1
Macsec.CryptoEngine.Type:
Macsec.SecY.CryptoEngine.Type:
description: >-
Crypto engine type.
type: object
Expand All @@ -25,34 +25,34 @@ components:
stateful_encryption_decryption:
x-field-uid: 2
stateless_encryption_only:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly'
x-field-uid: 2
stateful_encryption_decryption:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption'
x-field-uid: 3
Macsec.CryptoEngine.Type.StatelessEncryptionOnly:
Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly:
description: >-
The container for stateless encryption only engine settings.
type: object
properties:
tx_pn:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.TxPn'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.TxPn'
x-field-uid: 1
traffic:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.Traffic'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.Traffic'
x-field-uid: 2
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption:
Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption:
description: >-
The container for stateful encryption and decryption engine settings.
type: object
properties:
initial_pn:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn'
x-field-uid: 1
hardware_acceleration:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration'
x-field-uid: 2
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.TxPn:
Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.TxPn:
description: >-
Tx PN settings.
type: object
Expand All @@ -69,12 +69,12 @@ components:
incrementing_pn:
x-field-uid: 2
fixed:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn'
x-field-uid: 2
incrementing:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn'
x-field-uid: 3
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn:
Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.FixedPn:
description: >-
Fixed PN settings.
type: object
Expand All @@ -85,7 +85,7 @@ components:
type: integer
default: 6
x-field-uid: 1
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn:
Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.IncrementingPn:
description: >-
Incrementing PN settings.
type: object
Expand All @@ -102,7 +102,7 @@ components:
type: integer
default: 10000
x-field-uid: 2
Macsec.CryptoEngine.Type.StatelessEncryptionOnly.Traffic:
Macsec.SecY.CryptoEngine.Type.StatelessEncryptionOnly.Traffic:
description: >-
Encryption only traffic settings.
type: object
Expand All @@ -113,7 +113,7 @@ components:
type: boolean
default: true
x-field-uid: 1
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn:
Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.InitialPn:
description: >-
Initial PN settings.
type: object
Expand All @@ -124,7 +124,7 @@ components:
type: integer
default: 1
x-field-uid: 1
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration:
Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration:
description: >-
Hardware acceleration settings.
type: object
Expand All @@ -141,13 +141,9 @@ components:
inline_crypto:
x-field-uid: 2
inline_crypto:
$ref: '#/components/schemas/Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto'
$ref: '#/components/schemas/Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto'
x-field-uid: 2
Macsec.ChoiceNone:
description: >-
A empty container that is used to indicate a null choice.
type: object
Macsec.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto:
Macsec.SecY.CryptoEngine.Type.StatefulEncryptionDecryption.HardwareAcceleration.InlineCrypto:
description: >-
Inline cryto engine settings.
type: object
Expand Down
44 changes: 28 additions & 16 deletions device/macsec/macsec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ components:
schemas:
Device.Macsec:
description: >-
A container of properties for a MACsec interface.
A container of properties for a MACsec capable device.
type: object
required: [ethernet_interfaces]
properties:
Expand All @@ -17,7 +17,7 @@ components:
description: >-
Configuration for single MACsec interface.
type: object
required: [eth_name, name, basic, crypto_engine]
required: [eth_name, secy]
properties:
eth_name:
description: >-
Expand All @@ -27,35 +27,47 @@ components:
x-constraint:
- '/components/schemas/Device.Ethernet/properties/name'
x-field-uid: 1
secy:
description: >-
This contains the properties of Secure Entity (SecY).
$ref: './basic.yaml#/components/schemas/Macsec.SecY'
x-field-uid: 2

Macsec.SecY:
description: >-
Configuration for a Secure Entity (SecY).
type: object
required: [name, basic, crypto_engine]
properties:
name:
x-include: ../../common/common.yaml#/components/schemas/Named.Object/properties/name
x-field-uid: 2
x-field-uid: 1
basic:
description: >-
This contains the basic properties of MACsec.
$ref: './basic.yaml#/components/schemas/Macsec.Basic'
x-field-uid: 3
This contains the basic properties of SecY.
$ref: './basic.yaml#/components/schemas/Macsec.SecY.Basic'
x-field-uid: 2
txscs:
description: >-
Tx secure channels.
type: array
items:
$ref: './txsc.yaml#/components/schemas/Macsec.TxSc'
x-field-uid: 4
$ref: './txsc.yaml#/components/schemas/Macsec.SecY.TxSc'
x-field-uid: 3
rxscs:
description: >-
Rx secure channels.
type: array
items:
$ref: './rxsc.yaml#/components/schemas/Macsec.RxSc'
x-field-uid: 5
$ref: './rxsc.yaml#/components/schemas/Macsec.SecY.RxSc'
x-field-uid: 4
crypto_engine:
description: >-
This contains crypto engine properties of MACsec.
$ref: './cryptoengine.yaml#/components/schemas/Macsec.CryptoEngine'
x-field-uid: 6
This contains crypto engine properties of SecY.
$ref: './cryptoengine.yaml#/components/schemas/Macsec.SecY.CryptoEngine'
x-field-uid: 5
advance:
description: >-
This contains advance properties of MACsec.
$ref: './advance.yaml#/components/schemas/Macsec.Advance'
x-field-uid: 7
This contains advance properties of SecY.
$ref: './advance.yaml#/components/schemas/Macsec.SecY.Advance'
x-field-uid: 6
8 changes: 4 additions & 4 deletions device/macsec/rxsc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
components:
schemas:
Macsec.RxSc:
Macsec.SecY.RxSc:
description: >-
The container for Rx SC settings.
type: object
properties:
static_key:
$ref: '#/components/schemas/Macsec.RxSc.StaticKey'
$ref: '#/components/schemas/Macsec.SecY.RxSc.StaticKey'
x-field-uid: 1
Macsec.RxSc.StaticKey:
Macsec.SecY.RxSc.StaticKey:
description: |-
Rx SC settings for static key.
type: object
Expand Down Expand Up @@ -42,5 +42,5 @@ components:
Rx SAK pool.
type: array
items:
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static.Sak'
$ref: '#/components/schemas/Macsec.SecY.Basic.KeyGeneration.Static.Sak'
x-field-uid: 5
8 changes: 4 additions & 4 deletions device/macsec/txsc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
components:
schemas:
Macsec.TxSc:
Macsec.SecY.TxSc:
description: >-
The container for Tx SC settings.
type: object
properties:
static_key:
$ref: '#/components/schemas/Macsec.TxSc.StaticKey'
$ref: '#/components/schemas/Macsec.SecY.TxSc.StaticKey'
x-field-uid: 1
Macsec.TxSc.StaticKey:
Macsec.SecY.TxSc.StaticKey:
description: >-
Tx SC setting for static key.
type: object
Expand Down Expand Up @@ -48,5 +48,5 @@ components:
Tx SAK pool.
type: array
items:
$ref: '#/components/schemas/Macsec.Basic.KeyGeneration.Static.Sak'
$ref: '#/components/schemas/Macsec.SecY.Basic.KeyGeneration.Static.Sak'
x-field-uid: 6

0 comments on commit c0365c2

Please sign in to comment.