mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(region,host): rename screen dump info structure (#24260)
This commit is contained in:
@@ -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"`
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user