Skip to content

Commit

Permalink
F #523: Fix random_passwd wrong type
Browse files Browse the repository at this point in the history
  • Loading branch information
frousselet committed Jan 22, 2024
1 parent 0cf299c commit 60850dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions opennebula/shared_schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func graphicsSchema() *schema.Schema {
ConflictsWith: []string{"graphics.0.random_passwd"},
},
"random_passwd": {
Type: schema.TypeString,
Type: schema.TypeBool,
Optional: true,
ConflictsWith: []string{"graphics.0.passwd"},
},
Expand Down Expand Up @@ -921,8 +921,8 @@ func flattenTemplate(d *schema.ResourceData, inheritedVectors map[string]interfa
port, _ := vmTemplate.GetIOGraphic(vmk.Port)
t, _ := vmTemplate.GetIOGraphic(vmk.GraphicType)
keymap, _ := vmTemplate.GetIOGraphic(vmk.Keymap)
passwd, _ := vmTemplate.GetIOGraphic(vmk.Passwd)
random_passwd, _ := vmTemplate.GetIOGraphic(vmk.RandomPassword)
randomPasswd, _ := vmTemplate.GetIOGraphic(vmk.RandomPassword)

// Raw
rawVec, _ := vmTemplate.GetVector("RAW")

Expand Down Expand Up @@ -988,8 +988,7 @@ func flattenTemplate(d *schema.ResourceData, inheritedVectors map[string]interfa
"port": port,
"type": t,
"keymap": keymap,
"passwd": passwd,
"random_passwd": random_passwd,
"random_passwd": randomPasswd == "YES",
})
_, inherited := inheritedVectors["GRAPHICS"]
if !inherited {
Expand Down

0 comments on commit 60850dc

Please sign in to comment.