diff --git a/pkg/apis/compute/guest_image.go b/pkg/apis/compute/guest_image.go index 9490468cb9..3abb8bf7a2 100644 --- a/pkg/apis/compute/guest_image.go +++ b/pkg/apis/compute/guest_image.go @@ -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"` diff --git a/pkg/compute/models/guest_actions.go b/pkg/compute/models/guest_actions.go index 7ae8e7a14a..989b5c5863 100644 --- a/pkg/compute/models/guest_actions.go +++ b/pkg/compute/models/guest_actions.go @@ -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 { diff --git a/pkg/compute/models/guestscreendump.go b/pkg/compute/models/guestscreendump.go index b372b93c89..602b1500e2 100644 --- a/pkg/compute/models/guestscreendump.go +++ b/pkg/compute/models/guestscreendump.go @@ -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() diff --git a/pkg/hostman/guestman/qemu-kvm.go b/pkg/hostman/guestman/qemu-kvm.go index ba6af4125d..80c443d0df 100644 --- a/pkg/hostman/guestman/qemu-kvm.go +++ b/pkg/hostman/guestman/qemu-kvm.go @@ -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,