mirror of
https://github.com/OpenNebula/one.git
synced 2025-04-25 18:50:08 +03:00
M #-: Fix the snapshot schemas (GOCA)
The schema for vm and snapshots does not correctly deserialize the raw xml because the snapshot field in VM struct is not an array. This change fixes the snapshot field, and adds DiskID to DiskSnapshot struct so that after unmarshalling the snapshots are grouped by disk Signed-off-by: Rafael Lopez <rafael.lopez@softiron.com> (cherry picked from commit 278b14930bf1409f4dc5c844bad47e359240f3ca) (cherry picked from commit 647a4851b8fe16590c7d9badec399992fc9f5253)
This commit is contained in:
parent
031ba7e231
commit
d32101ddbc
@ -33,6 +33,7 @@ type Snapshot struct {
|
||||
type DiskSnapshot struct {
|
||||
AllowOrphans string `xml:"ALLOW_ORPHANS"`
|
||||
CurrentBase int `xml:"CURRENT_BASE"`
|
||||
DiskID int `xml:"DISK_ID"`
|
||||
NextSnapshot int `xml:"NEXT_SNAPSHOT"`
|
||||
Snapshots []Snapshot `xml:"SNAPSHOT"`
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ type VM struct {
|
||||
Template Template `xml:"TEMPLATE,omitempty"`
|
||||
UserTemplate UserTemplate `xml:"USER_TEMPLATE,omitempty"`
|
||||
HistoryRecords []HistoryRecord `xml:"HISTORY_RECORDS>HISTORY,omitempty"`
|
||||
Snapshots shared.DiskSnapshot `xml:"SNAPSHOTS,omitempty"`
|
||||
Snapshots []shared.DiskSnapshot `xml:"SNAPSHOTS,omitempty"`
|
||||
|
||||
// Not filled with NewUserPool call
|
||||
LockInfos *shared.Lock `xml:"LOCK"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user