Skip to content

Commit

Permalink
B #440: fix removed error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
treywelsh authored and frousselet committed Apr 13, 2023
1 parent 8442172 commit e49c648
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions opennebula/resource_opennebula_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,13 @@ func flattenGroupTemplate(d *schema.ResourceData, meta interface{}, groupTpl *dy
}

err := d.Set("sunstone", []interface{}{sunstoneConfig})
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Failed to find vector",
Detail: fmt.Sprintf("group (ID: %s): %s", d.Id(), err),
})
if err != nil {
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Failed to find vector",
Detail: fmt.Sprintf("group (ID: %s): %s", d.Id(), err),
})
}
case "OPENNEBULA":

opennebulaConfig := make(map[string]interface{})
Expand All @@ -481,11 +483,13 @@ func flattenGroupTemplate(d *schema.ResourceData, meta interface{}, groupTpl *dy
}

err := d.Set("opennebula", []interface{}{opennebulaConfig})
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Failed to find vector",
Detail: fmt.Sprintf("group (ID: %s): %s", d.Id(), err),
})
if err != nil {
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Failed to find vector",
Detail: fmt.Sprintf("group (ID: %s): %s", d.Id(), err),
})
}
default:
log.Printf("[DEBUG] ignored: %s", e)
}
Expand Down

0 comments on commit e49c648

Please sign in to comment.