-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathswagger_v2.yaml
12324 lines (12140 loc) · 426 KB
/
swagger_v2.yaml
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
---
swagger: '2.0'
info:
description: >-
The Hardware State Manager (HSM) inventories, monitors, and manages
hardware, and
tracks the logical and dynamic component states, such as roles,
NIDs, and other basic metadata needed to provide
most common administrative and operational functions. HSM is the
single source of truth for the state of the system.
It contains the component state and information on Redfish endpoints for
communicating with components via Redfish.
It also allows administrators to create partitions and groups for other uses.
## Resources
### /State/Components
HMS components are created during inventory discovery and provide a higher-level
representation of the component, including state, NID, role (i.e. compute/service),
subtype, and so on. Unlike ComponentEndpoints,
however, they are not strictly linked to the parent RedfishEndpoint, and are not
automatically deleted when the RedfishEndpoints are (though they can be deleted via a
separate call). This is because these components can also represent abstract components,
such as removed components (e.g. which would remain, but have their states changed to
"Empty" upon removal).
### /Defaults/NodeMaps
This resource allows a mapping file (NodeMaps) to be uploaded that maps node xnames to
Node IDs, and optionally, to roles and subroles. These mappings are used
when discovering nodes for the first time. These mappings should be uploaded prior to
discovery and should contain mappings for each valid node xname in the system, whether populated or
not. Nodemap is a JSON file that contains the xname of the node, node ID, and optionally
role and subrole. Role can be Compute, Application, Storage, Management etc.
The NodeMaps collection can be uploaded to HSM automatically at install time by specifying
it as a JSON file. As a result, the endpoints are then automatically discovered by REDS,
and inventory discovery is performed by HSM. The desired NID numbers will be set as
soon as the nodes are created using the NodeMaps collection.
It is recommended that Nodemaps are uploaded at install time before discovery happens.
If they are uploaded after discovery, then the node xnames need
to be manually updated with the correct NIDs. You can update NIDs for individual
components by using PATCH /State/Components/{xname}/NID.
### /Inventory/Hardware
This resource shows the hardware inventory of the entire system and contains
FRU information in location. All entries are displayed as a flat array.
### /Inventory/HardwareByFRU
Every component has FRU information. This resource shows the hardware inventory for
all FRUs or for a specific FRU irrespective of the location. This information is constant
regardless of where the hardware item is currently in the system.
If a HWInventoryByLocation entry is currently populated with a piece of hardware, it will
have the corresponding HWInventoryByFRU object embedded. This FRU info can also be
looked up by FRU ID regardless of the current location.
### /Inventory/Hardware/Query/{xname}
This resource gets you information about a specific component and it's sub-components.
The xname can be a component, partition, ALL, or s0. Both ALL and s0 represent the
entire system.
### /Inventory/RedfishEndpoints
This is a BMC or other Redfish controller that has a Redfish entry
point and Redfish service root. It is used to discover the components
managed by this endpoint during discovery and handles all Redfish
interactions by these subcomponents. If the endpoint has been discovered,
this entry will include the ComponentEndpoint entries for these managed
subcomponents.
You can also create a Redfish Endpoint or update the definition for a Redfish Endpoint.
The xname identifies the location of all components in the system, including chassis,
controllers, nodes, and so on. Redfish endpoints are given to State Manager.
### /Inventory/ComponentEndpoints
Component Endpoints are the specific URLs for each individual component
that are under the Redfish endpoint.
Component endpoints are discovered during inventory discovery. They are the
management-plane representation of system components and are linked to the parent
Redfish Endpoint. They provide a glue layer to bridge the higher-level representation
of a component with how it is represented locally by Redfish.
The collection of ComponentEndpoints can be obtained in full, optionally filtered on
certain criteria (e.g. obtain just Node components), or accessed by their xname IDs
individually.
### /Inventory/ServiceEndpoints
ServiceEndpoints help you do things on Redfish like updating the firmware.
They are discovered during inventory discovery.
### /groups
Groups are named sets of system components, most commonly nodes. A group groups
components under an administratively
chosen label (group name). Each component may belong to any number of groups.
If a group has exclusiveGroup=<excl-label> set, then a node
may only be a member of one group that matches that exclusive label. For example, if
the exclusive group label 'colors' is associated with groups 'blue', 'red', and 'green',
then a component that is part of 'green' could not also be placed in 'red'.
You can create, modify, or delete a group and its members. You can also use group names
as filters for API calls.
### /partitions
A partition is a formal, non-overlapping division of the system that forms an administratively
distinct sub-system. Each component may belong to at most one partition. Partitions
are used as an access control mechanism or for implementing multi-tenancy. You can create,
modify, or delete a partition and its members. You can also use partitions as filters
for other API calls.
### /memberships
A membership shows the association of a component xname to its set of group
labels and partition names. There can be many group labels and up to
one partition per component.
Memberships are not modified directly, as the underlying group or partition is modified instead.
A component can be removed from one of the listed groups or partitions or added via POST
as well as being present in the initial set of members
when a partition or group is created. You can retrieve the memberships for components
or memberships for a specific xname.
### /Inventory/DiscoveryStatus
Check discovery status for all components or you can track the status for a specific job
ID. You can also check per-endpoint discover status for each RedfishEndpoint. Contains
status information about the discovery operation for clients to query. The discover
operation returns a link or links to status objects so that a client can determine when
the discovery operation is complete.
### /Inventory/Discover
Discover subcomponents by querying all RedfishEndpoints. Once the RedfishEndpoint
objects are created, inventory discovery will query
these controllers and create or update management plane and managed plane objects representing
the components (e.g. nodes, node enclosures, node cards for Mountain chassis CMM endpoints).
### /Subscriptions/SCN
Manage subscriptions to state change notifications (SCNs) from HSM. You can also
subscribe to state change notifications by using the HMS Notification Fanout Daemon API.
## Workflows
### Add and Delete a Redfish Endpoint
#### POST /Inventory/RedfishEndpoints
When you manually create Redfish endpoints, the discovery is automatically initiated.
You would create Redfish endpoints for components that are not automatically
discovered by REDS or MEDS.
#### GET /Inventory/RedfishEndpoints
Check the Redfish endpoints that have been added and check the status of discovery.
#### DELETE /Inventory/RedfishEndpoints/{xname}
Delete a specific Redfish endpoint.
### Perform Inventory Discovery
#### POST /Inventory/Discover
Start inventory discovery of a system's subcomponents by querying all Redfish endpoints.
If needed, specify an ID or hostname (xname) in the payload.
#### GET /Inventory/DiscoveryStatus
Check the discovery status of all Redfish endpoints. You can also check the discovery
status for each individual component by providing ID.
### Query and Update HMS Components (State/NID)
#### GET /State/Components
Retrieve all HMS Components found by inventory discovery as a named ("Components") array.
#### PATCH /State/Components/{xname}/Enabled
Modify the component's Enabled field.
#### DELETE /State/Components/{xname}
Delete a specific HMS component by providing its xname.
As noted, components are not automatically deleted when RedfishEndpoints or ComponentEndpoints
are deleted.
### Create and Delete a New Group
#### GET /hsm/v2/State/Components
Retrieve a list of desired components and their state. Select the nodes that you want
to group.
#### POST /groups
Create the new group with desired members. Provide a group label (required), description,
name, members etc. in the JSON payload.
#### GET /groups/{group_label}
Retrieve the group that was create with the label.
#### GET /State/Components/{group_label}
Retrieve the current state for all the components in the group.
#### DELETE /groups/{group_label}
Delete the group specified by {group_label}.
## Valid State Transitions
```
Prior State -> New State - Reason
Ready -> Standby - HBTD if node has many missed heartbeats
Ready -> Ready/Warning - HBTD if node has a few missed heartbeats
Standby -> Ready - HBTD Node re-starts heartbeating
On -> Ready - HBTD Node started heartbeating
Off -> Ready - HBTD sees heartbeats before Redfish Event (On)
Standby -> On - Redfish Event (On) or if re-discovered while in the standby state
Off -> On - Redfish Event (On)
Standby -> Off - Redfish Event (Off)
Ready -> Off - Redfish Event (Off)
On -> Off - Redfish Event (Off)
Any State -> Empty - Redfish Endpoint is disabled meaning component removal
```
Generally, nodes transition 'Off' -> 'On' -> 'Ready' when going from 'Off' to booted, and 'Ready' -> 'Ready/Warning' -> 'Standby' -> 'Off' when shutdown.
version: 1.0.0
title: Hardware State Manager API
host: 'sms'
basePath: /apis/smd/hsm/v2
schemes:
- https
produces:
- application/json
- application/problem+json
consumes:
- application/json
tags:
- name: Service Info
description: >-
Service information APIs for getting information on the HSM service such
as readiness, etc.
- name: Component
description: >-
High-level component information by xname: state, flag, NID, role, etc.
- name: NodeMap
description: >-
Given a node xname ID, provide defaults for NID, Role, etc. to be used
when the node is first discovered. These are uploaded prior to
discovery and should contain mappings for each valid node xname in
the system, whether populated or not.
- name: HWInventory
description: >-
HWInventoryByLocation collection containing all components matching
the query that was submitted.
- name: HWInventoryByLocation
description: >-
Hardware inventory information for the given system location/xname
- name: HWInventoryByFRU
description: >-
This represents a physical piece of hardware with properties specific
to a unique component in the system. This information
is constant regardless of where the hardware item is currently in
the system (if it is in the system). If a HWInventoryByLocation
entry is currently populated with a piece of hardware, it will have
the corresponding HWInventoryByFRU object embedded. This FRU info can
also be looked up by FRU ID regardless of the current location.
- name: HWInventoryHistory
description: >-
Hardware inventory historical information for the given system location/xname/FRU
- name: RedfishEndpoint
description: >-
This is a BMC or other Redfish controller that has a Redfish entry
point and Redfish service root. It is used to discover the components
managed by this endpoint during discovery and handles all Redfish
interactions by these subcomponents. If the endpoint has been discovered,
this entry will include the ComponentEndpoint entries for these managed
subcomponents.
- name: ComponentEndpoint
description: >-
The Redfish-discovered properties for a component discovered through,
and managed by a RedfishEndpoint, such as a node, blade, and so on.
These are obtainable via a discovered RedfishEndpoint or can be
looked up by their xnames separately so that just the information
for a particular component, e.g. node can be retrieved. They can
also provide a back-reference to the parent endpoint.
- name: ServiceEndpoint
description: >-
The Redfish-discovered properties for a service discovered through,
and managed by a RedfishEndpoint, such as UpdateService, EventService,
and so on. These are obtainable via a discovered RedfishEndpoint or can
be looked up by their service type and xnames separately so that just the
information for a particular service, e.g. UpdateService can be retrieved.
They can also provide a back-reference to the parent endpoint.
- name: ComponentEthernetInterfaces
description: >-
The MAC address to IP address relation for components in the system. If
the component has been discovered by HSM, the xname of the component that
has the Ethernet interface will be associated with it as well.
- name: Group
description: >-
A group is an informal, possibly overlapping division of the system that
groups Components (most frequently nodes) under an administratively
chosen label (i.e. group name). Unlike partitions, components can be
members of any number of groups.
- name: Partition
description: >-
A partition is a formal, non-overlapping division of the system that
forms an administratively distinct sub-system e.g. for implementing
multi-tenancy.
- name: Membership
description: >-
A membership is a mapping of a component xname to its set of group
labels and partition names.
# - name: SystemInformationBlock
# description: >-
# The SystemInformationBlock (SIB) object nests Component, HWInventory,
# HSNType, and HSNInfo subschemas that match a particular query,
# associating information that may be needed by a
# large number of endpoints into a single,
# self-contained object. While most of the individual subschemas,
# (HSNInfo is the exception, which is obtained from the fabric manager)
# can be queried using several of the more general APIs, the
# SIB supports the use of a single API that clients may use to
# bootstrap their initial system state, for example.
- name: DiscoveryStatus
description: >-
Contains status information about the discovery operation for clients
to query. The discover operation returns a link or links to
status objects so that a client can determine when the discovery operation
is complete.
- name: Discover
description: >-
Trigger a discovery of system component data
by interrogating all, or a subset, of the RedfishEndpoints currently
known to the system.
- name: SCN
description: >-
Manage subscriptions to state change notifications (SCNs) from HSM.
- name: Locking
description: >-
Manage locks and reservations on components.
- name: PowerMap
description: >-
Power mapping of components to the components supplying them power. This
may contain components in the system whether populated or not.
paths:
########################################################################
#
# Service Information API calls - Ready, etc.
#
########################################################################
/service/ready:
get:
tags:
- Service Info
summary: Kubernetes readiness endpoint to monitor service health
x-private: true
description: >-
The `readiness` resource works in conjunction with the Kubernetes readiness
probe to determine when the service is no longer healthy and able to respond
correctly to requests. Too many failures of the readiness probe will result
in the traffic being routed away from this service and eventually the service
will be shut down and restarted if in an unready state for too long.
This is primarily an endpoint for the automated Kubernetes system.
operationId: doReadyGet
responses:
"200":
description: >-
[OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
Network API call success
schema:
$ref: '#/definitions/Response_1.0.0'
"503":
description: >-
The service is unhealthy and not ready
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/liveness:
get:
tags:
- Service Info
summary: Kubernetes liveness endpoint to monitor service health
x-private: true
description: >-
The `liveness` resource works in conjunction with the Kubernetes liveness
probe to determine when the service is no longer responding to
requests. Too many failures of the liveness probe will result in the
service being shut down and restarted.
This is primarily an endpoint for the automated Kubernetes system.
operationId: doLivenessGet
responses:
"204":
description: >-
[No Content](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5)
Network API call success
"503":
description: >-
The service is not taking HTTP requests
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values:
get:
tags:
- Service Info
summary: Retrieve all valid values for use as parameters
description: >-
Retrieve all valid values for use as parameters.
operationId: doValuesGet
responses:
"200":
description: An array of parameters and their valid values.
schema:
$ref: '#/definitions/Values.1.0.0_Values'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/arch:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'arch' parameter
description: >-
Retrieve all valid values for use with the 'arch' (component architecture) parameter.
operationId: doArchValuesGet
responses:
"200":
description: An array of valid values for the 'arch' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_ArchArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/class:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'class' parameter
description: >-
Retrieve all valid values for use with the 'class' (hardware class) parameter.
operationId: doClassValuesGet
responses:
"200":
description: An array of valid values for the 'class' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_ClassArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/flag:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'flag' parameter
description: >-
Retrieve all valid values for use with the 'flag' (component flag) parameter.
operationId: doFlagValuesGet
responses:
"200":
description: An array of valid values for the 'flag' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_FlagArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/nettype:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'nettype' parameter
description: >-
Retrieve all valid values for use with the 'nettype' (component network type) parameter.
operationId: doNetTypeValuesGet
responses:
"200":
description: An array of valid values for the 'nettype' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_NetTypeArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/role:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'role' parameter
description: >-
Retrieve all valid values for use with the 'role' (component role) parameter.
operationId: doRoleValuesGet
responses:
"200":
description: An array of valid values for the 'role' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_RoleArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/subrole:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'subrole' parameter
description: >-
Retrieve all valid values for use with the 'subrole' (component subrole) parameter.
operationId: doSubRoleValuesGet
responses:
"200":
description: An array of valid values for the 'subrole' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_SubRoleArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/state:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'state' parameter
description: >-
Retrieve all valid values for use with the 'state' (component state) parameter.
operationId: doStateValuesGet
responses:
"200":
description: An array of valid values for the 'state' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_StateArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/service/values/type:
get:
tags:
- Service Info
summary: Retrieve all valid values for use with the 'type' parameter
description: >-
Retrieve all valid values for use with the 'type' (component HMSType) parameter.
operationId: doTypeValuesGet
responses:
"200":
description: An array of valid values for the 'type' parameter.
schema:
$ref: '#/definitions/Values.1.0.0_TypeArray'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
########################################################################
#
# State Component API Calls
#
########################################################################
/State/Components:
get:
tags:
- Component
summary: Retrieve collection of HMS Components
description: >-
Retrieve the full collection of state/components in the form of a
ComponentArray. Full results can also be filtered by query
parameters. When multiple parameters are specified, they are applied
in an AND fashion (e.g. type AND state). When a parameter is specified
multiple times, they are applied in an OR fashion (e.g. type AND state1 OR state2).
If the collection is empty or the filters have no match, an
empty array is returned.
operationId: doComponentsGet
parameters:
- $ref: '#/parameters/compIDParam'
- $ref: '#/parameters/compTypeParam'
- $ref: '#/parameters/compStateParam'
- $ref: '#/parameters/compFlagParam'
- $ref: '#/parameters/compRoleParam'
- $ref: '#/parameters/compSubroleParam'
- $ref: '#/parameters/compEnabledParam'
- $ref: '#/parameters/compSoftwareStatusParam'
- $ref: '#/parameters/compSubtypeParam'
- $ref: '#/parameters/compArchParam'
- $ref: '#/parameters/compClassParam'
- $ref: '#/parameters/compNIDParam'
- $ref: '#/parameters/compNIDStartParam'
- $ref: '#/parameters/compNIDEndParam'
- $ref: '#/parameters/compPartitionParam'
- $ref: '#/parameters/compGroupParam'
- name: stateonly
in: query
type: boolean
description: >-
Return only component state and flag fields (plus xname/ID and
type). Results can be modified and used for bulk state/flag-
only patch operations.
- name: flagonly
in: query
type: boolean
description: >-
Return only component flag field (plus xname/ID and type).
Results can be modified and used for bulk flag-only patch
operations.
- name: roleonly
in: query
type: boolean
description: >-
Return only component role and subrole fields (plus xname/ID and type).
Results can be modified and used for bulk role-only patches.
- name: nidonly
in: query
type: boolean
description: >-
Return only component NID field (plus xname/ID and type).
Results can be modified and used for bulk NID-only patches.
responses:
"200":
description: >-
ComponentArray representing results of query.
schema:
$ref: '#/definitions/ComponentArray_ComponentArray'
"400":
description: Bad Request such as invalid argument for filter
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
post:
tags:
- Component
summary: Create/Update a collection of HMS Components
description: >-
Create/Update a collection of state/components. If the component
already exists it will not be overwritten unless force=true in which
case State, Flag, Subtype, NetType, Arch, and Class will get overwritten.
operationId: doComponentsPost
parameters:
- name: payload
in: body
required: true
schema:
$ref: '#/definitions/ComponentArray_PostArray'
responses:
"204":
description: >-
[No Content](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5)
One or more Component entries were successfully created/updated.
"400":
description: Bad Request such as invalid argument for a component field
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
delete:
tags:
- Component
- cli_danger$This will delete all components in HSM, continue?
summary: >-
Delete all components
description: >-
Delete all entries in the components collection.
operationId: doComponentsDeleteAll
responses:
"200":
description: >-
Zero (success) error code - one or more entries deleted.
Message contains count of deleted items.
schema:
$ref: '#/definitions/Response_1.0.0'
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":
description: Does Not Exist - Collection is empty
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
# /State/Components/ByNID:
# get:
# tags:
# - Component
# summary: GET Component-by-NID Resource IDs Collection
# description: >-
# This produces a collection of URIs to all Components using their
# ByNID path.
# operationId: doComponentResourceURIByNIDGet
# parameters:
# - name: partition
# in: query
# type: string
# description: >-
# Restrict search to the given partition.
# responses:
# "200":
# description: Collection of Component Resource IDs.
# schema:
# $ref: '#/definitions/ComponentByNID.1.0.0_ResourceURICollection'
# examples:
# application/json:
# Name: State Component by NID Collection
# Members:
# - URI: /hsm/v2/State/Components/ByNID/0
# - URI: /hsm/v2/State/Components/ByNID/1
# MemberCount: 2
# "400":
# description: Bad Request
# schema:
# $ref: '#/definitions/Problem7807'
# "404":
# description: Does Not Exist
# schema:
# $ref: '#/definitions/Problem7807'
# default:
# description: Unexpected error
# schema:
# $ref: '#/definitions/Problem7807'
/State/Components/{xname}:
get:
tags:
- Component
summary: Retrieve component at {xname}
description: >-
Retrieve state or components by xname.
operationId: doComponentGet
parameters:
- name: xname
in: path
type: string
description: Locational xname of component to return.
required: true
responses:
"200":
description: Component entry matching xname/ID
schema:
$ref: '#/definitions/Component.1.0.0_Component'
"400":
description: Bad Request or invalid xname
schema:
$ref: '#/definitions/Problem7807'
"404":
description: Does Not Exist
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
put:
tags:
- Component
summary: Create/Update an HMS Component
description: >-
Create/Update a state/component. If the component already exists it
will not be overwritten unless force=true in which case State, Flag,
Subtype, NetType, Arch, and Class will get overwritten.
operationId: doComponentPut
parameters:
- name: xname
in: path
type: string
description: >-
Locational xname of the component to create or update.
required: true
- name: payload
in: body
required: true
schema:
$ref: '#/definitions/Component.1.0.0_Put'
responses:
"204":
description: >-
[No Content](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5)
Component entry was successfully created/updated.
"400":
description: Bad Request such as invalid argument for a component field
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
delete:
tags:
- Component
summary: Delete component with ID {xname}
description: >-
Delete a component by xname.
operationId: doComponentDelete
parameters:
- name: xname
in: path
type: string
description: Locational xname of component record to delete.
required: true
responses:
"200":
description: Component is deleted.
schema:
$ref: '#/definitions/Response_1.0.0'
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":
description: XName does Not Exist - no matching ID to delete
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/State/Components/ByNID/{nid}:
get:
tags:
- Component
summary: Retrieve component with NID={nid}
description: >-
Retrieve a component by NID.
operationId: doComponentByNIDGet
parameters:
- name: nid
in: path
type: string
description: NID of component to return.
required: true
responses:
"200":
description: Component entry matching xname/ID
schema:
$ref: '#/definitions/Component.1.0.0_Component'
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":
description: Does Not Exist
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/State/Components/BulkStateData:
patch:
tags:
- Component
summary: >-
Update multiple components' state data via a list of xnames
description: >-
Specify a list of xnames to update the State and Flag fields. If the Flag field is omitted,
Flag is reverted to 'OK'. Other fields are ignored. The list of IDs
and the new State are required.
operationId: doCompBulkStateDataPatch
parameters:
- name: payload
in: body
required: true
schema:
$ref: '#/definitions/ComponentArray_PatchArray.StateData'
responses:
"204":
description: Success.
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":
description: Does Not Exist
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/State/Components/{xname}/StateData:
patch:
tags:
- Component
summary: >-
Update component state data at {xname}
description: >-
Update the component's state and flag fields only. If Flag field is
omitted, the Flag value is reverted to 'OK'.
operationId: doCompStatePatch
parameters:
- name: xname
in: path
type: string
description: Locational xname of component to set state/flag on.
required: true
- name: payload
in: body
required: true
schema:
$ref: '#/definitions/Component.1.0.0_Patch.StateData'
responses:
"204":
description: Success.
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":
description: Does Not Exist
schema:
$ref: '#/definitions/Problem7807'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Problem7807'
/State/Components/BulkFlagOnly:
patch:
tags:
- Component
summary: >-
Update multiple components' Flag values via a list of xnames
description: >-
Specify a list of xnames to update the Flag field and specify the value.
The list of IDs and the new Flag are required.
operationId: doCompBulkFlagOnlyPatch
parameters:
- name: payload
in: body
required: true
schema:
$ref: '#/definitions/ComponentArray_PatchArray.FlagOnly'
responses:
"204":
description: Success.
"400":
description: Bad Request
schema:
$ref: '#/definitions/Problem7807'
"404":