Cni: Difference between revisions

From NFVwiki
No edit summary
No edit summary
Line 31: Line 31:


== '''2 JSON schema''' ==
== '''2 JSON schema''' ==
{| class="wikitable"
|+
!cni
|-
|{
  "$schema": "<nowiki>http://json-schema.org/draft-07/schema#</nowiki>",
  "title": "cni",
  "description": "Realization of a secondary container cluster network interface",
  "additionalProperties": false,
  "required": [
     "interfaceType"
  ],
  "type": "object",
  "properties": {
    "interfaceType": {
      "type": "string",
      "enum": [
        "kernel.netdev",
        "direct.userspace",
        "direct.kernel",
        "bond",
        "userspace"
      ],           
      "description": "Type of network interface"
    },
    "nicOptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "nicType": {
            "type": "string",
            "enum": [ "i710", "e810", "mlx-cx5", "mlx-cx6"],
            "description": "Nic types the driver is verified to work with in a direct.userspace interface."
          },
          "speeds": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of speeds in bps the driver is verified to work with in a direct.userspace, direct.kernel or bond interface. If nicType is present, the speeds are applicable to that nicType."
          },
        },  
        "minProperties": 1
      },  
      "description": "For direct.userdriver interface nic types and/or speeds the driver is verified to work with. For direct.kernel and bond speeds the driver is verified to work with"
    },
    "interfaceOptions": {
     "type": "array",
      "items": {
        "type": "string",
        "enum": [ "memif", "virtio"]
      },      
      "description": "For userspace vnic configurations the network interface is verified to work with "
    },
    "interfaceRedundancy": {
      "type": "string",
      "enum": [ "infraProvided", "left", "right", "activeActiveBond", "activePassiveBond", "activeActiveL3" ],
      "description": " Switchplane redundancy management method "
    }
  },
  "allOf": [
    {
     "if": {
       "properties": {
           "interfaceType": {
             "enum": [ "direct.userspace", "direct.kernel" ]
            }
         }
       },
       "then": {
         "required": ["interfaceRedundancy" ],
         "properties": {
           "interfaceRedundancy": {
             "enum": [ "activePassiveBond", "activeActiveBond", "activePassiveL3", "Left", "Right", "infraProvided" ]
          }
         }
      }
    },
    {
       "if": {
         "properties": {
           "interfaceType": {
             "enum": ["kernel.netdev", "userspace" ]
            }
         }
     },
      "then": {
        "properties": {
          "interfaceRedundancy": {
            "enum": ["infraProvided" ],
            "default": "infraProvided"
          }       
        }
      }
     },
    {  
       "if": {
         "properties": {
           "interfaceType": {
             "enum": ["bond"]
            }
         }
     },  
     "then": {
         "required": ["interfaceRedundancy" ],
         "properties": {
           "interfaceRedundancy": {
           "enum": ["activePassiveBond", "activeActiveBond" ]
         }
       }
      }
    }
  ]  
|}

Revision as of 08:01, 31 May 2022

1 Registration information

Name cni
Category Network
Permitted values Per schema
Version 1.0
Schema See below
Type Generic
Description This capability represents the realization of a secondary container cluster network interface.

The expression of the related requirements allows the selection of a suitable CNITM and configuration

of the Network Attachment Definition (NAD) or NADs accordingly.

2 JSON schema

cni
{

  "$schema": "http://json-schema.org/draft-07/schema#",

  "title": "cni",

  "description": "Realization of a secondary container cluster network interface",

  "additionalProperties": false,

  "required": [

     "interfaceType"

  ],

  "type": "object",

  "properties": {

    "interfaceType": {

      "type": "string",

      "enum": [

        "kernel.netdev",

        "direct.userspace",

        "direct.kernel",

        "bond",

        "userspace"

      ],           

      "description": "Type of network interface"

    },

    "nicOptions": {

      "type": "array",

      "items": {

        "type": "object",

        "properties": {

          "nicType": {

            "type": "string",

            "enum": [ "i710", "e810", "mlx-cx5", "mlx-cx6"],

            "description": "Nic types the driver is verified to work with in a direct.userspace interface."

          },

          "speeds": {

            "type": "array",

            "items": {

              "type": "integer"

            },

            "description": "List of speeds in bps the driver is verified to work with in a direct.userspace, direct.kernel or bond interface. If nicType is present, the speeds are applicable to that nicType."

          },

        },  

        "minProperties": 1

      },  

      "description": "For direct.userdriver interface nic types and/or speeds the driver is verified to work with. For direct.kernel and bond speeds the driver is verified to work with"

    },

    "interfaceOptions": {

     "type": "array",

      "items": {

        "type": "string",

        "enum": [ "memif", "virtio"]

      },      

      "description": "For userspace vnic configurations the network interface is verified to work with "

    },

    "interfaceRedundancy": {

      "type": "string",

      "enum": [ "infraProvided", "left", "right", "activeActiveBond", "activePassiveBond", "activeActiveL3" ],

      "description": " Switchplane redundancy management method "

    }

  },

  "allOf": [

    {

     "if": {

       "properties": {

           "interfaceType": {

             "enum": [ "direct.userspace", "direct.kernel" ]

            }

         }

       },

       "then": {

         "required": ["interfaceRedundancy" ],

         "properties": {

           "interfaceRedundancy": {

             "enum": [ "activePassiveBond", "activeActiveBond", "activePassiveL3", "Left", "Right", "infraProvided" ]

          }

         }

      }

    },

    {

       "if": {

         "properties": {

           "interfaceType": {

             "enum": ["kernel.netdev", "userspace" ]

            }

         }

     },

      "then": {

        "properties": {

          "interfaceRedundancy": {

            "enum": ["infraProvided" ],

            "default": "infraProvided"

          }       

        }

      }

     },

    {  

       "if": {

         "properties": {

           "interfaceType": {

             "enum": ["bond"]

            }

         }

     },  

     "then": {

         "required": ["interfaceRedundancy" ],

         "properties": {

           "interfaceRedundancy": {

           "enum": ["activePassiveBond", "activeActiveBond" ]

         }

       }

      }

    }

  ]   }