Skip to content

Commit b132418

Browse files
CP-314775: Use coordinator and supporter in API docs, and fix grammar (xapi-project#7310)
The XenAPI datamodel currently describes the same pool roles in two contradictory vocabularies, and every SDK and the API reference inherit the contradiction. For example, a developer calling Pool.join reads that its parameter is "the hostname of the master of the pool to join". If the join fails, the error they get back says the host "must have the same product version as the pool coordinator". Same call, same concept, different words. This PR makes things more consistent from a docs point-of-view. No actual API changes are made.
2 parents c5a3c95 + d22208b commit b132418

7 files changed

Lines changed: 153 additions & 129 deletions

File tree

‎ocaml/idl/datamodel.ml‎

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ module Session = struct
8484
let slave_login =
8585
call ~flags:[] ~name:"slave_login"
8686
~doc:
87-
"Attempt to authenticate to the pool master by presenting the slave's \
88-
host ref and pool secret"
87+
"Attempt to authenticate to the pool coordinator by presenting the \
88+
supporter's host ref and pool secret"
8989
~result:(Ref _session, "ID of newly created session")
9090
~params:
9191
[
92-
(Ref _host, "host", "Host id of slave")
92+
(Ref _host, "host", "Host id of the supporter")
9393
; (SecretString, "psecret", "Pool secret")
9494
]
9595
~in_oss_since:None
9696
~lifecycle:
9797
[
9898
( Published
9999
, rel_rio
100-
, "Attempt to authenticate to the pool master by presenting the \
101-
slave's host ref and pool secret"
100+
, "Attempt to authenticate to the pool coordinator by presenting the \
101+
supporter's host ref and pool secret"
102102
)
103103
]
104104
~secret:true ~hide_from_docs:true ~allowed_roles:_R_POOL_ADMIN
@@ -110,13 +110,13 @@ module Session = struct
110110
[
111111
( Published
112112
, rel_miami
113-
, "Authenticate locally against a slave in emergency mode. Note the \
114-
resulting sessions are only good for use on this host."
113+
, "Authenticate locally against a supporter in emergency mode. Note \
114+
the resulting sessions are only good for use on this host."
115115
)
116116
]
117117
~name:"slave_local_login"
118118
~doc:
119-
"Authenticate locally against a slave in emergency mode. Note the \
119+
"Authenticate locally against a supporter in emergency mode. Note the \
120120
resulting sessions are only good for use on this host."
121121
~result:(Ref _session, "ID of newly created session")
122122
~params:[(SecretString, "psecret", "Pool secret")]
@@ -129,13 +129,13 @@ module Session = struct
129129
[
130130
( Published
131131
, rel_miami
132-
, "Authenticate locally against a slave in emergency mode. Note the \
133-
resulting sessions are only good for use on this host."
132+
, "Authenticate locally against a supporter in emergency mode. Note \
133+
the resulting sessions are only good for use on this host."
134134
)
135135
]
136136
~name:"slave_local_login_with_password"
137137
~doc:
138-
"Authenticate locally against a slave in emergency mode. Note the \
138+
"Authenticate locally against a supporter in emergency mode. Note the \
139139
resulting sessions are only good for use on this host."
140140
~result:(Ref _session, "ID of newly created session")
141141
~params:
@@ -279,12 +279,12 @@ module Session = struct
279279
[
280280
( Published
281281
, rel_rio
282-
, "True if this session relates to a intra-pool login, false \
282+
, "True if this session relates to an intra-pool login, false \
283283
otherwise"
284284
)
285285
]
286286
"pool"
287-
"True if this session relates to a intra-pool login, false \
287+
"True if this session relates to an intra-pool login, false \
288288
otherwise"
289289
; field
290290
~lifecycle:[(Published, rel_miami, "additional configuration")]
@@ -391,13 +391,13 @@ module Session = struct
391391
[
392392
( Published
393393
, rel_clearwater
394-
, "a key string provided by a API user to distinguish itself \
394+
, "a key string provided by an API user to distinguish itself \
395395
from other users sharing the same login name"
396396
)
397397
]
398398
~qualifier:DynamicRO ~default_value:(Some (VString "")) ~ty:String
399399
"originator"
400-
"a key string provided by a API user to distinguish itself from \
400+
"a key string provided by an API user to distinguish itself from \
401401
other users sharing the same login name"
402402
; field
403403
~lifecycle:
@@ -737,11 +737,11 @@ module Task = struct
737737
[
738738
( Published
739739
, rel_rio
740-
, "True if this task has been forwarded to a slave"
740+
, "True if this task has been forwarded to a supporter"
741741
)
742742
]
743743
~internal_only:true ~qualifier:DynamicRO ~ty:Bool "forwarded"
744-
"True if this task has been forwarded to a slave"
744+
"True if this task has been forwarded to a supporter"
745745
; field ~in_oss_since:None
746746
~lifecycle:
747747
[
@@ -1561,8 +1561,10 @@ module Host_metrics = struct
15611561
; namespace ~name:"memory" ~contents:host_metrics_memory ()
15621562
; field ~qualifier:DynamicRO ~ty:Bool ~in_oss_since:None "live"
15631563
~lifecycle:
1564-
[(Published, rel_rio, "Pool master thinks this host is live")]
1565-
"Pool master thinks this host is live"
1564+
[
1565+
(Published, rel_rio, "Pool coordinator thinks this host is live")
1566+
]
1567+
"Pool coordinator thinks this host is live"
15661568
; field ~qualifier:DynamicRO ~ty:DateTime
15671569
~lifecycle:
15681570
[
@@ -2568,8 +2570,8 @@ module PIF = struct
25682570
, "IGMP Snooping is disabled in the corresponding backend bridge.'"
25692571
)
25702572
; ( "unknown"
2571-
, "IGMP snooping status is unknown. If this is a VLAN master, then \
2572-
please consult the underlying VLAN slave PIF."
2573+
, "IGMP snooping status is unknown. If this is the untagged PIF of a \
2574+
VLAN, then please consult the underlying tagged PIF."
25732575
)
25742576
]
25752577
)
@@ -3011,7 +3013,7 @@ module Bond = struct
30113013
; param_doc=
30123014
"The MAC address to use on the bond itself. If this parameter is \
30133015
the empty string then the bond will inherit its MAC address \
3014-
from the primary slave."
3016+
from the primary member."
30153017
; param_release= miami_release
30163018
; param_default= None
30173019
}
@@ -3137,7 +3139,7 @@ module Bond = struct
31373139
~lifecycle:[(Published, rel_quebec, "")]
31383140
~qualifier:DynamicRO ~ty:Bool ~default_value:(Some (VBool true))
31393141
"auto_update_mac"
3140-
"true if the MAC was taken from the primary slave when the bond \
3142+
"true if the MAC was taken from the primary member when the bond \
31413143
was created, and false if the client specified the MAC"
31423144
]
31433145
()
@@ -3364,12 +3366,12 @@ module PBD = struct
33643366
( Published
33653367
, rel_rio
33663368
, "Deactivate the specified PBD, causing the referenced SR to be \
3367-
detached and nolonger scanned"
3369+
detached and no longer scanned"
33683370
)
33693371
]
33703372
~doc:
33713373
"Deactivate the specified PBD, causing the referenced SR to be \
3372-
detached and nolonger scanned"
3374+
detached and no longer scanned"
33733375
~params:[(Ref _pbd, "self", "The PBD to deactivate")]
33743376
~allowed_roles:_R_POOL_OP ()
33753377

@@ -4262,7 +4264,7 @@ module Probe_result = struct
42624264
~descr:
42634265
"A set of properties that describe one result element of SR.probe. \
42644266
Result elements and properties can change dynamically based on \
4265-
changes to the the SR.probe input-parameters or the target."
4267+
changes to the SR.probe input-parameters or the target."
42664268
~gen_events:false ~messages:[] ~doccomments:[]
42674269
~messages_default_allowed_roles:(Some [])
42684270
(* No messages, so no roles allowed to use them *)
@@ -7086,9 +7088,9 @@ module Auth = struct
70867088
[
70877089
( Published
70887090
, rel_george
7089-
, "This calls queries the external directory service to obtain the \
7090-
transitively-closed set of groups that the the subject_identifier \
7091-
is member of."
7091+
, "This call queries the external directory service to obtain the \
7092+
transitively-closed set of groups that the subject_identifier is \
7093+
a member of."
70927094
)
70937095
]
70947096
~params:
@@ -7106,8 +7108,8 @@ module Auth = struct
71067108
all groups a subject_identifier is member of."
71077109
)
71087110
~doc:
7109-
"This calls queries the external directory service to obtain the \
7110-
transitively-closed set of groups that the the subject_identifier is \
7111+
"This call queries the external directory service to obtain the \
7112+
transitively-closed set of groups that the subject_identifier is a \
71117113
member of."
71127114
~allowed_roles:_R_READ_ONLY ()
71137115

@@ -9115,14 +9117,13 @@ module Message = struct
91159117
[
91169118
( Published
91179119
, rel_orlando
9118-
, "An message for the attention of the administrator"
9120+
, "A message for the attention of the administrator"
91199121
)
91209122
]
91219123
~in_oss_since:None ~persist:PersistNothing
91229124
~gen_constructor_destructor:false ~name:_message
9123-
~descr:"An message for the attention of the administrator"
9124-
~gen_events:true ~doccomments:[]
9125-
~messages_default_allowed_roles:_R_POOL_OP
9125+
~descr:"A message for the attention of the administrator" ~gen_events:true
9126+
~doccomments:[] ~messages_default_allowed_roles:_R_POOL_OP
91269127
~messages:
91279128
[
91289129
create

‎ocaml/idl/datamodel_errors.ml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,12 @@ let _ =
624624
() ;
625625
error Api_errors.vm_checkpoint_suspend_failed ["vm"]
626626
~doc:
627-
"An error occured while saving the memory image of the specified virtual \
628-
machine"
627+
"An error occurred while saving the memory image of the specified \
628+
virtual machine"
629629
() ;
630630
error Api_errors.vm_checkpoint_resume_failed ["vm"]
631631
~doc:
632-
"An error occured while restoring the memory image of the specified \
632+
"An error occurred while restoring the memory image of the specified \
633633
virtual machine"
634634
() ;
635635
error Api_errors.vm_pv_drivers_in_use ["vm"] ~doc:"VM PV drivers still in use"
@@ -1649,7 +1649,7 @@ let _ =
16491649
() ;
16501650

16511651
(* Pool errors *)
1652-
error Api_errors.host_is_slave ["Master IP address"]
1652+
error Api_errors.host_is_slave ["Coordinator IP address"]
16531653
~doc:
16541654
"You cannot make regular API calls directly on a supporter. Please pass \
16551655
API calls via the coordinator host."
@@ -2068,8 +2068,8 @@ let _ =
20682068

20692069
error Api_errors.designate_new_master_in_progress []
20702070
~doc:
2071-
"The operation could not be performed because a new master is currently \
2072-
being designated"
2071+
"The operation could not be performed because a new coordinator is \
2072+
currently being designated"
20732073
() ;
20742074
error Api_errors.pool_secret_rotation_pending []
20752075
~doc:

0 commit comments

Comments
 (0)