module yumaworks-agt-profile {

  namespace "http://yumaworks.com/ns/yumaworks-agt-profile";
  prefix yprof;

  import yuma-app-common { prefix yapp; }
  import yuma-ncx { prefix ncx; }
  import yuma-types { prefix yt; }
  import yumaworks-types { prefix ywt; }

  organization "YumaWorks, Inc.";

  contact
      "Support <support at yumaworks.com>";

  description
     "YumaPro agt_profile message definition for subsystem
      initialization.  Keep the agt-profile grouping in
      synch with the agt_profile_t in agt/agt.h

     Copyright (c) 2014 - 2024 YumaWorks, Inc. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the BSD 3-Clause License
     http://opensource.org/licenses/BSD-3-Clause";

  revision 2024-10-03 {
     description
       "24.10-2: Add new bits to all-booleans3 flag:
          bit12 agt_sil_skip_global_edit_validate
          bit13 agt_sil_skip_global_edit_apply
       ";
  }

  revision 2023-02-27 {
     description
       "Add push-min-period and push-min-dampening leafs.";
  }

  revision 2022-09-17 {
     description
       "Add new bits to all-booleans3 flag:
          bit1 agt_startup_skip_validation
          bit2 agt_cvt_subtree_filter
          bit3 agt_with_yang_patch_running
          bit4 agt_push_simop_enabled
          bit5 agt_push_simop_patch_update
          bit6 agt_wait_datastore_ready
          bit7 agt_return_status
          bit8 agt_use_yumaworks_cert_usermap
          bit9 agt_remove_schema_aug_leafs
          bit10 agt_tls_debug
          bit11 agt_highres_event_time
       ";
  }


  revision 2020-02-13 {
     description
       "Add new bit flag: new all-booleans3
         agt_import_bestmatch bit0.";
  }

  revision 2019-10-12 {
     description
       "Add new bit flag: agt_with_nmda bit31.";
  }

  revision 2017-02-08 {
     description
       "Add new bit flag: agt_with_yang11_hello bit28.";
  }

  revision 2017-01-06 {
     description
       "Add new bit flag: agt_with_snmp bit28.
        Add new bit flag: agt_create_empty_npcontainers bit27.";
  }

  revision 2016-09-15 {
     description
       "Add new bit flag: agt_simple_json_names bit26.";
  }

  revision 2016-02-06 {
     description
       "Add fields for YP-HA service";
  }

  revision 2016-01-10 {
     description
       "Add missing agt_autodelete_pdu_error bit19 flag.
        Add new bit flags. Add:
        agt_with_netconf bit20,
        agt_with_restconf bit21,
        agt_with_yang_api bit22,
        agt_with_yp_shell bit23.";
  }

  revision 2015-11-02 {
      description
        "Add new leaf flag. Add agt_sil_getbulk_max.
         Add agt_restconf_strict_accept bit18 flag";
  }

  revision 2015-09-26 {
     description
       "Add agt_sil_validate_candidate bit17 flag
        Add agt_audit_log_candidate bit16 flag
        Add agt_leaflist_deleteall_ok bit15 flag
        Update agt_list_deleteall_ok bit11 boolean1 flag";
  }

  revision 2015-09-14 {
      description
        "Add new leaf flag. Add agt_restconf_server_url.";
  }

  revision 2015-06-06 {
      description
        "Add new boolean2 flag.  Add withdef_enabled leaf.";
  }

  revision 2014-09-06 {
      description
        "Initial version.";
  }

  grouping agt-profile {
    container agt-profile {
      config false;
      ncx:abstract;
      ncx:hidden;
      description
        "Server profile parameters; Currently cannot be
         changed after boot-time.";

      leaf agt_targ {
        type ywt:server-target;   // ncx_agttarg_t
      }
      leaf agt_start {
        type enumeration {   // ncx_agtstart_t
          enum none;
          enum mirror;
          enum distinct;
        }
      }
      leaf agt_log_level {
        type yt:NcDebugType;   // log_debug_t
      }
      leaf agt_syslog_log_level {
        type yt:NcDebugType;   // log_debug_t
      }
      leaf agt_pthread_log_level {
        type yt:NcDebugType;  // log_debug_t
      }
      leaf agt_match_names {
        type ywt:NameMatchMode;  // ncx_name_match_t
      }
      leaf agt_transaction_model {
        type enumeration {   // agt_transaction_model_t
          enum none;
          enum shared;
          enum private;
        }
      }
      leaf agt_acm_model {
        type enumeration {   // agt_acm_model_t
          enum none;
          enum ietf;
          enum yuma;
          enum external;
        }
      }
      leaf agt_defaultStyleEnum {
        type yapp:CliWithDefaultsType;   // ncx_withdefaults_t
      }
      leaf agt_accesscontrol_enum {
        type ywt:access-control-mode;   // agt_acmode_t
      }
      leaf agt_max_sessions {
        type uint16;
      }
      leaf agt_subsys_timeout {
        type uint16;
      }
      leaf-list agt_ports {
        type uint16;
      }
      leaf agt_yangapi_server_url {
        type string;
      }
      leaf agt_restconf_server_url {
        type string;
      }
      leaf agt_accesscontrol {
        type string;
      }
      leaf agt_conffile {
        type string;
      }
      leaf agt_logfile {
        type string;
      }
      leaf agt_startup {
        type string;
      }
      leaf agt_defaultStyle {
        type string;
      }
      leaf agt_superuser {
        type string;
      }
      leaf agt_extern_libspec {
        type string;
      }
      leaf agt_backup_dir {
        type string;
      }
      leaf agt_server_id {
        type string;
      }
      leaf agt_subsys_info_file {
        type string;
      }
      leaf agt_eventlog_size {
        type uint32;
      }
      leaf agt_maxburst {
        type uint32;
      }
      leaf agt_hello_timeout {
        type uint32;
      }
      leaf agt_idle_timeout {
        type uint32;
      }
      leaf agt_linesize {
        type uint32;
      }
      leaf agt_indent {
        type int32;
      }
      leaf agt_message_indent {
        type int32;
      }
      leaf agt_withdef_enabled {
        type uint8;
      }
      leaf agt_sil_getbulk_max {
        type uint32;
      }

      leaf agt_audit_log_console_level {
        type yt:NcDebugType;   // log_debug_t
      }

      leaf agt_audit_log_level {
        type yt:NcDebugType;   // log_debug_t
      }

      leaf agt_ha_port {
        type uint16;
      }

      leaf agt_ha_server_key {
        type string;
      }

      /**** All booleans encoded in 3 uint32 leafs  ****/
      leaf all-booleans1 {
        type uint32;
        description
         "Bit definitions:
          bit0 agt_session_sync_mutex;    // deprecated !!!
          bit1 agt_log_acm_reads;
          bit2 agt_log_acm_writes;
          bit3 agt_validate_all;
          bit4 agt_has_startup;
          bit5 agt_usestartup;
          bit6 agt_factorystartup;
          bit7 agt_startup_error;
          bit8 agt_running_error;
          bit9 agt_logappend;
          bit10 agt_xmlorder;
          bit11 agt_list_deleteall_ok;
          bit12 agt_stream_output;
          bit13 agt_delete_empty_npcontainers;
          bit14 agt_notif_sequence_id;
          bit15 agt_yuma_system_notifs;
          bit16 agt_ietf_system_notifs;
          bit17 agt_yumaworks_system;
          bit18 agt_alt_names;
          bit19 agt_wildcards;
          bit20 agt_usevalidate;
          bit21 agt_useurl;
          bit22 agt_use_ccommit;
          bit23 agt_use_yangapi;
          bit24 agt_use_restconf;
          bit25 agt_use_cli;
          bit26 agt_use_netconf;
          bit27 agt_use_local_transport;
          bit28 agt_use_notifications;
          bit29 agt_system_sorted;      // deprecated !!!
          bit30 agt_lax_namespaces;
          bit31 agt_use_yuma_proc;
          ";
      }  // leaf all-booleans1

      leaf all-booleans2 {
        type uint32;
        description
         "Bit definitions:
          bit0 agt_use_yuma_arp;
          bit1 agt_use_yuma_if;
          bit2 agt_use_yuma_mysession;
          bit3 agt_use_yumaworks_event_filter;
          bit4 agt_use_ycontrol;
          bit5 agt_sil_skip_load;
          bit6 agt_log_event_drops;
          bit7 agt_sil_missing_error;
          bit8 agt_sil_skip_keys;
          bit9 agt_use_rollback_failed_backup;
          bit10 agt_allow_tcp_socket;
          bit11 agt_use_tcp_socket;
          bit12 agt_save_owners;
          bit13 agt_json_leaf_list_1line;
          bit14 agt_save_config_system;
          bit15 agt_leaflist_deleteall_ok;
          bit16 agt_audit_log_candidate;
          bit17 agt_sil_validate_candidate;
          bit18 agt_restconf_strict_accept;
          bit19 agt_autodelete_pdu_error;
          bit20 agt_with_netconf;
          bit21 agt_with_restconf;
          bit22 agt_with_yang_api;
          bit23 agt_with_yp_shell;
          bit24 agt_ha_enabled;
          bit25 agt_ha_sil_standby;
          bit26 agt_simple_json_names;
          bit27 agt_create_empty_npcontainers;
          bit28 agt_with_yang11_hello;
          bit29 agt_with_snmp;
          bit30 agt_term_msg;
          bit31 agt_with_nmda;
          ";
      }  // leaf all-booleans2

      leaf all-booleans3 {
        type uint32;
        description
         "Bit definitions:
          bit0 agt_import_version_bestmatch
          bit1 agt_startup_skip_validation
          bit2 agt_cvt_subtree_filter
          bit3 agt_with_yang_patch_running
          bit4 agt_push_simop_enabled
          bit5 agt_push_simop_patch_update
          bit6 agt_wait_datastore_ready
          bit7 agt_return_status
          bit8 agt_use_yumaworks_cert_usermap
          bit9 agt_remove_schema_aug_leafs
          bit10 agt_tls_debug
          bit11 agt_highres_event_time
          bit12 agt_sil_skip_global_edit_validate
          bit13 agt_sil_skip_global_edit_apply
        ";
      }

      leaf push-min-period {
        type uint16;
        description "The --push-min-period CLI parameter.";
      }

      leaf push-min-dampening {
        type uint16;
        description "The --push-min-dampening CLI parameter.";
      }



    }  // container agt_profile
  } // grouping
}
