4.13.0
This commit is contained in:
@@ -83,9 +83,10 @@ func dataSourceImageListSchemaMake() map[string]*schema.Schema {
|
||||
Description: "Filter by architecture",
|
||||
},
|
||||
"type_image": {
|
||||
Type: schema.TypeString,
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
Description: "Filter by image type",
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
"image_size": {
|
||||
Type: schema.TypeInt,
|
||||
|
||||
@@ -64,7 +64,7 @@ func flattenImage(d *schema.ResourceData, img *image.RecordImage) {
|
||||
d.Set("storage_policy_id", img.StoragePolicyID)
|
||||
d.Set("tech_status", img.TechStatus)
|
||||
d.Set("to_clean", img.ToClean)
|
||||
d.Set("type", img.Type)
|
||||
d.Set("image_type", img.Type)
|
||||
d.Set("username", img.Username)
|
||||
d.Set("version", img.Version)
|
||||
}
|
||||
@@ -90,7 +90,7 @@ func flattenImageList(il *image.ListImages) []map[string]interface{} {
|
||||
"size": img.Size,
|
||||
"status": img.Status,
|
||||
"storage_policy_id": img.StoragePolicyID,
|
||||
"type": img.Type,
|
||||
"type_image": img.Type,
|
||||
"username": img.Username,
|
||||
"virtual": img.Virtual,
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ func dataSourceImageSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"type": {
|
||||
"type_image": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Image type",
|
||||
|
||||
@@ -38,6 +38,7 @@ import (
|
||||
|
||||
func resourceImageVirtualSchemaMake(sch map[string]*schema.Schema) map[string]*schema.Schema {
|
||||
delete(sch, "show_all")
|
||||
|
||||
sch["name"] = &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
@@ -52,9 +53,8 @@ func resourceImageVirtualSchemaMake(sch map[string]*schema.Schema) map[string]*s
|
||||
|
||||
sch["account_id"] = &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Description: "account_id",
|
||||
Required: true,
|
||||
Description: "Account ID",
|
||||
}
|
||||
|
||||
sch["image_id"] = &schema.Schema{
|
||||
|
||||
@@ -63,7 +63,9 @@ func utilityImageListCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
}
|
||||
|
||||
if typeImage, ok := d.GetOk("type_image"); ok {
|
||||
req.TypeImage = typeImage.(string)
|
||||
for _, v := range typeImage.([]interface{}) {
|
||||
req.TypeImage = append(req.TypeImage, v.(string))
|
||||
}
|
||||
}
|
||||
|
||||
if imageSize, ok := d.GetOk("image_size"); ok {
|
||||
|
||||
Reference in New Issue
Block a user