Skip to content

Commit

Permalink
Merge pull request #12663 from hashicorp/backport/csi-map-plugin-info…
Browse files Browse the repository at this point in the history
…-responses/positively-divine-cowbird

This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-nomad-core authored Apr 19, 2022
2 parents b94a49c + c97db1b commit 359a7f3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions command/agent/csi_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,20 @@ func structsCSIInfoToApi(info *structs.CSIInfo) *api.CSIInfo {
}

if info.ControllerInfo != nil {
ci := info.ControllerInfo
out.ControllerInfo = &api.CSIControllerInfo{
SupportsReadOnlyAttach: info.ControllerInfo.SupportsReadOnlyAttach,
SupportsAttachDetach: info.ControllerInfo.SupportsAttachDetach,
SupportsListVolumes: info.ControllerInfo.SupportsListVolumes,
SupportsListVolumesAttachedNodes: info.ControllerInfo.SupportsListVolumesAttachedNodes,
SupportsCreateDelete: ci.SupportsCreateDelete,
SupportsAttachDetach: ci.SupportsAttachDetach,
SupportsListVolumes: ci.SupportsListVolumes,
SupportsGetCapacity: ci.SupportsGetCapacity,
SupportsCreateDeleteSnapshot: ci.SupportsCreateDeleteSnapshot,
SupportsListSnapshots: ci.SupportsListSnapshots,
SupportsClone: ci.SupportsClone,
SupportsReadOnlyAttach: ci.SupportsReadOnlyAttach,
SupportsExpand: ci.SupportsExpand,
SupportsListVolumesAttachedNodes: ci.SupportsListVolumesAttachedNodes,
SupportsCondition: ci.SupportsCondition,
SupportsGet: ci.SupportsGet,
}
}

Expand All @@ -558,6 +567,9 @@ func structsCSIInfoToApi(info *structs.CSIInfo) *api.CSIInfo {
ID: info.NodeInfo.ID,
MaxVolumes: info.NodeInfo.MaxVolumes,
RequiresNodeStageVolume: info.NodeInfo.RequiresNodeStageVolume,
SupportsStats: info.NodeInfo.SupportsStats,
SupportsExpand: info.NodeInfo.SupportsExpand,
SupportsCondition: info.NodeInfo.SupportsCondition,
}

if info.NodeInfo.AccessibleTopology != nil {
Expand Down

0 comments on commit 359a7f3

Please sign in to comment.