Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added virtual cores capability #1798

Merged
merged 1 commit into from
Aug 14, 2020
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.12
require (
github.com/Bowery/prompt v0.0.0-20190916142128-fa8279994f75 // indirect
github.com/IBM-Cloud/bluemix-go v0.0.0-20200724061452-7e266e248891
github.com/IBM-Cloud/power-go-client v1.0.37
github.com/IBM-Cloud/power-go-client v1.0.46
github.com/IBM/apigateway-go-sdk v0.0.0-20200414212859-416e5948678a
github.com/IBM/dns-svcs-go-sdk v0.0.3
github.com/IBM/go-sdk-core v1.1.0
Expand Down
15 changes: 15 additions & 0 deletions ibm/data_source_ibm_pi_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,18 @@ func dataSourceIBMPIInstance() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"virtual_cores_assigned": {
Type: schema.TypeInt,
Computed: true,
},
"max_virtual_cores": {
Type: schema.TypeInt,
Computed: true,
},
"min_virtual_cores": {
Type: schema.TypeInt,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -143,6 +155,9 @@ func dataSourceIBMPIInstancesRead(d *schema.ResourceData, meta interface{}) erro
d.Set("maxproc", powervmdata.Maxproc)
d.Set("maxmem", powervmdata.Maxmem)
d.Set("pin_policy", powervmdata.PinPolicy)
d.Set("virtual_cores_assigned", powervmdata.VirtualCores.Assigned)
d.Set("max_virtual_cores", powervmdata.VirtualCores.Max)
d.Set("min_virtual_cores", powervmdata.VirtualCores.Min)

if powervmdata.Addresses != nil {
pvmaddress := make([]map[string]interface{}, len(powervmdata.Addresses))
Expand Down
6 changes: 5 additions & 1 deletion ibm/data_source_ibm_pi_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func dataSourceIBMPIVolume() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"wwn": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand All @@ -83,7 +87,7 @@ func dataSourceIBMPIVolumeRead(d *schema.ResourceData, meta interface{}) error {
d.Set("disk_type", volumedata.DiskType)
d.Set("bootable", volumedata.Bootable)
d.Set("state", volumedata.State)

d.Set("wwn", volumedata.Wwn)
return nil

}
Loading