<commit_before>#*******************************************************************************
#                       OpenNebula Configuration file
#*******************************************************************************

#*******************************************************************************
# Daemon configuration attributes
#-------------------------------------------------------------------------------
#  MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions.
#  MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.
#
#  MONITORING_INTERVAL: Time in seconds between host and VM monitorization.
#
#  MONITORING_THREADS: Max. number of threads used to process monitor messages
#
#  HOST_PER_INTERVAL: Number of hosts monitored in each interval.
#  HOST_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
#  information. Use 0 to disable HOST monitoring recording.
#
#  VM_INDIVIDUAL_MONITORING: VM monitoring information is obtained along with the
#  host information. For some custom monitor drivers you may need activate the
#  individual VM monitoring process.
#  VM_PER_INTERVAL: Number of VMs monitored in each interval, if the individual
#  VM monitoring is set to yes.
#  VM_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
#  information. Use 0 to disable VM monitoring recording.
#
#  SCRIPTS_REMOTE_DIR: Remote path to store the monitoring and VM management
#  scripts.
#
#  PORT: Port where oned will listen for xmlrpc calls.
<% if scope.lookupvar('one::version_gte_4_14') -%>
#  LISTEN_ADDRESS: Host IP to listen on for xmlrpc calls (default: all IPs).
<% end -%>
#
#  DB: Configuration attributes for the database backend
#   backend : can be sqlite or mysql (default is sqlite)
#   server  : (mysql) host name or an IP address for the MySQL server
#   port    : (mysql) port for the connection to the server.
#                     If set to 0, the default port is used.
#   user    : (mysql) user's MySQL login ID
#   passwd  : (mysql) the password for user
#   db_name : (mysql) the database name
#
<% if scope.lookupvar('one::version_gte_5_0') -%>
#  VNC_PORTS: VNC port pool for automatic VNC port assignment, if possible the
#  port will be set to ``START`` + ``VMID``
#   start   : first port to assign
#   reserved: comma separated list of ports
<% else %>
#  VNC_BASE_PORT: VNC ports for VMs can be automatically set to VNC_BASE_PORT +
#  VMID
<% end %>
#
#  LOG: Configuration for the logging system
#   system: defines the logging system:
#      file      to log in the oned.log file
#      syslog    to use the syslog facilities
<% if scope.lookupvar('one::version_gte_5_0') -%>
#      std       to use the default log stream (stderr) to use with systemd
<% end -%>
#   debug_level: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
#
#  VM_SUBMIT_ON_HOLD: Forces VMs to be created on hold state instead of pending.
#  Values: YES or NO.
#*******************************************************************************

LOG = [
  system      = "<%= scope.lookupvar('one::oned_log_system') %>",
  debug_level = <%= @debug_level %>
]

#MANAGER_TIMER = 30

MONITORING_INTERVAL = <%= scope.lookupvar('one::monitoring_interval') %>
MONITORING_THREADS  = <%= scope.lookupvar('one::monitoring_threads') %>

#HOST_PER_INTERVAL               = 15
#HOST_MONITORING_EXPIRATION_TIME = 43200

#VM_INDIVIDUAL_MONITORING      = "no"
#VM_PER_INTERVAL               = 5
#VM_MONITORING_EXPIRATION_TIME = 14400

SCRIPTS_REMOTE_DIR=/var/tmp/one

PORT = <%= scope.lookupvar('one::oned_port') %>

<% if scope.lookupvar('one::version_gte_4_14') -%>
LISTEN_ADDRESS = "<%= scope.lookupvar('one::oned_listen_address') %>"
<% end -%>

<% if @backend == 'sqlite' -%>
DB = [ backend = "sqlite" ]
<% end -%>

<% if @backend == 'mysql' -%>
# Sample configuration for MySQL
DB = [ backend = "mysql",
    server  = "<%= scope.lookupvar('one::oned_db_host') %>",
    port    = 3306,
    user    = "<%= scope.lookupvar('one::oned_db_user') %>",
    passwd  = "<%= scope.lookupvar('one::oned_db_password') %>",
    db_name = "<%= scope.lookupvar('one::oned_db') %>" ]
<% end -%>

<% if scope.lookupvar('one::version_gte_5_0') -%>
VNC_PORTS = [
    START    = 5900
#    RESERVED = "6800, 6801, 9869"
]
<% else %>
VNC_BASE_PORT = 5900
<% end -%>

VM_SUBMIT_ON_HOLD = "<%= scope.lookupvar('one::oned::config::oned_vm_submit_on_hold') %>"

#*******************************************************************************
# Federation configuration attributes
#-------------------------------------------------------------------------------
# Control the federation capabilities of oned. Operation in a federated setup
# requires a special DB configuration.
#
#  FEDERATION: Federation attributes
#   MODE: Operation mode of this oned.
#       STANDALONE no federated.This is the default operational mode
#       MASTER     this oned is the master zone of the federation
#       SLAVE      this oned is a slave zone
#   ZONE_ID: The zone ID as returned by onezone command
#   MASTER_ONED: The xml-rpc endpoint of the master oned, e.g.
#   http://master.one.org:2633/RPC2
#*******************************************************************************

FEDERATION = [
    MODE = "STANDALONE",
    ZONE_ID = 0,
    MASTER_ONED = ""
]

<% if scope.lookupvar('one::version_gte_4_14') -%>
#*******************************************************************************
# Default showback cost
#-------------------------------------------------------------------------------
# The following attributes define the default cost for Virtual Machines that
# don't have a CPU, MEMORY or DISK cost. This is used by the oneshowback
# calculate method.
#*******************************************************************************

DEFAULT_COST = [
    CPU_COST    = 0,
    MEMORY_COST = 0,
    DISK_COST   = 0
]
<% end -%>

#*******************************************************************************
# XML-RPC server configuration
#-------------------------------------------------------------------------------
#  These are configuration parameters for oned's xmlrpc-c server
#
#  MAX_CONN: Maximum number of simultaneous TCP connections the server
#  will maintain
#
#  MAX_CONN_BACKLOG: Maximum number of TCP connections the operating system
#  will accept on the server's behalf without the server accepting them from
#  the operating system
#
#  KEEPALIVE_TIMEOUT: Maximum time in seconds that the server allows a
#  connection to be open between RPCs
#
#  KEEPALIVE_MAX_CONN: Maximum number of RPCs that the server will execute on
#  a single connection
#
#  TIMEOUT: Maximum time in seconds the server will wait for the client to
#  do anything while processing an RPC. This timeout will be also used when
#  proxy calls to the master in a federation.
#
#  RPC_LOG: Create a separated log file for xml-rpc requests, in
#  "/var/log/one/one_xmlrpc.log".
#
#  MESSAGE_SIZE: Buffer size in bytes for XML-RPC responses.
#
#  LOG_CALL_FORMAT: Format string to log XML-RPC calls. Interpreted strings:
#     %i -- request id
#     %m -- method name
#     %u -- user id
#     %U -- user name
#     %l -- param list
#     %p -- user password
#     %g -- group id
#     %G -- group name
#     %a -- auth token
#     %% -- %
#*******************************************************************************

MAX_CONN           = <%= scope.lookupvar('one::xmlrpc_maxconn') %>
MAX_CONN_BACKLOG   = <%= scope.lookupvar('one::xmlrpc_maxconn_backlog') %>
KEEPALIVE_TIMEOUT  = <%= scope.lookupvar('one::xmlrpc_keepalive_timeout') %>
KEEPALIVE_MAX_CONN = <%= scope.lookupvar('one::xmlrpc_keepalive_max_conn') %>
TIMEOUT            = <%= scope.lookupvar('one::xmlrpc_timeout') %>
#RPC_LOG            = NO
#MESSAGE_SIZE       = 1073741824
#LOG_CALL_FORMAT    = "Req:%i UID:%u %m invoked %l"

#*******************************************************************************
# Physical Networks configuration
#*******************************************************************************
#  NETWORK_SIZE: Here you can define the default size for the virtual networks
#
#  MAC_PREFIX: Default MAC prefix to be used to create the auto-generated MAC
#  addresses is defined here (this can be overwritten by the Virtual Network
#  template)
<% if scope.lookupvar('one::version_gte_5_0') -%>
#
#  VLAN_IDS: VLAN ID pool for the automatic VLAN_ID assignment. This pool
#  is for 802.1Q networks (Open vSwitch and 802.1Q drivers). The driver
#  will try first to allocate VLAN_IDS[START] + VNET_ID
#     start: First VLAN_ID to use
#     reserved: Comma separated list of VLAN_IDs
#
# VXLAN_IDS: Automatic VXLAN Network ID (VNI) assignment. This is used
# for vxlan networks.
#     start: First VNI to use
#     NOTE: reserved is not supported by this pool
<% end -%>
#*******************************************************************************<commit_msg>5.2 does have reserved vlan id ranges<commit_after>#*******************************************************************************
#                       OpenNebula Configuration file
#*******************************************************************************

#*******************************************************************************
# Daemon configuration attributes
#-------------------------------------------------------------------------------
#  MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions.
#  MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.
#
#  MONITORING_INTERVAL: Time in seconds between host and VM monitorization.
#
#  MONITORING_THREADS: Max. number of threads used to process monitor messages
#
#  HOST_PER_INTERVAL: Number of hosts monitored in each interval.
#  HOST_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
#  information. Use 0 to disable HOST monitoring recording.
#
#  VM_INDIVIDUAL_MONITORING: VM monitoring information is obtained along with the
#  host information. For some custom monitor drivers you may need activate the
#  individual VM monitoring process.
#  VM_PER_INTERVAL: Number of VMs monitored in each interval, if the individual
#  VM monitoring is set to yes.
#  VM_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
#  information. Use 0 to disable VM monitoring recording.
#
#  SCRIPTS_REMOTE_DIR: Remote path to store the monitoring and VM management
#  scripts.
#
#  PORT: Port where oned will listen for xmlrpc calls.
<% if scope.lookupvar('one::version_gte_4_14') -%>
#  LISTEN_ADDRESS: Host IP to listen on for xmlrpc calls (default: all IPs).
<% end -%>
#
#  DB: Configuration attributes for the database backend
#   backend : can be sqlite or mysql (default is sqlite)
#   server  : (mysql) host name or an IP address for the MySQL server
#   port    : (mysql) port for the connection to the server.
#                     If set to 0, the default port is used.
#   user    : (mysql) user's MySQL login ID
#   passwd  : (<PASSWORD>) the <PASSWORD> <PASSWORD>
#   db_name : (mysql) the database name
#
<% if scope.lookupvar('one::version_gte_5_0') -%>
#  VNC_PORTS: VNC port pool for automatic VNC port assignment, if possible the
#  port will be set to ``START`` + ``VMID``
#   start   : first port to assign
#   reserved: comma separated list of ports
<% else %>
#  VNC_BASE_PORT: VNC ports for VMs can be automatically set to VNC_BASE_PORT +
#  VMID
<% end %>
#
#  LOG: Configuration for the logging system
#   system: defines the logging system:
#      file      to log in the oned.log file
#      syslog    to use the syslog facilities
<% if scope.lookupvar('one::version_gte_5_0') -%>
#      std       to use the default log stream (stderr) to use with systemd
<% end -%>
#   debug_level: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
#
#  VM_SUBMIT_ON_HOLD: Forces VMs to be created on hold state instead of pending.
#  Values: YES or NO.
#*******************************************************************************

LOG = [
  system      = "<%= scope.lookupvar('one::oned_log_system') %>",
  debug_level = <%= @debug_level %>
]

#MANAGER_TIMER = 30

MONITORING_INTERVAL = <%= scope.lookupvar('one::monitoring_interval') %>
MONITORING_THREADS  = <%= scope.lookupvar('one::monitoring_threads') %>

#HOST_PER_INTERVAL               = 15
#HOST_MONITORING_EXPIRATION_TIME = 43200

#VM_INDIVIDUAL_MONITORING      = "no"
#VM_PER_INTERVAL               = 5
#VM_MONITORING_EXPIRATION_TIME = 14400

SCRIPTS_REMOTE_DIR=/var/tmp/one

PORT = <%= scope.lookupvar('one::oned_port') %>

<% if scope.lookupvar('one::version_gte_4_14') -%>
LISTEN_ADDRESS = "<%= scope.lookupvar('one::oned_listen_address') %>"
<% end -%>

<% if @backend == 'sqlite' -%>
DB = [ backend = "sqlite" ]
<% end -%>

<% if @backend == 'mysql' -%>
# Sample configuration for MySQL
DB = [ backend = "mysql",
    server  = "<%= scope.lookupvar('one::oned_db_host') %>",
    port    = 3306,
    user    = "<%= scope.lookupvar('one::oned_db_user') %>",
    passwd  = "<%= scope.lookupvar('one::oned_db_password') %>",
    db_name = "<%= scope.lookupvar('one::oned_db') %>" ]
<% end -%>

<% if scope.lookupvar('one::version_gte_5_0') -%>
VNC_PORTS = [
    START    = 5900
#    RESERVED = "6800, 6801, 9869"
]
<% else %>
VNC_BASE_PORT = 5900
<% end -%>

VM_SUBMIT_ON_HOLD = "<%= scope.lookupvar('one::oned::config::oned_vm_submit_on_hold') %>"

#*******************************************************************************
# Federation configuration attributes
#-------------------------------------------------------------------------------
# Control the federation capabilities of oned. Operation in a federated setup
# requires a special DB configuration.
#
#  FEDERATION: Federation attributes
#   MODE: Operation mode of this oned.
#       STANDALONE no federated.This is the default operational mode
#       MASTER     this oned is the master zone of the federation
#       SLAVE      this oned is a slave zone
#   ZONE_ID: The zone ID as returned by onezone command
#   MASTER_ONED: The xml-rpc endpoint of the master oned, e.g.
#   http://master.one.org:2633/RPC2
#*******************************************************************************

FEDERATION = [
    MODE = "STANDALONE",
    ZONE_ID = 0,
    MASTER_ONED = ""
]

<% if scope.lookupvar('one::version_gte_4_14') -%>
#*******************************************************************************
# Default showback cost
#-------------------------------------------------------------------------------
# The following attributes define the default cost for Virtual Machines that
# don't have a CPU, MEMORY or DISK cost. This is used by the oneshowback
# calculate method.
#*******************************************************************************

DEFAULT_COST = [
    CPU_COST    = 0,
    MEMORY_COST = 0,
    DISK_COST   = 0
]
<% end -%>

#*******************************************************************************
# XML-RPC server configuration
#-------------------------------------------------------------------------------
#  These are configuration parameters for oned's xmlrpc-c server
#
#  MAX_CONN: Maximum number of simultaneous TCP connections the server
#  will maintain
#
#  MAX_CONN_BACKLOG: Maximum number of TCP connections the operating system
#  will accept on the server's behalf without the server accepting them from
#  the operating system
#
#  KEEPALIVE_TIMEOUT: Maximum time in seconds that the server allows a
#  connection to be open between RPCs
#
#  KEEPALIVE_MAX_CONN: Maximum number of RPCs that the server will execute on
#  a single connection
#
#  TIMEOUT: Maximum time in seconds the server will wait for the client to
#  do anything while processing an RPC. This timeout will be also used when
#  proxy calls to the master in a federation.
#
#  RPC_LOG: Create a separated log file for xml-rpc requests, in
#  "/var/log/one/one_xmlrpc.log".
#
#  MESSAGE_SIZE: Buffer size in bytes for XML-RPC responses.
#
#  LOG_CALL_FORMAT: Format string to log XML-RPC calls. Interpreted strings:
#     %i -- request id
#     %m -- method name
#     %u -- user id
#     %U -- user name
#     %l -- param list
#     %p -- user password
#     %g -- group id
#     %G -- group name
#     %a -- auth token
#     %% -- %
#*******************************************************************************

MAX_CONN           = <%= scope.lookupvar('one::xmlrpc_maxconn') %>
MAX_CONN_BACKLOG   = <%= scope.lookupvar('one::xmlrpc_maxconn_backlog') %>
KEEPALIVE_TIMEOUT  = <%= scope.lookupvar('one::xmlrpc_keepalive_timeout') %>
KEEPALIVE_MAX_CONN = <%= scope.lookupvar('one::xmlrpc_keepalive_max_conn') %>
TIMEOUT            = <%= scope.lookupvar('one::xmlrpc_timeout') %>
#RPC_LOG            = NO
#MESSAGE_SIZE       = 1073741824
#LOG_CALL_FORMAT    = "Req:%i UID:%u %m invoked %l"

#*******************************************************************************
# Physical Networks configuration
#*******************************************************************************
#  NETWORK_SIZE: Here you can define the default size for the virtual networks
#
#  MAC_PREFIX: Default MAC prefix to be used to create the auto-generated MAC
#  addresses is defined here (this can be overwritten by the Virtual Network
#  template)
<% if scope.lookupvar('one::version_gte_5_0') -%>
#
#  VLAN_IDS: VLAN ID pool for the automatic VLAN_ID assignment. This pool
#  is for 802.1Q networks (Open vSwitch and 802.1Q drivers). The driver
#  will try first to allocate VLAN_IDS[START] + VNET_ID
#     start: First VLAN_ID to use
#     reserved: Comma separated list of VLAN_IDs or ranges. Two numbers
#     separated by a colon indicate a range.
#
# VXLAN_IDS: Automatic VXLAN Network ID (VNI) assignment. This is used
# for vxlan networks.
#     start: First VNI to use
#     NOTE: reserved is not supported by this pool
<% end -%>
#*******************************************************************************
{'fraction_non_alphanumeric': 0.2398303666090062, 'fraction_numerical': 0.010155683276602868, 'mean_word_length': 3.538364142820967, 'pattern_counts': {'":': 0, '<': 78, '<?xml version=': 0, '>': 78, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7432329', 'n_tokens_mistral': 5447, 'n_tokens_neox': 5003, 'n_words': 1652}