Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
remove address from metal_facility
Browse files Browse the repository at this point in the history
Removing the address attribute because it is not handled properly.

The EM API returns:
{ "address": { "href": "#29e55e9e-e2d6-4839-a05c-ce6d65e146d9"} }

Packngo expects:
{ "address": { "id": ""} }

Signed-off-by: Marques Johansson <[email protected]>
  • Loading branch information
displague committed Feb 10, 2021
1 parent 7f0f04c commit 5511a04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions docs/data-sources/facility.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ The following attributes are exported:
* `id` - The ID of the facility
* `name` - The name of the facilityg system running on the device
* `features` - The features of the facility
* `address` - The facility address
* `id` - ID of the address
17 changes: 1 addition & 16 deletions metal/datasource_metal_facility.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ func dataSourceMetalFacility() *schema.Resource {
Optional: true,
Computed: true,
},
"address": {
Type: schema.TypeMap,
Description: "The address of this Facility.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Computed: true,
},
}},
Optional: true,
Computed: true,
},
},
}
}
Expand All @@ -64,10 +51,8 @@ func dataSourceMetalFacilityRead(d *schema.ResourceData, meta interface{}) error
d.SetId(f.ID)
return setMap(d, map[string]interface{}{
"code": f.Code,
"name": f.Name,
"features": f.Features,
"address": map[string]interface{}{
"id": f.Address.ID,
},
})
}
}
Expand Down

0 comments on commit 5511a04

Please sign in to comment.