This file is indexed.

/etc/one/oned.conf is in opennebula 4.12.3+dfsg-3.1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
#*******************************************************************************
#                       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.
#
#  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
#
#  VNC_BASE_PORT: VNC ports for VMs can be automatically set to VNC_BASE_PORT +
#  VMID
#
#  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
#   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      = "file",
  debug_level = 3
]

#MANAGER_TIMER = 30

MONITORING_INTERVAL = 60
MONITORING_THREADS  = 50

#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 = 2633

DB = [ backend = "sqlite" ]

# Sample configuration for MySQL
# DB = [ backend = "mysql",
#        server  = "localhost",
#        port    = 0,
#        user    = "oneadmin",
#        passwd  = "oneadmin",
#        db_name = "opennebula" ]

VNC_BASE_PORT = 5900

#VM_SUBMIT_ON_HOLD = "NO"

#*******************************************************************************
# 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 = ""
]

#*******************************************************************************
# Default showback cost
#-------------------------------------------------------------------------------
# The following attributes define the default cost for Virtual Machines that
# don't have a CPU or MEMORY cost. This is used by the oneshowback calculate
# method.
#*******************************************************************************

DEFAULT_COST = [
    CPU_COST    = 0,
    MEMORY_COST = 0
]

#*******************************************************************************
# 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
#
#  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           = 15
#MAX_CONN_BACKLOG   = 15
#KEEPALIVE_TIMEOUT  = 15
#KEEPALIVE_MAX_CONN = 30
#TIMEOUT            = 15
#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 overrided by the Virtual Network
#  template)
#*******************************************************************************

NETWORK_SIZE = 254

MAC_PREFIX   = "02:00"

#*******************************************************************************
# DataStore Configuration
#*******************************************************************************
#  DATASTORE_LOCATION: *Default* Path for Datastores in the hosts. It IS the
#  same for all the hosts in the cluster. DATASTORE_LOCATION IS ONLY FOR THE
#  HOSTS AND *NOT* THE FRONT-END. It defaults to /var/lib/one/datastores (or
#  $ONE_LOCATION/var/datastores in self-contained mode)
#
#  You can define a different DATASTORE_LOCATION in each cluster by updating
#  its properties with onecluster update.
#
#  DATASTORE_BASE_PATH: This is the base path for the SOURCE attribute of
#  the images registered in a Datastore. This is a default value, that can be
#  changed when the datastore is created.
#
#  DATASTORE_CAPACITY_CHECK: Checks that there is enough capacity before
#  creating a new imag. Defaults to Yes
#
#  DEFAULT_IMAGE_TYPE: This can take values
#       OS        Image file holding an operating system
#       CDROM     Image file holding a CDROM
#       DATABLOCK Image file holding a datablock,
#                 always created as an empty block
#
#  DEFAULT_DEVICE_PREFIX: This can be set to
#       hd        IDE prefix
#       sd        SCSI
#       xvd       XEN Virtual Disk
#       vd        KVM virtual disk
#
#  DEFAULT_CDROM_DEVICE_PREFIX: Same as above but for CDROM devices.
#*******************************************************************************

#DATASTORE_LOCATION  = /var/lib/one/datastores

#DATASTORE_BASE_PATH = /var/lib/one/datastores

DATASTORE_CAPACITY_CHECK = "yes"

DEFAULT_IMAGE_TYPE    = "OS"
DEFAULT_DEVICE_PREFIX = "hd"

DEFAULT_CDROM_DEVICE_PREFIX = "hd"

#*******************************************************************************
# Information Driver Configuration
#*******************************************************************************
# You can add more information managers with different configurations but make
# sure it has different names.
#
#   name      : name for this information manager
#
#   executable: path of the information driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#
#   arguments : for the driver executable, usually a probe configuration file,
#               can be an absolute path or relative to $ONE_LOCATION/etc (or
#               /etc/one/ if OpenNebula was installed in /)
#*******************************************************************************

#-------------------------------------------------------------------------------
#  Information Collector for KVM and Xen IM's.
#-------------------------------------------------------------------------------
#  This driver CANNOT BE ASSIGNED TO A HOST, and needs to be used with KVM or
#  Xen drivers
#    -h  prints this help.
#    -a  Address to bind the collectd sockect (defults 0.0.0.0)
#    -p  UDP port to listen for monitor information (default 4124)
#    -f  Interval in seconds to flush collected information (default 5)
#    -t  Number of threads for the server (defult 50)
#    -i  Time in seconds of the monitorization push cycle. This parameter must
#        be smaller than MONITORING_INTERVAL, otherwise push monitorization will
#        not be effective.
#-------------------------------------------------------------------------------
IM_MAD = [
      name       = "collectd",
      executable = "collectd",
      arguments  = "-p 4124 -f 5 -t 50 -i 20" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  KVM UDP-push Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
IM_MAD = [
      name       = "kvm",
      executable = "one_im_ssh",
      arguments  = "-r 3 -t 15 kvm" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  KVM SSH-pull Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
# IM_MAD = [
#       name       = "kvm",
#       executable = "one_im_ssh",
#       arguments  = "-r 3 -t 15 kvm-probes" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  XEN UDP-push Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------

# Driver for Xen 3.x
#IM_MAD = [
#    name       = "xen",
#    executable = "one_im_ssh",
#    arguments  = "-r 3 -t 15 xen3" ]

# Driver for Xen 4.x
#IM_MAD = [
#    name       = "xen",
#    executable = "one_im_ssh",
#    arguments  = "-r 3 -t 15 xen4" ]

#-------------------------------------------------------------------------------
#  XEN SSH-pull Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------

# Driver for Xen 3.x
#IM_MAD = [
#    name       = "xen",
#    executable = "one_im_ssh",
#    arguments  = "-r 0 -t 15 xen3-probes" ]

# Driver for Xen 4.x
#IM_MAD = [
#    name       = "xen",
#    executable = "one_im_ssh",
#    arguments  = "-r 0 -t 15 xen4-probes" ]

#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  VMware Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#IM_MAD = [
#      name       = "vmware",
#      executable = "one_im_sh",
#      arguments  = "-c -t 15 -r 0 vmware" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  vCenter Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#IM_MAD = [
#      name       = "vcenter",
#      executable = "one_im_sh",
#      arguments  = "-c -t 15 -r 0 vcenter" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  EC2 Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#IM_MAD = [
#      name       = "ec2",
#      executable = "one_im_sh",
#      arguments  = "-c -t 1 -r 0 ec2" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  SoftLayer Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#IM_MAD = [
#      name       = "sl",
#      executable = "one_im_sh",
#      arguments  = "-c -t 1 -r 0 sl" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Azure Information Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#IM_MAD = [
#      name       = "az",
#      executable = "one_im_sh",
#      arguments  = "-c -t 1 -r 0 az" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Dummy Information Driver Manager Configuration
#-------------------------------------------------------------------------------
#IM_MAD = [ name="dummy", executable="one_im_dummy"]
#-------------------------------------------------------------------------------

#*******************************************************************************
# Virtualization Driver Configuration
#*******************************************************************************
# You can add more virtualization managers with different configurations but
# make sure it has different names.
#
#   name      : name of the virtual machine manager driver
#
#   executable: path of the virtualization driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#
#   arguments : for the driver executable
#
#   default   : default values and configuration parameters for the driver, can
#               be an absolute path or relative to $ONE_LOCATION/etc (or
#               /etc/one/ if OpenNebula was installed in /)
#
#   type      : driver type, supported drivers: xen, kvm, xml
#*******************************************************************************

#-------------------------------------------------------------------------------
#  KVM Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#    -l <actions[=command_name]> actions executed locally, command can be
#        overridden for each action.
#        Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll
#        An example: "-l migrate=migrate_local,save"
#
#  Note: You can use type = "qemu" to use qemu emulated guests, e.g. if your
#  CPU does not have virtualization extensions or use nested Qemu-KVM hosts
#-------------------------------------------------------------------------------
VM_MAD = [
    name       = "kvm",
    executable = "one_vmm_exec",
    arguments  = "-t 15 -r 0 kvm",
    default    = "vmm_exec/vmm_exec_kvm.conf",
    type       = "kvm" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  XEN Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#    -l <actions[=command_name]> actions executed locally, command can be
#        overridden for each action.
#        Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll
#        An example: "-l migrate,save"
#-------------------------------------------------------------------------------

# Driver for Xen 3.x
#VM_MAD = [
#    name       = "xen",
#    executable = "one_vmm_exec",
#    arguments  = "-t 15 -r 0 xen3",
#    default    = "vmm_exec/vmm_exec_xen3.conf",
#    type       = "xen" ]

# Driver for Xen 4.x
#VM_MAD = [
#    name       = "xen",
#    executable = "one_vmm_exec",
#    arguments  = "-t 15 -r 0 xen4",
#    default    = "vmm_exec/vmm_exec_xen4.conf",
#    type       = "xen" ]

#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  VMware Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#VM_MAD = [
#    name       = "vmware",
#    executable = "one_vmm_sh",
#    arguments  = "-t 15 -r 0 vmware -s sh",
#    default    = "vmm_exec/vmm_exec_vmware.conf",
#    type       = "vmware" ]
#-------------------------------------------------------------------------------


#-------------------------------------------------------------------------------
#  vCenter Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of hosts monitored at the same time
#-------------------------------------------------------------------------------
#VM_MAD = [
#    name       = "vcenter",
#    executable = "one_vmm_sh",
#    arguments  = "-p -t 15 -r 0 vcenter -s sh",
#    default    = "vmm_exec/vmm_exec_vcenter.conf",
#    type       = "xml" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  EC2 Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of actions performed at the same time
#-------------------------------------------------------------------------------
#VM_MAD = [
#    name       = "ec2",
#    executable = "one_vmm_sh",
#    arguments  = "-t 15 -r 0 ec2",
#    type       = "xml" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  SoftLayer Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of actions performed at the same time
#-------------------------------------------------------------------------------
#VM_MAD = [
#    name       = "sl",
#    executable = "one_vmm_sh",
#    arguments  = "-t 15 -r 0 sl",
#    type       = "xml" ]
#-------------------------------------------------------------------------------

#  Azure Virtualization Driver Manager Configuration
#    -r number of retries when monitoring a host
#    -t number of threads, i.e. number of actions performed at the same time
#-------------------------------------------------------------------------------
#VM_MAD = [
#    name       = "az",
#    executable = "one_vmm_sh",
#    arguments  = "-t 15 -r 0 az",
#    type       = "xml" ]
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Dummy Virtualization Driver Configuration
#-------------------------------------------------------------------------------
#VM_MAD = [ name="dummy", executable="one_vmm_dummy", type="xml" ]
#-------------------------------------------------------------------------------

#*******************************************************************************
# Transfer Manager Driver Configuration
#*******************************************************************************
# You can add more transfer managers with different configurations but make
# sure it has different names.
#   name      : name for this transfer driver
#
#   executable: path of the transfer driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#   arguments :
#       -t: number of threads, i.e. number of transfers made at the same time
#       -d: list of transfer drivers separated by commas, if not defined all the
#           drivers available will be enabled
#*******************************************************************************

TM_MAD = [
    executable = "one_tm",
    arguments = "-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph,dev"
]

#*******************************************************************************
# Datastore Driver Configuration
#*******************************************************************************
# Drivers to manage the datastores, specialized for the storage backend
#   executable: path of the transfer driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#
#   arguments : for the driver executable
#       -t number of threads, i.e. number of repo operations at the same time
#       -d datastore mads separated by commas
#*******************************************************************************

DATASTORE_MAD = [
    executable = "one_datastore",
    arguments  = "-t 15 -d dummy,fs,vmfs,lvm,ceph,dev"
]

#*******************************************************************************
# Hook Manager Configuration
#*******************************************************************************
# The Driver (HM_MAD)
# -----------------------------------------------
#
# Used to execute the Hooks:
#   executable: path of the hook driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#
#   arguments : for the driver executable, can be an absolute path or relative
#               to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was installed
#               in /)
#
# Virtual Machine Hooks (VM_HOOK)
# -------------------------------
#
# Defined by:
#   name      : for the hook, useful to track the hook (OPTIONAL)
#   on        : when the hook should be executed,
#               - CREATE, when the VM is created (onevm create)
#               - PROLOG, when the VM is in the prolog state
#               - RUNNING, after the VM is successfully booted
#               - UNKNOWN, when the VM is in the unknown state
#               - SHUTDOWN, after the VM is shutdown
#               - STOP, after the VM is stopped (including VM image transfers)
#               - DONE, after the VM is deleted or shutdown
#               - FAILED, when the VM enters the failed state
#               - CUSTOM, user defined specific STATE and LCM_STATE combination
#                 of states to trigger the hook.
#   command   : path is relative to $ONE_LOCATION/var/remotes/hook
#               (self-contained) or to /var/lib/one/remotes/hook (system-wide).
#               That directory will be copied on the hosts under
#               SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
#               on the target host
#   arguments : for the hook. You can access to VM information with $
#               - $ID, the ID of the virtual machine
#               - $TEMPLATE, the VM template in xml and base64 encoded
#               - $PREV_STATE, the previous STATE of the Virtual Machine
#               - $PREV_LCM_STATE, the previous LCM STATE of the Virtual Machine
#   remote    : values,
#               - YES, The hook is executed in the host where the VM was
#                 allocated
#               - NO, The hook is executed in the OpenNebula server (default)
#
# Example Virtual Machine Hook
# ----------------------------
#
# VM_HOOK = [
#   name      = "advanced_hook",
#   on        = "CUSTOM",
#   state     = "ACTIVE",
#   lcm_state = "BOOT_UNKNOWN",
#   command   = "log.rb",
#   arguments = "$ID $PREV_STATE $PREV_LCM_STATE" ]
#
# Host Hooks (HOST_HOOK)
# -------------------------------
#
# Defined by:
#   name      : for the hook, useful to track the hook (OPTIONAL)
#   on        : when the hook should be executed,
#               - CREATE, when the Host is created (onehost create)
#               - ERROR, when the Host enters the error state
#               - DISABLE, when the Host is disabled
#   command   : path is relative to $ONE_LOCATION/var/remotes/hook
#               (self-contained) or to /var/lib/one/remotes/hook (system-wide).
#               That directory will be copied on the hosts under
#               SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
#               on the target host.
#   arguments : for the hook. You can use the following Host information:
#               - $ID, the ID of the host
#               - $TEMPLATE, the Host template in xml and base64 encoded
#   remote    : values,
#               - YES, The hook is executed in the host
#               - NO, The hook is executed in the OpenNebula server (default)
#
# Virtual Network (VNET_HOOK)
# User (USER_HOOK)
# Group (GROUP_HOOK)
# Image (IMAGE_HOOK)
# -------------------------------
#
# These hooks are executed when one of the referring entities are created or
# removed. Each hook is defined by:
#   name      : for the hook, useful to track the hook (OPTIONAL)
#   on        : when the hook should be executed,
#               - CREATE, when the vnet is created
#               - REMOVE, when the vnet is removed
#   command   : path is relative to $ONE_LOCATION/var/remotes/hook
#               (self-contained) or to /var/lib/one/remotes/hook (system-wide).
#               That directory will be copied on the hosts under
#               SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
#               on the target host.
#   arguments : for the hook. You can use the following Host information:
#               - $ID, the ID of the host
#               - $TEMPLATE, the vnet template in xml and base64 encoded
#
# Please note: In a Federation, User and Group hooks can only be defined in
# the master OpenNebula.
#-------------------------------------------------------------------------------
HM_MAD = [
    executable = "one_hm" ]

#*******************************************************************************
# Fault Tolerance Hooks
#*******************************************************************************
# This hook is used to perform recovery actions when a host fails.
# Script to implement host failure tolerance
#   It can be set to
#           -m migrate VMs to another host. Only for images in shared storage
#           -r recreate VMs running in the host. State will be lost.
#           -d delete VMs running in the host
#   Additional flags
#           -f force resubmission of suspended VMs
#           -p <n> avoid resubmission if host comes
#                  back after n monitoring cycles
#*******************************************************************************
#
#HOST_HOOK = [
#    name      = "error",
#    on        = "ERROR",
#    command   = "ft/host_error.rb",
#    arguments = "$ID -m -p 5",
#    remote    = "no" ]
#-------------------------------------------------------------------------------
# These two hooks can be used to automatically delete or resubmit VMs that reach
# the "failed" state. This way, the administrator doesn't have to interact
# manually to release its resources or retry the deployment.
#
#
# Only one of them should be uncommented.
#-------------------------------------------------------------------------------
#
#VM_HOOK = [
#   name      = "on_failure_delete",
#   on        = "FAILED",
#   command   = "/usr/bin/env onevm delete",
#   arguments = "$ID" ]
#
#VM_HOOK = [
#   name      = "on_failure_recreate",
#   on        = "FAILED",
#   command   = "/usr/bin/env onevm delete --recreate",
#   arguments = "$ID" ]
#-------------------------------------------------------------------------------

#*******************************************************************************
# Auth Manager Configuration
#*******************************************************************************
# AUTH_MAD: The Driver that will be used to authenticate (authn) and
# authorize (authz) OpenNebula requests. If defined OpenNebula will use the
# built-in auth policies.
#
#   executable: path of the auth driver executable, can be an
#               absolute path or relative to $ONE_LOCATION/lib/mads (or
#               /usr/lib/one/mads/ if OpenNebula was installed in /)
#
#   authn     : list of authentication modules separated by commas, if not
#               defined all the modules available will be enabled
#   authz     : list of authentication modules separated by commas
#
# SESSION_EXPIRATION_TIME: Time in seconds to keep an authenticated token as
# valid. During this time, the driver is not used. Use 0 to disable session
# caching
#
# ENABLE_OTHER_PERMISSIONS: Whether or not users can set the permissions for
# 'other', so publishing or sharing resources with others. Users in the oneadmin
# group will still be able to change these permissions. Values: YES or NO.
#
# DEFAULT_UMASK: Similar to Unix umask, sets the default resources permissions.
# Its format must be 3 octal digits. For example a umask of 137 will set
# the new object's permissions to 640 "um- u-- ---"
#*******************************************************************************

AUTH_MAD = [
    executable = "one_auth_mad",
    authn = "ssh,x509,ldap,server_cipher,server_x509"
]

SESSION_EXPIRATION_TIME = 900

#ENABLE_OTHER_PERMISSIONS = "YES"

DEFAULT_UMASK = 177

#*******************************************************************************
# OneGate
#   ONEGATE_ENDPOINT: The URL for the onegate server (the Gate to OpenNebula for
#   VMs). The onegate server is started using a separate command. The endpoint
#   MUST be consistent with the values in onegate-server.conf
#*******************************************************************************

#ONEGATE_ENDPOINT = "http://frontend:5030"

#*******************************************************************************
# Restricted Attributes Configuration
#*******************************************************************************
# The following attributes are restricted to users outside the oneadmin group
#*******************************************************************************

VM_RESTRICTED_ATTR = "CONTEXT/FILES"
VM_RESTRICTED_ATTR = "NIC/MAC"
VM_RESTRICTED_ATTR = "NIC/VLAN_ID"
VM_RESTRICTED_ATTR = "NIC/BRIDGE"
VM_RESTRICTED_ATTR = "NIC_DEFAULT/MAC"
VM_RESTRICTED_ATTR = "NIC_DEFAULT/VLAN_ID"
VM_RESTRICTED_ATTR = "NIC_DEFAULT/BRIDGE"
VM_RESTRICTED_ATTR = "DISK/TOTAL_BYTES_SEC"
VM_RESTRICTED_ATTR = "DISK/READ_BYTES_SEC"
VM_RESTRICTED_ATTR = "DISK/WRITE_BYTES_SEC"
VM_RESTRICTED_ATTR = "DISK/TOTAL_IOPS_SEC"
VM_RESTRICTED_ATTR = "DISK/READ_IOPS_SEC"
VM_RESTRICTED_ATTR = "DISK/WRITE_IOPS_SEC"
VM_RESTRICTED_ATTR = "CPU_COST"
VM_RESTRICTED_ATTR = "MEMORY_COST"

#VM_RESTRICTED_ATTR = "RANK"
#VM_RESTRICTED_ATTR = "SCHED_RANK"
#VM_RESTRICTED_ATTR = "REQUIREMENTS"
#VM_RESTRICTED_ATTR = "SCHED_REQUIREMENTS"

IMAGE_RESTRICTED_ATTR = "SOURCE"

#*******************************************************************************
# The following restricted attributes only apply to VNets that are a reservation.
# Normal VNets do not have restricted attributes.
#*******************************************************************************

VNET_RESTRICTED_ATTR = "PHYDEV"
VNET_RESTRICTED_ATTR = "VLAN_ID"
VNET_RESTRICTED_ATTR = "VLAN"
VNET_RESTRICTED_ATTR = "BRIDGE"

VNET_RESTRICTED_ATTR = "AR/PHYDEV"
VNET_RESTRICTED_ATTR = "AR/VLAN_ID"
VNET_RESTRICTED_ATTR = "AR/VLAN"
VNET_RESTRICTED_ATTR = "AR/BRIDGE"

#*******************************************************************************
# Inherited Attributes Configuration
#*******************************************************************************
# The following attributes will be copied from the resource template to the
# instantiated VMs. More than one attribute can be defined.
#
# INHERIT_IMAGE_ATTR: Attribute to be copied from the Image template
# to each VM/DISK.
#
# INHERIT_DATASTORE_ATTR: Attribute to be copied from the Datastore template
# to each VM/DISK.
#
# INHERIT_VNET_ATTR: Attribute to be copied from the Network template
# to each VM/NIC.
#*******************************************************************************

#INHERIT_IMAGE_ATTR     = "EXAMPLE"
#INHERIT_IMAGE_ATTR     = "SECOND_EXAMPLE"
#INHERIT_DATASTORE_ATTR = "COLOR"
#INHERIT_VNET_ATTR      = "BANDWIDTH_THROTTLING"

INHERIT_DATASTORE_ATTR  = "CEPH_HOST"
INHERIT_DATASTORE_ATTR  = "CEPH_SECRET"
INHERIT_DATASTORE_ATTR  = "CEPH_USER"

INHERIT_DATASTORE_ATTR  = "GLUSTER_HOST"
INHERIT_DATASTORE_ATTR  = "GLUSTER_VOLUME"

INHERIT_VNET_ATTR       = "VLAN_TAGGED_ID"
INHERIT_VNET_ATTR       = "BRIDGE_OVS"
INHERIT_VNET_ATTR       = "FILTER_IP_SPOOFING"
INHERIT_VNET_ATTR       = "FILTER_MAC_SPOOFING"

#*******************************************************************************
# Transfer Manager Driver Behavior Configuration
#*******************************************************************************
# The  configuration for each driver is defined in TM_MAD_CONF. These
# values are used when creating a new datastore and should not be modified
# since they define the datastore behavior.
#   name      : name of the transfer driver, listed in the -d option of the
#               TM_MAD section
#   ln_target : determines how the persistent images will be cloned when
#               a new VM is instantiated.
#       NONE: The image will be linked and no more storage capacity will be used
#       SELF: The image will be cloned in the Images datastore
#       SYSTEM: The image will be cloned in the System datastore
#   clone_target : determines how the non persistent images will be
#                  cloned when a new VM is instantiated.
#       NONE: The image will be linked and no more storage capacity will be used
#       SELF: The image will be cloned in the Images datastore
#       SYSTEM: The image will be cloned in the System datastore
#   shared : determines if the storage holding the system datastore is shared
#            among the different hosts or not. Valid values: "yes" or "no"
#*******************************************************************************

TM_MAD_CONF = [
    name = "dummy", ln_target = "NONE", clone_target = "SYSTEM", shared = "yes"
]

TM_MAD_CONF = [
    name = "lvm", ln_target = "NONE", clone_target = "SELF", shared = "yes"
]

TM_MAD_CONF = [
    name = "shared", ln_target = "NONE", clone_target = "SYSTEM", shared = "yes"
]

TM_MAD_CONF = [
    name = "fs_lvm", ln_target = "SYSTEM", clone_target = "SYSTEM", shared="yes"
]

TM_MAD_CONF = [
    name = "qcow2", ln_target = "NONE", clone_target = "SYSTEM", shared = "yes"
]

TM_MAD_CONF = [
    name = "ssh", ln_target = "SYSTEM", clone_target = "SYSTEM", shared = "no"
]

TM_MAD_CONF = [
    name = "vmfs", ln_target = "NONE", clone_target= "SYSTEM", shared = "yes"
]

TM_MAD_CONF = [
    name = "ceph", ln_target = "NONE", clone_target = "SELF", shared = "yes"
]

TM_MAD_CONF = [
    name = "dev", ln_target = "NONE", clone_target = "NONE", shared = "yes"
]