Skip to content

Check errors on setting non-scalars #52

Merged
merged 3 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion selvpc/resource_selvpc_resell_floatingip_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ func resourceResellFloatingIPV2Read(d *schema.ResourceData, meta interface{}) er
d.Set("project_id", floatingIP.ProjectID)
d.Set("region", floatingIP.Region)
d.Set("status", floatingIP.Status)

associatedServers := serversMapsFromStructs(floatingIP.Servers)
d.Set("servers", associatedServers)
if err := d.Set("servers", associatedServers); err != nil {
log.Printf("[DEBUG] servers: %s", err)
}

return nil
}
Expand Down
4 changes: 3 additions & 1 deletion selvpc/resource_selvpc_resell_license_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ func resourceResellLicenseV2Read(d *schema.ResourceData, meta interface{}) error
d.Set("status", license.Status)
d.Set("type", license.Type)
associatedServers := serversMapsFromStructs(license.Servers)
d.Set("servers", associatedServers)
if err := d.Set("servers", associatedServers); err != nil {
log.Printf("[DEBUG] servers: %s", err)
}

return nil
}
Expand Down
8 changes: 6 additions & 2 deletions selvpc/resource_selvpc_resell_project_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,16 @@ func resourceResellProjectV2Read(d *schema.ResourceData, meta interface{}) error
d.Set("name", project.Name)
d.Set("url", project.URL)
d.Set("enabled", project.Enabled)
d.Set("theme", project.Theme)
if err := d.Set("theme", project.Theme); err != nil {
log.Printf("[DEBUG] theme: %s", err)
}

// Set all quotas. This can be different from what the user specified since
// the project will have all available resource quotas automatically applied.
allQuotas := resourceResellProjectV2QuotasToSet(project.Quotas)
d.Set("all_quotas", allQuotas)
if err := d.Set("all_quotas", allQuotas); err != nil {
log.Printf("[DEBUG] all_quotas: %s", err)
}

return nil
}
Expand Down