Reverting the behavioural change, while still fixing the logic error
This commit is contained in:
parent
eeb46e4642
commit
41536c0d58
|
@ -162,14 +162,16 @@ func resourceCloudStackNetworkUpdate(d *schema.ResourceData, meta interface{}) e
|
||||||
// Create a new parameter struct
|
// Create a new parameter struct
|
||||||
p := cs.Network.NewUpdateNetworkParams(d.Id())
|
p := cs.Network.NewUpdateNetworkParams(d.Id())
|
||||||
|
|
||||||
// Check if the name is changed
|
// Check if the name or display text is changed
|
||||||
if d.HasChange("name") {
|
if d.HasChange("name") || d.HasChange("display_text") {
|
||||||
p.SetName(name)
|
p.SetName(name)
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the display text is changed
|
// Compute/set the display text
|
||||||
if d.HasChange("display_text") {
|
displaytext := d.Get("display_text").(string)
|
||||||
p.SetDisplaytext(d.Get("display_text").(string))
|
if displaytext == "" {
|
||||||
|
displaytext = name
|
||||||
|
}
|
||||||
|
p.SetDisplaytext(displaytext)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the cidr is changed
|
// Check if the cidr is changed
|
||||||
|
|
Loading…
Reference in New Issue