fix: veeam SOS API 'system.xml' strings (#17202)

This commit is contained in:
Harshavardhana 2023-05-15 12:06:42 -07:00 committed by GitHub
parent bd2dc6c670
commit d063596430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,11 @@ import (
// - The object should be present in all buckets accessed by Veeam products that want to leverage the SOSAPI functionality. // - The object should be present in all buckets accessed by Veeam products that want to leverage the SOSAPI functionality.
// //
// - The current protocol version is 1.0. // - The current protocol version is 1.0.
type apiEndpoints struct {
IAMEndpoint string `xml:"IAMEndpoint"`
STSEndpoint string `xml:"STSEndpoint"`
}
type systemInfo struct { type systemInfo struct {
XMLName xml.Name `xml:"SystemInfo" json:"-"` XMLName xml.Name `xml:"SystemInfo" json:"-"`
ProtocolVersion string `xml:"ProtocolVersion"` ProtocolVersion string `xml:"ProtocolVersion"`
@ -85,14 +90,11 @@ type systemInfo struct {
UploadSessions bool `xml:"UploadSessions"` UploadSessions bool `xml:"UploadSessions"`
IAMSTS bool `xml:"IAMSTS"` IAMSTS bool `xml:"IAMSTS"`
} `mxl:"ProtocolCapabilities"` } `mxl:"ProtocolCapabilities"`
APIEndpoints struct { APIEndpoints *apiEndpoints `xml:"APIEndpoints,omitempty"`
IAMEndpoint string `xml:"IAMEndpoint"`
STSEndpoint string `xml:"STSEndpoint"`
} `xml:"APIEndpoints"`
SystemRecommendations struct { SystemRecommendations struct {
S3ConcurrentTaskLimit int `xml:"S3ConcurrentTaskLimit"` S3ConcurrentTaskLimit int `xml:"S3ConcurrentTaskLimit,omitempty"`
S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit"` S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit,omitempty"`
StorageCurrentTaskLimit int `xml:"StorageCurrentTaskLimit"` StorageCurrentTaskLimit int `xml:"StorageCurrentTaskLimit,omitempty"`
KBBlockSize int `xml:"KbBlockSize"` KBBlockSize int `xml:"KbBlockSize"`
} `xml:"SystemRecommendations"` } `xml:"SystemRecommendations"`
} }
@ -118,8 +120,8 @@ func veeamSOSAPIGetObject(ctx context.Context, bucket, object string, rs *HTTPRa
switch object { switch object {
case systemXMLObject: case systemXMLObject:
si := systemInfo{ si := systemInfo{
ProtocolVersion: "1.0", ProtocolVersion: `"1.0"`,
ModelName: "MinIO " + ReleaseTag, ModelName: "\"MinIO " + ReleaseTag + "\"",
} }
si.ProtocolCapabilities.CapacityInfo = true si.ProtocolCapabilities.CapacityInfo = true