Skip to content

Commit

Permalink
Using the helpers contants
Browse files Browse the repository at this point in the history
Fixes #1823

Signed-off-by: Yussuf Shaikh <[email protected]>
  • Loading branch information
yussufsh authored and hkantare committed Aug 25, 2020
1 parent 15ace48 commit 797bfe4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ibm/resource_ibm_pi_network_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func resourceIBMPINetworkPort() *schema.Resource {
"portID": "6c9d0e42-73f3-492f-840d-3d4a7a573014",
*/

"ipaddress": {
helpers.PINetworkPortIPAddress: {
Type: schema.TypeString,
Optional: true,
Computed: true,
Expand Down Expand Up @@ -82,8 +82,8 @@ func resourceIBMPINetworkPortCreate(d *schema.ResourceData, meta interface{}) er
}
powerinstanceid := d.Get(helpers.PICloudInstanceId).(string)
networkname := d.Get(helpers.PINetworkName).(string)
description := d.Get("description").(string)
ipaddress := d.Get("ipaddress").(string)
description := d.Get(helpers.PINetworkPortDescription).(string)
ipaddress := d.Get(helpers.PINetworkPortIPAddress).(string)

nwportBody := &models.NetworkPortCreate{Description: description}

Expand Down Expand Up @@ -138,7 +138,7 @@ func resourceIBMPINetworkPortRead(d *schema.ResourceData, meta interface{}) erro
return err
}

d.Set("ipaddress", networkdata.IPAddress)
d.Set(helpers.PINetworkPortIPAddress, networkdata.IPAddress)
d.Set("macaddress", networkdata.MacAddress)
d.Set("status", networkdata.Status)
d.Set("portid", networkdata.PortID)
Expand Down

0 comments on commit 797bfe4

Please sign in to comment.