forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli_frontend.ml
3972 lines (3937 loc) · 112 KB
/
cli_frontend.ml
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
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(*
* Copyright (C) 2006-2009 Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)
(**
* @group Command-Line Interface (CLI)
*)
(* ----------------------------------------------------------------------
XE-CLI Front End
---------------------------------------------------------------------- *)
open Cli_cmdtable
module D = Debug.Make (struct let name = "cli" end)
open D
(* ---------------------------------------------------------------------
Command table
--------------------------------------------------------------------- *)
let vmselectors = ["<vm-selectors>"]
let vmselectorsinfo =
"VMs can be specified by filtering the full list of VMs on the values of \
zero or more fields. For example, specifying 'uuid=<some_uuid>' will select \
only the VM with that uuid, and 'power-state=halted' will select only VMs \
whose 'power-state' field is equal to 'halted'. The special pseudo-field \
'vm' matches either of name-label or uuid. Where multiple VMs are matching, \
the option '--multiple' must be specified to perform the operation. The \
full list of fields that can be matched can be obtained by the command 'xe \
vm-list params=all'. If no parameters to select VMs are given, the \
operation will be performed on all VMs."
let hostselectors = ["<host-selectors>"]
let hostselectorsinfo =
" Hosts can be specified by filtering the full list of hosts on the values \
of zero or more fields. For example, specifying 'uuid=<some_uuid>' will \
select only the host with that uuid, and 'enabled=true' will select only \
hosts whose 'enabled' field is equal to 'true'. The special pseudo-field \
'host' matches any of hostname, name-label or uuid. Where multiple hosts \
are matching, and the operation can be performed on multiple hosts, the \
option '--multiple' must be specified to perform the operation. The full \
list of fields that can be matched can be obtained by the command 'xe \
host-list params=all'. If no parameters to select hosts are given, the \
operation will be performed on all hosts."
let srselectors = ["<sr-selectors>"]
let srselectorsinfo =
" SRs can be specified by filtering the full list of SRs on the values of \
zero or more fields. For example, specifying 'uuid=<some_uuid>' will select \
only the sr with that uuid, and 'enabled=true' will select only srs whose \
'enabled' field is equal to 'true'. The special pseudo-field 'sr' matches \
either of name-label or uuid. Where multiple SRs are matching, and the \
operation can be performed on multiple SRs, the option '--multiple' must be \
specified to perform the operation. The full list of fields that can be \
matched can be obtained by the command 'xe sr-list params=all'. If no \
parameters to select SRs are given, the operation will be performed on all \
SRs."
let rec cmdtable_data : (string * cmd_spec) list =
[
( "blob-get"
, {
reqd= ["uuid"; "filename"]
; optn= []
; help= "Save the binary blob to the local filesystem"
; implementation= With_fd Cli_operations.blob_get
; flags= [Hidden]
}
)
; ( "blob-put"
, {
reqd= ["uuid"; "filename"]
; optn= []
; help= "Upload a binary blob to the xapi server"
; implementation= With_fd Cli_operations.blob_put
; flags= [Hidden]
}
)
; ( "blob-create"
, {
reqd= ["name"]
; optn=
[
"mime-type"
; "vm-uuid"
; "host-uuid"
; "sr-uuid"
; "network-uuid"
; "pool-uuid"
]
; help= "Create a binary blob to be associated with an API object"
; implementation= No_fd Cli_operations.blob_create
; flags= [Hidden]
}
)
; ( "message-create"
, {
reqd= ["name"; "priority"; "body"]
; optn= ["vm-uuid"; "host-uuid"; "sr-uuid"; "pool-uuid"]
; help=
"Create a message associated with a particular API object. Note \
exactly one of the optional parameters must be supplied."
; implementation= No_fd Cli_operations.message_create
; flags= []
}
)
; ( "message-destroy"
, {
reqd= []
; optn= ["uuid"; "uuids"]
; help= "Destroy one existing message or many"
; implementation= No_fd Cli_operations.message_destroy
; flags= []
}
)
; (* "host-introduce",
{
reqd=["name"; "address"; "remote-port"; "remote-username"; "remote-password"];
optn=["description"];
help="Introduce a remote host";
implementation=No_fd Cli_operations.host_introduce
};*)
( "pool-enable-binary-storage"
, {
reqd= []
; optn= []
; help=
"Enable the storage of binary data, including RRDs, messages and \
blobs."
; implementation= No_fd Cli_operations.pool_enable_binary_storage
; flags= [Hidden]
}
)
; ( "pool-disable-binary-storage"
, {
reqd= []
; optn= []
; help=
"Disable the storage of binary data. This will destroy any messages, \
RRDs and blobs stored across the pool."
; implementation= No_fd Cli_operations.pool_disable_binary_storage
; flags= [Hidden]
}
)
; ( "pool-designate-new-master"
, {
reqd= ["host-uuid"]
; optn= []
; help=
"Request an orderly handover of the role of master to another host."
; implementation= No_fd Cli_operations.pool_designate_new_master
; flags= []
}
)
; ( "pool-management-reconfigure"
, {
reqd= ["network-uuid"]
; optn= []
; help=
"Reconfigure the management network interface for all Hosts in the \
Pool"
; implementation= No_fd Cli_operations.pool_management_reconfigure
; flags= []
}
)
; ( "pool-sync-database"
, {
reqd= []
; optn= []
; help= "Synchronise the current database across all hosts in the pool."
; implementation= No_fd Cli_operations.pool_sync_database
; flags= []
}
)
; ( "pool-join"
, {
reqd= ["master-address"; "master-username"; "master-password"]
; optn= ["force"]
; help= "Instruct host to join an existing pool."
; implementation= No_fd Cli_operations.pool_join
; flags= []
}
)
; ( "pool-emergency-reset-master"
, {
reqd= ["master-address"]
; optn= []
; help= "Instruct slave to reset master address."
; implementation=
No_fd_local_session Cli_operations.pool_emergency_reset_master
; flags= [Neverforward]
}
)
; ( "pool-emergency-transition-to-master"
, {
reqd= []
; optn= ["force"]
; help=
"Instruct slave to become pool master. The operation will be ignored \
if this host is already master; the optional parameter '--force' \
will force the operation."
; implementation=
No_fd_local_session Cli_operations.pool_emergency_transition_to_master
; flags= [Neverforward]
}
)
; ( "pool-recover-slaves"
, {
reqd= []
; optn= []
; help=
"Instruct master to try and reset master-address of all slaves \
currently running in emergency mode."
; implementation= No_fd Cli_operations.pool_recover_slaves
; flags= []
}
)
; ( "pool-eject"
, {
reqd= ["host-uuid"]
; optn= []
; help= "Instruct host to leave an existing pool."
; implementation= With_fd Cli_operations.pool_eject
; flags= []
}
)
; ( "pool-dump-database"
, {
reqd= ["file-name"]
; optn= []
; help= "Download a dump of the pool database."
; implementation= With_fd Cli_operations.pool_dump_db
; flags= []
}
)
; ( "pool-restore-database"
, {
reqd= ["file-name"]
; optn= ["dry-run"]
; help= "Restore a dump of the pool database to the server."
; implementation= With_fd Cli_operations.pool_restore_db
; flags= []
}
)
; ( "pool-enable-external-auth"
, {
reqd= ["auth-type"; "service-name"]
; optn= ["uuid"; "config:"]
; help=
"Enables external authentication in all the hosts in a pool. Note \
that some values of auth-type will require particular config: \
values."
; implementation= No_fd Cli_operations.pool_enable_external_auth
; flags= []
}
)
; ( "pool-disable-external-auth"
, {
reqd= []
; optn= ["uuid"; "config:"]
; help= "Disables external authentication in all the hosts in a pool"
; implementation= No_fd Cli_operations.pool_disable_external_auth
; flags= []
}
)
; ( "pool-initialize-wlb"
, {
reqd=
[
"wlb_url"
; "wlb_username"
; "wlb_password"
; "xenserver_username"
; "xenserver_password"
]
; optn= []
; help=
"Initialize workload balancing for the current pool with the target \
wlb server"
; implementation= No_fd Cli_operations.pool_initialize_wlb
; flags= []
}
)
; ( "pool-deconfigure-wlb"
, {
reqd= []
; optn= []
; help= "Permanently remove the configuration for workload balancing"
; implementation= No_fd Cli_operations.pool_deconfigure_wlb
; flags= []
}
)
; ( "pool-send-wlb-configuration"
, {
reqd= []
; optn= ["config:"]
; help=
"Sets the pool optimization criteria for the workload balancing \
server"
; implementation= No_fd Cli_operations.pool_send_wlb_configuration
; flags= []
}
)
; ( "pool-retrieve-wlb-configuration"
, {
reqd= []
; optn= []
; help=
"Retrieves the pool optimization criteria from the workload \
balancing server"
; implementation= No_fd Cli_operations.pool_retrieve_wlb_configuration
; flags= []
}
)
; ( "pool-retrieve-wlb-recommendations"
, {
reqd= []
; optn= []
; help=
"Retrieves vm migrate recommendations for the pool from the workload \
balancing server"
; implementation= No_fd Cli_operations.pool_retrieve_wlb_recommendations
; flags= []
}
)
; ( "pool-retrieve-wlb-report"
, {
reqd= ["report"]
; optn= ["filename"]
; help= ""
; implementation= With_fd Cli_operations.pool_retrieve_wlb_report
; flags= [Neverforward]
}
)
; ( "pool-retrieve-wlb-diagnostics"
, {
reqd= []
; optn= ["filename"]
; help= ""
; implementation= With_fd Cli_operations.pool_retrieve_wlb_diagnostics
; flags= [Neverforward]
}
)
; ( "pool-send-test-post"
, {
reqd= ["dest-host"; "dest-port"; "body"]
; optn= []
; help=
"Send the given body to the given host and port, using HTTPS, and \
print the response. This is used for debugging the SSL layer."
; implementation= No_fd Cli_operations.pool_send_test_post
; flags= []
}
)
; ( "pool-certificate-install"
, {
reqd= ["filename"]
; optn= []
; help= "Install a TLS CA certificate, pool-wide."
; implementation= With_fd Cli_operations.pool_install_ca_certificate
; flags= [Deprecated ["Use pool-install-ca-certificate"]]
}
)
; ( "pool-certificate-uninstall"
, {
reqd= ["name"]
; optn= []
; help= "Uninstall a pool-wide TLS CA certificate."
; implementation= No_fd Cli_operations.pool_uninstall_ca_certificate
; flags= [Deprecated ["Use pool-uninstall-ca-certificate"]]
}
)
; ( "pool-install-ca-certificate"
, {
reqd= ["filename"]
; optn= []
; help= "Install a TLS CA certificate, pool-wide."
; implementation= With_fd Cli_operations.pool_install_ca_certificate
; flags= []
}
)
; ( "pool-uninstall-ca-certificate"
, {
reqd= ["name"]
; optn= []
; help= "Uninstall a pool-wide TLS CA certificate."
; implementation= No_fd Cli_operations.pool_uninstall_ca_certificate
; flags= []
}
)
; ( "pool-certificate-list"
, {
reqd= []
; optn= []
; help= "List the names of all installed TLS CA certificates."
; implementation= No_fd Cli_operations.pool_certificate_list
; flags= [Deprecated ["Use certificate-list type=ca"]]
}
)
; ( "pool-crl-install"
, {
reqd= ["filename"]
; optn= []
; help= "Install a TLS CA-issued Certificate Revocation List, pool-wide."
; implementation= With_fd Cli_operations.pool_crl_install
; flags= []
}
)
; ( "pool-crl-uninstall"
, {
reqd= ["name"]
; optn= []
; help= "Uninstall a pool-wide TLS CA-issued Certificate Revocation List."
; implementation= No_fd Cli_operations.pool_crl_uninstall
; flags= []
}
)
; ( "pool-crl-list"
, {
reqd= []
; optn= []
; help=
"List the names of all installed TLS CA-issued Certificate \
Revocation Lists."
; implementation= No_fd Cli_operations.pool_crl_list
; flags= []
}
)
; ( "pool-certificate-sync"
, {
reqd= []
; optn= []
; help=
"Copy the TLS CA certificates and CRLs of the master to all slaves."
; implementation= No_fd Cli_operations.pool_certificate_sync
; flags= []
}
)
; ( "pool-enable-tls-verification"
, {
reqd= []
; optn= []
; help= "Enable TLS certificate verification"
; implementation= No_fd Cli_operations.pool_enable_tls_verification
; flags= []
}
)
; ( "pool-enable-client-certificate-auth"
, {
reqd= ["name"]
; optn= []
; help= "Enable client certificate authentication on the pool"
; implementation= No_fd Cli_operations.pool_enable_client_certificate_auth
; flags= []
}
)
; ( "pool-disable-client-certificate-auth"
, {
reqd= []
; optn= []
; help= "Disable client certificate authentication on the pool"
; implementation=
No_fd Cli_operations.pool_disable_client_certificate_auth
; flags= []
}
)
; ( "pool-set-vswitch-controller"
, {
reqd= ["address"]
; optn= []
; help= "Set the IP address of the vswitch controller."
; implementation= No_fd Cli_operations.pool_set_vswitch_controller
; flags= [Hidden]
}
)
; ( "pool-disable-ssl-legacy"
, {
reqd= []
; optn= ["uuid"]
; help= "Set ssl-legacy to False on each host."
; implementation= No_fd Cli_operations.pool_disable_ssl_legacy
; flags= [Deprecated ["Legacy SSL no longer supported"]]
}
)
; ( "pool-secret-rotate"
, {
reqd= []
; optn= []
; help= "Change the pool secret"
; implementation= No_fd Cli_operations.pool_rotate_secret
; flags= []
}
)
; ( "pool-sync-updates"
, {
reqd= []
; optn= ["force"; "token"; "token-id"]
; help= "Sync updates from remote YUM repository, pool-wide."
; implementation= No_fd Cli_operations.pool_sync_updates
; flags= []
}
)
; ( "pool-reset-telemetry-uuid"
, {
reqd= []
; optn= []
; help= "Assign a new UUID for the pool's telemetry data."
; implementation= No_fd Cli_operations.pool_reset_telemetry_uuid
; flags= []
}
)
; ( "host-is-in-emergency-mode"
, {
reqd= []
; optn= []
; help= "Query the target host to discover if it is in emergency mode."
; implementation=
No_fd_local_session Cli_operations.host_is_in_emergency_mode
; flags= [Neverforward]
}
)
; ( "host-forget"
, {
reqd= ["uuid"]
; optn= []
; help=
"Forget about the host without contacting it explicitly. WARNING: \
this call is useful if the host to 'forget' is dead; however, if \
the host is live and part of the pool, you should consider using \
pool-eject instead."
; implementation= With_fd Cli_operations.host_forget
; flags= []
}
)
; ( "host-declare-dead"
, {
reqd= ["uuid"]
; optn= []
; help=
"Declare that the the host is dead without contacting it explicitly. \
WARNING: This call is dangerous and can cause data loss if the host \
is not actually dead"
; implementation= With_fd Cli_operations.host_declare_dead
; flags= []
}
)
; ( "host-disable"
, {
reqd= []
; optn= []
; help= "Disable the XE host."
; implementation= No_fd Cli_operations.host_disable
; flags= [Host_selectors]
}
)
; ( "host-sync-data"
, {
reqd= []
; optn= []
; help=
"Synchronise the non-database data stored on the pool master with \
the named XE host."
; implementation= No_fd Cli_operations.host_sync_data
; flags= [Host_selectors]
}
)
; ( "host-enable"
, {
reqd= []
; optn= []
; help= "Enable the XE host."
; implementation= No_fd Cli_operations.host_enable
; flags= [Host_selectors]
}
)
; ( "host-enable-local-storage-caching"
, {
reqd= ["sr-uuid"]
; optn= []
; help= "Enable local storage caching on the specified host"
; implementation= No_fd Cli_operations.host_enable_local_storage_caching
; flags= [Host_selectors]
}
)
; ( "host-disable-local-storage-caching"
, {
reqd= []
; optn= []
; help= "Disable local storage caching on the specified host"
; implementation= No_fd Cli_operations.host_disable_local_storage_caching
; flags= [Host_selectors]
}
)
; ( "pool-enable-local-storage-caching"
, {
reqd= ["uuid"]
; optn= []
; help= "Enable local storage caching across the pool"
; implementation= No_fd Cli_operations.pool_enable_local_storage_caching
; flags= []
}
)
; ( "pool-disable-local-storage-caching"
, {
reqd= ["uuid"]
; optn= []
; help= "Disable local storage caching across the pool"
; implementation= No_fd Cli_operations.pool_disable_local_storage_caching
; flags= []
}
)
; ( "pool-apply-edition"
, {
reqd= ["edition"]
; optn= ["uuid"; "license-server-address"; "license-server-port"]
; help= "Apply an edition across the pool"
; implementation= No_fd Cli_operations.pool_apply_edition
; flags= []
}
)
; ( "pool-configure-repository-proxy"
, {
reqd= ["proxy-url"]
; optn= ["proxy-username"; "proxy-password"]
; help= "Configure proxy for RPM package repositories"
; implementation= No_fd Cli_operations.pool_configure_repository_proxy
; flags= []
}
)
; ( "pool-disable-repository-proxy"
, {
reqd= []
; optn= []
; help= "Disable the proxy for RPM package repositories"
; implementation= No_fd Cli_operations.pool_disable_repository_proxy
; flags= []
}
)
; ( "host-shutdown"
, {
reqd= []
; optn= []
; help= "Shutdown the XE host."
; implementation= No_fd Cli_operations.host_shutdown
; flags= [Host_selectors]
}
)
; ( "host-reboot"
, {
reqd= []
; optn= []
; help= "Reboot the XE host."
; implementation= No_fd Cli_operations.host_reboot
; flags= [Host_selectors]
}
)
; ( "host-power-on"
, {
reqd= []
; optn= []
; help= "Power on the XE host."
; implementation= No_fd Cli_operations.host_power_on
; flags= [Host_selectors]
}
)
; ( "host-prepare-for-poweroff"
, {
reqd= []
; optn= []
; help= "Perform the necessary actions before host shutdown or reboot."
; implementation= No_fd Cli_operations.host_prepare_for_poweroff
; flags= [Hidden]
}
)
; ( "host-dmesg"
, {
reqd= []
; optn= []
; help= "Get xen dmesg of the XE host."
; implementation= No_fd Cli_operations.host_dmesg
; flags= [Host_selectors]
}
)
; ( "host-crashdump-upload"
, {
reqd= ["uuid"]
; optn= ["url"; "http_proxy"]
; help= "Upload a host crash dump to the support website."
; implementation= No_fd Cli_operations.host_crash_upload
; flags= []
}
)
; ( "host-crashdump-destroy"
, {
reqd= ["uuid"]
; optn= []
; help= "Delete a host crashdump from the server."
; implementation= No_fd Cli_operations.host_crash_destroy
; flags= []
}
)
; ( "host-bugreport-upload"
, {
reqd= []
; optn= ["url"; "http_proxy"]
; help=
"Upload the output of xen-bugtool --yestoall on a specific host to \
the support website."
; implementation= No_fd Cli_operations.host_bugreport_upload
; flags= [Host_selectors]
}
)
; ( "host-backup"
, {
reqd= ["file-name"]
; optn= []
; help= "Download a backup of the host's control domain."
; implementation= With_fd Cli_operations.host_backup
; flags= [Host_selectors]
}
)
; ( "host-restore"
, {
reqd= ["file-name"]
; optn= []
; help= "Upload a backup of the host's control domain."
; implementation= With_fd Cli_operations.host_restore
; flags= [Host_selectors]
}
)
; ( "host-logs-download"
, {
reqd= []
; optn= ["file-name"]
; help= "Download a copy of the host logs."
; implementation= With_fd Cli_operations.host_logs_download
; flags= [Host_selectors]
}
)
; ( "host-signal-networking-change"
, {
reqd= []
; optn= []
; help= "Signal that networking ."
; implementation=
No_fd_local_session Cli_operations.host_signal_networking_change
; flags= [Neverforward; Hidden]
}
)
; ( "host-send-debug-keys"
, {
reqd= ["host-uuid"; "keys"]
; optn= []
; help= "Send specified hypervisor debug keys to specified host"
; implementation= No_fd_local_session Cli_operations.host_send_debug_keys
; flags= []
}
)
; ( "host-notify"
, {
reqd= ["type"]
; optn= ["params"]
; help= "Notify some event."
; implementation= No_fd_local_session Cli_operations.host_notify
; flags= [Neverforward; Hidden]
}
)
; ( "host-syslog-reconfigure"
, {
reqd= ["host-uuid"]
; optn= []
; help= "Reconfigure syslog daemon."
; implementation= No_fd Cli_operations.host_syslog_reconfigure
; flags= []
}
)
; ( "host-emergency-management-reconfigure"
, {
reqd= ["interface"]
; optn= []
; help=
"Reconfigure the management interface of this node: only use if the \
node is in emergency mode."
; implementation=
No_fd_local_session
Cli_operations.host_emergency_management_reconfigure
; flags= [Neverforward]
}
)
; ( "host-emergency-ha-disable"
, {
reqd= []
; optn= ["force"]
; help=
"Disable HA on the local host. Only to be used to recover a pool \
with a broken HA setup."
; implementation=
No_fd_local_session Cli_operations.host_emergency_ha_disable
; flags= [Neverforward]
}
)
; ( "host-emergency-reset-server-certificate"
, {
reqd= []
; optn= []
; help=
"Deletes the current TLS server certificate in the host and installs \
a new, self-signed one."
; implementation=
No_fd_local_session
Cli_operations.host_emergency_reset_server_certificate
; flags= [Neverforward]
}
)
; ( "host-emergency-disable-tls-verification"
, {
reqd= []
; optn= []
; help= "Disable TLS verification for this host only"
; implementation=
No_fd_local_session
Cli_operations.host_emergency_disable_tls_verification
; flags= [Neverforward]
}
)
; ( "host-emergency-reenable-tls-verification"
, {
reqd= []
; optn= []
; help= "Reenable TLS verification for this host only"
; implementation=
No_fd_local_session
Cli_operations.host_emergency_reenable_tls_verification
; flags= [Neverforward]
}
)
; ( "host-reset-server-certificate"
, {
reqd= []
; optn= []
; flags= [Host_selectors]
; help=
"Deletes the current TLS server certificate in the host and installs \
a new, self-signed one."
; implementation= No_fd Cli_operations.host_reset_server_certificate
}
)
; ( "host-management-reconfigure"
, {
reqd= ["pif-uuid"]
; optn= []
; help= "Reconfigure the management interface of this node."
; implementation= No_fd Cli_operations.host_management_reconfigure
; flags= []
}
)
; ( "host-management-disable"
, {
reqd= []
; optn= []
; help= "Disable the management interface of this node."
; implementation=
No_fd_local_session Cli_operations.host_management_disable
; flags= [Neverforward]
}
)
; ( "host-compute-free-memory"
, {
reqd= []
; optn= []
; help= "Computes the amount of free memory on the host."
; implementation= No_fd Cli_operations.host_compute_free_memory
; flags= [Host_selectors]
}
)
; ( "host-compute-memory-overhead"
, {
reqd= []
; optn= []
; help= "Computes the virtualization memory overhead of a host."
; implementation= No_fd Cli_operations.host_compute_memory_overhead
; flags= [Host_selectors]
}
)
; ( "host-get-system-status-capabilities"
, {
reqd= []
; optn= []
; help= ""
; implementation=
No_fd_local_session Cli_operations.host_get_system_status_capabilities
; flags= [Neverforward; Host_selectors]
}
)
; ( "host-get-system-status"
, {
reqd= ["filename"]
; optn= ["entries"; "output"]
; help=
"Download system status into <filename>. Entries is a \
comma-separated list. Output may be 'tar', 'tar.bz2' (the default) \
or 'zip'."
; implementation= With_fd Cli_operations.host_get_system_status
; flags= [Host_selectors]
}
)
; ( "host-set-hostname-live"
, {
reqd= ["host-uuid"; "host-name"]
; optn= []
; help=
"Sets the host name to the specified string. Both the API and \
lower-level system hostname are changed."
; implementation= No_fd Cli_operations.host_set_hostname_live
; flags= [Host_selectors]
}
)
; ( "host-set-power-on-mode"
, {
reqd= ["power-on-mode"]
; optn= ["power-on-config"]
; help= "Sets the power-on mode for the XE host"
; implementation= No_fd Cli_operations.host_set_power_on_mode
; flags= [Host_selectors]
}
)
; ( "host-call-plugin"
, {
reqd= ["host-uuid"; "plugin"; "fn"]
; optn= ["args:"]
; help=
"Calls the function within the plugin on the given host with \
optional arguments."
; implementation= No_fd Cli_operations.host_call_plugin
; flags= []
}
)
; ( "host-retrieve-wlb-evacuate-recommendations"
, {
reqd= ["uuid"]
; optn= []
; help=
"Retrieves recommended host migrations to perform when evacuating \
the host from the wlb server. If a vm cannot be migrated from the \
host the reason is listed instead of a recommendation."
; implementation=
No_fd Cli_operations.host_retrieve_wlb_evacuate_recommendations
; flags= [Hidden]
}
)
; ( "host-enable-external-auth"
, {
reqd= ["host-uuid"; "auth-type"; "service-name"]
; optn= ["config:"]
; help= "Enables external authentication in a host"
; implementation= No_fd Cli_operations.host_enable_external_auth
; flags= [Hidden]
}
)
; ( "host-disable-external-auth"
, {
reqd= ["host-uuid"]
; optn= ["config:"]
; help= "Disables external authentication in a host"
; implementation= No_fd Cli_operations.host_disable_external_auth
; flags= [Hidden]
}
)
; ( "host-refresh-pack-info"
, {
reqd= ["host-uuid"]
; optn= []
; help= "Refreshes Host.software_version"
; implementation= No_fd Cli_operations.host_refresh_pack_info
; flags= [Hidden]
}
)
; ( "host-cpu-info"
, {
reqd= []
; optn= ["uuid"]
; help= "Lists information about the host's physical CPUs."
; implementation= No_fd Cli_operations.host_cpu_info
; flags= []
}
)