@@ -120,18 +120,35 @@ paths:
120120 schema :
121121 $ref : " #/components/schemas/UnpublishNetworkContainerResponse"
122122
123- /ibdevices/pod :
123+ /ibdevices:assign :
124124 post :
125- summary : Assigns IB devices to a pod
126- description : >-
127- Assigns the specified IB devices to the pod identified by PodID. The
128- MAC addresses of the devices are provided in the request body.
129- requestBody :
130- required : true
131- content :
132- application/json :
133- schema :
134- $ref : " #/components/schemas/AssignIBDevicesToPodRequest"
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+ parameters :
129+ - name : ibmacs
130+ in : query
131+ required : true
132+ description : Comma-separated list of IB device MAC addresses.
133+ schema :
134+ type : array
135+ items :
136+ type : string
137+ example : ["60:45:bd:a4:b5:7a", "7c:1e:52:07:11:36"]
138+ - name : podnamespace
139+ in : query
140+ required : true
141+ description : The namespace of the target pod.
142+ schema :
143+ type : string
144+ example : " podnamespace"
145+ - name : podname
146+ in : query
147+ required : true
148+ description : The name of the target pod.
149+ schema :
150+ type : string
151+ example : " podname"
135152 responses :
136153 ' 200 ' :
137154 description : >-
@@ -142,31 +159,32 @@ paths:
142159 $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
143160 ' 404 ' :
144161 description : >-
145- The pod specified by PodID was not found
162+ The pod specified by PodID was not found.
146163 content :
147164 application/json :
148165 schema :
149166 $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
150167 ' 400 ' :
151168 description : >-
152- One of the IB devices specified is not available
169+ One of the IB devices specified is not available.
153170 content :
154171 application/json :
155172 schema :
156173 $ref : " #/components/schemas/AssignIBDevicesToPodResponse"
157174
158- /ibdevices/{macaddress} :
175+ /ibdevices :
159176 get :
160177 summary : Get status of an IB device
161178 description : >-
162- Retrieves the current status of the specified IB device.
179+ Retrieves the current programming status of the specified IB device.
163180 parameters :
164- - name : macaddress
165- in : path
181+ - name : ibmac
182+ in : query
166183 required : true
167- description : The MAC address of the IB device (with colons ":")
184+ description : The MAC address of the IB device.
168185 schema :
169186 type : string
187+ example : " 60:45:bd:a4:b5:7a"
170188 responses :
171189 ' 200 ' :
172190 description : >-
@@ -433,11 +451,8 @@ components:
433451 AssignIBDevicesToPodResponse :
434452 type : object
435453 required :
436- - ErrorCode
437454 - Message
438455 properties :
439- ErrorCode :
440- $ref : " #/components/schemas/ErrorCode"
441456 Message :
442457 type : string
443458 description : Human-readable message or error description
@@ -446,50 +461,25 @@ components:
446461 type : object
447462 required :
448463 - MACAddress
449- - PodID
464+ - PodNamespace
465+ - PodName
450466 - Status
451- - ErrorCode
452467 - Message
453468 properties :
454469 MACAddress :
455470 type : string
456471 description : MAC address of the IB device
457- PodID :
472+ PodNamespace :
473+ type : string
474+ description : namespace of the pod to which the device is assigned, if any
475+ PodName :
458476 type : string
459- description : podname-podnamespace of the pod to which the device is assigned, if any
477+ description : name of the pod to which the device is assigned, if any
460478 Status :
461479 $ref : " #/components/schemas/Status"
462- ErrorCode :
463- $ref : " #/components/schemas/ErrorCode"
464480 Message :
465481 type : string
466482 description : Human-readable message or error description
467-
468- ErrorCode :
469- type : integer
470- description : Pre-defined error code of what went wrong, if anything (see cns/types/infiniband/errorcodes.go)
471- oneOf :
472- - title : Success
473- const : 0
474- description : Successful operation
475- - title : PodNotFound
476- const : 1
477- description : Pod not found
478- - title : DeviceUnavailable
479- const : 2
480- description : Device is unavailable
481- - title : DeviceNotFound
482- const : 3
483- description : Device not found
484- - title : AnnotationNotFound
485- const : 4
486- description : Annotation not found on pod
487- - title : PodAlreadyAllocated
488- const : 5
489- description : Pod was already assigned IB devices (and new ones don't match)
490- - title : InternalProgrammingError
491- const : 6
492- description : Something went wrong programming the devices
493483
494484 Status :
495485 type : integer
0 commit comments