Fixing a small logic error
This commit is contained in:
parent
365251f7a3
commit
8c37a95a5e
|
@ -162,15 +162,14 @@ 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 or display text is changed
|
// Check if the name is changed
|
||||||
if d.HasChange("name") || d.HasChange("display_text") {
|
if d.HasChange("name") {
|
||||||
p.SetName(name)
|
p.SetName(name)
|
||||||
|
}
|
||||||
|
|
||||||
// Compute/set the display text
|
// Check if the display text is changed
|
||||||
displaytext := d.Get("display_text").(string)
|
if d.HasChange("display_text") {
|
||||||
if displaytext == "" {
|
p.SetDisplaytext(d.Get("display_text").(string))
|
||||||
displaytext = name
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the cidr is changed
|
// Check if the cidr is changed
|
||||||
|
|
Loading…
Reference in New Issue