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 current protocol version is 1.0.
type apiEndpoints struct {
IAMEndpoint string `xml:"IAMEndpoint"`
STSEndpoint string `xml:"STSEndpoint"`
}
type systemInfo struct {
XMLName xml.Name `xml:"SystemInfo" json:"-"`
ProtocolVersion string `xml:"ProtocolVersion"`
@ -85,14 +90,11 @@ type systemInfo struct {
UploadSessions bool `xml:"UploadSessions"`
IAMSTS bool `xml:"IAMSTS"`
} `mxl:"ProtocolCapabilities"`
APIEndpoints struct {
IAMEndpoint string `xml:"IAMEndpoint"`
STSEndpoint string `xml:"STSEndpoint"`
} `xml:"APIEndpoints"`
APIEndpoints *apiEndpoints `xml:"APIEndpoints,omitempty"`
SystemRecommendations struct {
S3ConcurrentTaskLimit int `xml:"S3ConcurrentTaskLimit"`
S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit"`
StorageCurrentTaskLimit int `xml:"StorageCurrentTaskLimit"`
S3ConcurrentTaskLimit int `xml:"S3ConcurrentTaskLimit,omitempty"`
S3MultiObjectDeleteLimit int `xml:"S3MultiObjectDeleteLimit,omitempty"`
StorageCurrentTaskLimit int `xml:"StorageCurrentTaskLimit,omitempty"`
KBBlockSize int `xml:"KbBlockSize"`
} `xml:"SystemRecommendations"`
}
@ -118,8 +120,8 @@ func veeamSOSAPIGetObject(ctx context.Context, bucket, object string, rs *HTTPRa
switch object {
case systemXMLObject:
si := systemInfo{
ProtocolVersion: "1.0",
ModelName: "MinIO " + ReleaseTag,
ProtocolVersion: `"1.0"`,
ModelName: "\"MinIO " + ReleaseTag + "\"",
}
si.ProtocolCapabilities.CapacityInfo = true