4.3.0
This commit is contained in:
@@ -42,9 +42,9 @@ import (
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/flattens"
|
||||
)
|
||||
|
||||
func flattenPcideviceList(pl pcidevice.ListPCIDevices) []map[string]interface{} {
|
||||
func flattenPcideviceList(pl *pcidevice.ListPCIDevices) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
for _, item := range pl {
|
||||
for _, item := range pl.Data {
|
||||
temp := map[string]interface{}{
|
||||
"ckey": item.CKey,
|
||||
"meta": flattens.FlattenMeta(item.Meta),
|
||||
|
||||
@@ -53,7 +53,7 @@ func utilityPcideviceCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
pcideviceId = id
|
||||
}
|
||||
|
||||
for _, pd := range pcideviceList {
|
||||
for _, pd := range pcideviceList.Data {
|
||||
if pd.ID == pcideviceId {
|
||||
return &pd, nil
|
||||
}
|
||||
|
||||
@@ -38,10 +38,12 @@ import (
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/controller"
|
||||
)
|
||||
|
||||
func utilityPcideviceListCheckPresence(ctx context.Context, m interface{}) (pcidevice.ListPCIDevices, error) {
|
||||
func utilityPcideviceListCheckPresence(ctx context.Context, m interface{}) (*pcidevice.ListPCIDevices, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
|
||||
pcideviceList, err := c.CloudBroker().PCIDevice().List(ctx)
|
||||
req := pcidevice.ListRequest{}
|
||||
|
||||
pcideviceList, err := c.CloudBroker().PCIDevice().List(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user