fix(region,host): rename screen dump info structure (#24260)

This commit is contained in:
wanyaoqi
2026-02-06 18:10:19 +08:00
committed by GitHub
parent 4099ca7521
commit 12bd3be56c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ type SImagesInGuest struct {
DataImages []SSubImage `json:"data_images"`
}
type SGuestScreenDump struct {
type SGuestScreenDumpInfo struct {
S3AccessKey string `json:"s3_access_key"`
S3SecretKey string `json:"s3_secret_key"`
S3Endpoint string `json:"s3_endpoint"`
+1 -1
View File
@@ -150,7 +150,7 @@ func (self *SGuest) PerformEvent(ctx context.Context, userCred mcclient.TokenCre
kwargs := jsonutils.NewDict()
kwargs.Set("reason", jsonutils.NewString(event))
if data.Contains("screen_dump_info") {
screenDumpInfo := api.SGuestScreenDump{}
screenDumpInfo := api.SGuestScreenDumpInfo{}
if err := data.Unmarshal(&screenDumpInfo, "screen_dump_info"); err != nil {
log.Errorf("failed unmarshal screen_dump_info %s", err)
} else {
+1 -1
View File
@@ -77,7 +77,7 @@ func (self *SGuestScreenDump) Delete(ctx context.Context, userCred mcclient.Toke
return db.DeleteModel(ctx, userCred, self)
}
func (self *SGuest) SaveGuestScreenDump(ctx context.Context, userCred mcclient.TokenCredential, screenDumpInfo *api.SGuestScreenDump) (*SGuestScreenDump, error) {
func (self *SGuest) SaveGuestScreenDump(ctx context.Context, userCred mcclient.TokenCredential, screenDumpInfo *api.SGuestScreenDumpInfo) (*SGuestScreenDump, error) {
sd := new(SGuestScreenDump)
sd.SetModelManager(GuestScreenDumpManager, sd)
sd.GuestId = self.GetId()
+1 -1
View File
@@ -1153,7 +1153,7 @@ func (s *SKVMGuestInstance) eventGuestPaniced(event *monitor.Event) {
if err != nil {
log.Errorf("faild put screenDumpPath %s to s3 %s", screenDumpPath, err)
} else {
screenDumpInfo := api.SGuestScreenDump{
screenDumpInfo := api.SGuestScreenDumpInfo{
S3AccessKey: options.HostOptions.S3AccessKey,
S3SecretKey: options.HostOptions.S3SecretKey,
S3Endpoint: options.HostOptions.S3Endpoint,