api: fix children type in Snapshot schema
@@ -301,7 +301,6 @@ func NewSchema() *client.Schemas {
schemas.AddType("apiVersion", client.Resource{})
schemas.AddType("schema", client.Schema{})
schemas.AddType("error", client.ServerApiError{})
- schemas.AddType("snapshot", Snapshot{})
schemas.AddType("attachInput", AttachInput{})
schemas.AddType("snapshotInput", SnapshotInput{})
schemas.AddType("backup", Backup{})
@@ -342,6 +341,7 @@ func NewSchema() *client.Schemas {
schemas.AddType("instanceProcess", types.InstanceProcess{})
volumeSchema(schemas.AddType("volume", Volume{}))
+ snapshotSchema(schemas.AddType("snapshot", Snapshot{}))
backupVolumeSchema(schemas.AddType("backupVolume", BackupVolume{}))
settingSchema(schemas.AddType("setting", Setting{}))
recurringSchema(schemas.AddType("recurringInput", RecurringInput{}))
@@ -626,6 +626,12 @@ func volumeSchema(volume *client.Schema) {
volume.ResourceFields["rebuildStatus"] = rebuildStatus
}
+func snapshotSchema(snapshot *client.Schema) {
+ children := snapshot.ResourceFields["children"]
+ children.Type = "map[bool]"
+ snapshot.ResourceFields["children"] = children
+}
+
func backupListOutputSchema(backupList *client.Schema) {
data := backupList.ResourceFields["data"]
data.Type = "array[backup]"
