Skip to content

Commit

Permalink
Fix null pointer, remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kita committed Oct 30, 2024
1 parent 8933960 commit 0230adf
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions ibm/service/power/resource_ibm_pi_virtual_serial_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func resourceIBMPIVirtualSerialNumberCreate(ctx context.Context, d *schema.Resou
if err != nil {
return diag.FromErr(err)
}
oldPvmInstanceId = *vsn.PvmInstanceID
if vsn.PvmInstanceID != nil {
oldPvmInstanceId = *vsn.PvmInstanceID
}
if v, ok := d.GetOk(Arg_Description); ok {
description := v.(string)
if description != *vsn.Description {
Expand Down Expand Up @@ -346,15 +348,6 @@ func resourceIBMPIVirtualSerialNumberUpdate(ctx context.Context, d *schema.Resou
return resourceIBMPIVirtualSerialNumberRead(ctx, d, meta)
}

func flattenVirtualSerialNumberToListSerialType(vsn *models.VirtualSerialNumber) []map[string]interface{} {
v := make([]map[string]interface{}, 1)
v[0] = map[string]interface{}{
Attr_Description: vsn.Description,
Attr_Serial: vsn.Serial,
}
return v
}

func startLparAfterVSNChange(ctx context.Context, client *instance.IBMPIInstanceClient, id string, timeout time.Duration) error {
body := &models.PVMInstanceAction{
Action: flex.PtrToString(Action_Start),
Expand Down

0 comments on commit 0230adf

Please sign in to comment.