huawei-dsa

DSA.

  • Version: 2019-05-01

    huawei-dsa@2019-05-01


    
      module huawei-dsa {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-dsa";
    
        prefix dsa;
    
        import huawei-extension {
          prefix ext;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
         Bantian, Longgang
         Shenzhen 518129
         People's Republic of China
         Website: http://www.huawei.com
         Email: support@huawei.com";
    
        description "DSA.";
    
        revision "2019-05-01" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "ssh-server";
    
        typedef dsa-key-type {
          type enumeration {
            enum "2048" {
              value 2048;
              description "Modulus 2048.";
            }
          }
          description "DSA key length.";
        }
    
        typedef dsa-encode-type {
          type enumeration {
            enum "der" {
              value 0;
              description "DER.";
            }
            enum "pem" {
              value 1;
              description "PEM.";
            }
            enum "openssh" {
              value 2;
              description "OpenSSH.";
            }
          }
          description "DSA encodein type list.";
        }
    
        container dsa {
          description "DSA.";
          container local-keys {
            description
              "Configure local key code.";
            container local-key {
              presence "create dsaLocalKey.";
              description
                "Enable/disable local key code.";
              leaf key-size {
                type dsa-key-type;
                default "2048";
                description "Key size.";
              }
    
              leaf host-key-name {
                type string {
                  length "0..264";
                }
                config false;
                description "Hostkey name.";
              }
    
              leaf host-key-code {
                type string {
                  length "0..2048";
                }
                config false;
                description "Hostkey code.";
              }
    
              leaf host-key-pem {
                type string {
                  length "0..2048";
                }
                config false;
                description
                  "Hostkey code in PEM format.";
              }
    
              leaf host-key-openssh {
                type string {
                  length "0..2048";
                }
                config false;
                description
                  "Hostkey code in OpenSSH format.";
              }
            }  // container local-key
          }  // container local-keys
    
          container peer-keys {
            description
              "List of peer key table.";
            list peer-key {
              key "key-name";
              max-elements 20;
              description
                "Configure peer key code. If the key code is bound, it cannot be deleted, you need to unbind and then delete.";
              leaf key-name {
                type string {
                  length "1..40";
                }
                description "Key name.";
              }
    
              leaf key-code {
                ext:support-filter "true";
                type string {
                  length "1..4096";
                }
                mandatory true;
                description
                  "Key code conforming to PEM, OpenSSH or DER format.";
              }
    
              leaf encoding-type {
                ext:support-filter "true";
                type dsa-encode-type;
                default "der";
                description "Encode type.";
              }
            }  // list peer-key
          }  // container peer-keys
    
          container key-pairs {
            description
              "List of DSA keypair labels.";
            list key-pair {
              key "key-pair-label";
              max-elements 20;
              description
                "Configure DSA keypair label policy.";
              leaf key-pair-label {
                type string {
                  length "1..35";
                  pattern '[a-z0-9_]*';
                }
                description
                  "Keypair Label Name : It only contains underscores (_), lowercase letters and digits.";
              }
    
              leaf key-size {
                ext:support-filter "true";
                type dsa-key-type;
                default "2048";
                description "Size of Keypair.";
              }
    
              leaf host-key-code {
                ext:support-filter "true";
                type string {
                  length "0..2048";
                }
                config false;
                description "DSA hostkey code.";
              }
            }  // list key-pair
          }  // container key-pairs
    
          container dsa-global {
            description
              "Configure global Configuration.";
            leaf max-key-pair {
              type int32 {
                range "1..20";
              }
              default "20";
              description
                "Maximum keypair value.";
            }
          }  // container dsa-global
        }  // container dsa
      }  // module huawei-dsa
    

© 2023 YumaWorks, Inc. All rights reserved.