@@ -120,6 +120,67 @@ paths:
120120 schema :
121121 $ref : " #/components/schemas/UnpublishNetworkContainerResponse"
122122
123+ /ibdevices :
124+ post :
125+ summary : Assign IB devices to a pod
126+ description : >
127+ Assigns one or more Infiniband devices by MAC address to a given pod.
128+ requestBody :
129+ required : true
130+ content :
131+ application/json :
132+ schema :
133+ $ref : " #/components/schemas/AssignIBDevicesToPodRequest"
134+ responses :
135+ ' 200 ' :
136+ description : >-
137+ The request passed initial validation and CNS was able to propagate its state.
138+ content :
139+ application/json :
140+ schema :
141+ $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
142+ ' 404 ' :
143+ description : >-
144+ The pod specified by PodID was not found.
145+ content :
146+ application/json :
147+ schema :
148+ $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
149+ ' 400 ' :
150+ description : >-
151+ One of the IB devices specified is not available.
152+ content :
153+ application/json :
154+ schema :
155+ $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
156+ get :
157+ summary : Get status of an IB device
158+ description : >-
159+ Retrieves the current programming status of the specified IB device.
160+ parameters :
161+ - name : ibmac
162+ in : query
163+ required : true
164+ description : The MAC address of the IB device.
165+ schema :
166+ type : string
167+ example : " 60:45:bd:a4:b5:7a"
168+ responses :
169+ ' 200 ' :
170+ description : >-
171+ The request was successful and the status of the IB device is returned.
172+ content :
173+ application/json :
174+ schema :
175+ $ref : " #/components/schemas/GetIBDeviceStatusResponse"
176+ ' 404 ' :
177+ description : >-
178+ The IB device specified by MAC address was not found.
179+ content :
180+ application/json :
181+ schema :
182+ $ref : " #/components/schemas/GetIBDeviceStatusResponse"
183+
123184components :
124185 schemas :
125186 UnpublishNetworkContainerResponse :
@@ -351,3 +412,65 @@ components:
351412 Message :
352413 type : string
353414 description : The error message
415+
416+ AssignIBDevicesToPodRequest :
417+ type : object
418+ required :
419+ - ibmacaddresses
420+ - podNamespace
421+ - podName
422+ properties :
423+ ibmacaddresses :
424+ type : array
425+ items :
426+ type : string
427+ description : List of IB device MAC addresses to assign such as "60:45:bd:a4:b5:7a"
428+ podNamespace :
429+ type : string
430+ description : Namespace of the target pod
431+ podName :
432+ type : string
433+ description : Name of the target pod
434+
435+ AssignIBDevicesToPodResponse :
436+ type : object
437+ required :
438+ - Message
439+ properties :
440+ Message :
441+ type : string
442+ description : Human-readable message or error description
443+
444+ GetIBDeviceStatusResponse :
445+ type : object
446+ required :
447+ - IBMACAddress
448+ - PodNamespace
449+ - PodName
450+ - Status
451+ - Message
452+ properties :
453+ IBMACAddress :
454+ type : string
455+ description : MAC address of the IB device
456+ PodNamespace :
457+ type : string
458+ description : namespace of the pod to which the device is assigned, if any
459+ PodName :
460+ type : string
461+ description : name of the pod to which the device is assigned, if any
462+ Status :
463+ $ref : " #/components/schemas/Status"
464+ Message :
465+ type : string
466+ description : Human-readable message or error description
467+
468+ Status :
469+ type : string
470+ description : Status of IB device
471+ enum :
472+ - Unprogrammed
473+ - Programming
474+ - Programmed
475+ - Unprogramming
476+ - Failed
0 commit comments