resource_org_inventory

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteOrgInventory added in v0.2.0

func DeleteOrgInventory(
	ctx context.Context,
	stateInventory *OrgInventoryModel,
) ([]string, diag.Diagnostics)

func DetectDeviceInfoType added in v0.2.0

func DetectDeviceInfoType(diags *diag.Diagnostics, deviceInfo string) (bool, bool)

func GenDeviceMap added in v0.2.0

func GenDeviceMap(devices *basetypes.MapValue) map[string]InventoryValue

func OrgInventoryResourceSchema

func OrgInventoryResourceSchema(ctx context.Context) schema.Schema

func TerraformToSdk

func TerraformToSdk(
	ctx context.Context,
	stateInventory *OrgInventoryModel,
	planInventory *OrgInventoryModel,
) ([]string, []string, []string, map[string]string, map[string][]string, diag.Diagnostics)

Types

type DevicesType

type DevicesType struct {
	basetypes.ObjectType
}

func (DevicesType) Equal

func (t DevicesType) Equal(o attr.Type) bool

func (DevicesType) String

func (t DevicesType) String() string

func (DevicesType) ValueFromObject

func (DevicesType) ValueFromTerraform

func (t DevicesType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (DevicesType) ValueType

func (t DevicesType) ValueType(ctx context.Context) attr.Value

type DevicesValue

type DevicesValue struct {
	DeviceprofileId      basetypes.StringValue `tfsdk:"deviceprofile_id"`
	Hostname             basetypes.StringValue `tfsdk:"hostname"`
	Id                   basetypes.StringValue `tfsdk:"id"`
	Mac                  basetypes.StringValue `tfsdk:"mac"`
	Magic                basetypes.StringValue `tfsdk:"claim_code"`
	Model                basetypes.StringValue `tfsdk:"model"`
	OrgId                basetypes.StringValue `tfsdk:"org_id"`
	Serial               basetypes.StringValue `tfsdk:"serial"`
	SiteId               basetypes.StringValue `tfsdk:"site_id"`
	DevicesType          basetypes.StringValue `tfsdk:"type"`
	UnclaimWhenDestroyed basetypes.BoolValue   `tfsdk:"unclaim_when_destroyed"`
	VcMac                basetypes.StringValue `tfsdk:"vc_mac"`
	// contains filtered or unexported fields
}

func NewDevicesValue

func NewDevicesValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (DevicesValue, diag.Diagnostics)

func NewDevicesValueMust

func NewDevicesValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) DevicesValue

func NewDevicesValueNull

func NewDevicesValueNull() DevicesValue

func NewDevicesValueUnknown

func NewDevicesValueUnknown() DevicesValue

func (DevicesValue) AttributeTypes

func (v DevicesValue) AttributeTypes(ctx context.Context) map[string]attr.Type

func (DevicesValue) Equal

func (v DevicesValue) Equal(o attr.Value) bool

func (DevicesValue) IsNull

func (v DevicesValue) IsNull() bool

func (DevicesValue) IsUnknown

func (v DevicesValue) IsUnknown() bool

func (DevicesValue) String

func (v DevicesValue) String() string

func (DevicesValue) ToObjectValue

func (DevicesValue) ToTerraformValue

func (v DevicesValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error)

func (DevicesValue) Type

func (v DevicesValue) Type(ctx context.Context) attr.Type

type InventoryType added in v0.2.2

type InventoryType struct {
	basetypes.ObjectType
}

func (InventoryType) Equal added in v0.2.2

func (t InventoryType) Equal(o attr.Type) bool

func (InventoryType) String added in v0.2.2

func (t InventoryType) String() string

func (InventoryType) ValueFromObject added in v0.2.2

func (InventoryType) ValueFromTerraform added in v0.2.2

func (t InventoryType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (InventoryType) ValueType added in v0.2.2

func (t InventoryType) ValueType(ctx context.Context) attr.Value

type InventoryValue added in v0.2.2

type InventoryValue struct {
	DeviceprofileId      basetypes.StringValue `tfsdk:"deviceprofile_id"`
	Hostname             basetypes.StringValue `tfsdk:"hostname"`
	Id                   basetypes.StringValue `tfsdk:"id"`
	Mac                  basetypes.StringValue `tfsdk:"mac"`
	Magic                basetypes.StringValue `tfsdk:"claim_code"`
	Model                basetypes.StringValue `tfsdk:"model"`
	OrgId                basetypes.StringValue `tfsdk:"org_id"`
	Serial               basetypes.StringValue `tfsdk:"serial"`
	SiteId               basetypes.StringValue `tfsdk:"site_id"`
	InventoryType        basetypes.StringValue `tfsdk:"type"`
	UnclaimWhenDestroyed basetypes.BoolValue   `tfsdk:"unclaim_when_destroyed"`
	VcMac                basetypes.StringValue `tfsdk:"vc_mac"`
	// contains filtered or unexported fields
}

func NewInventoryValue added in v0.2.2

func NewInventoryValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (InventoryValue, diag.Diagnostics)

func NewInventoryValueMust added in v0.2.2

func NewInventoryValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) InventoryValue

func NewInventoryValueNull added in v0.2.2

func NewInventoryValueNull() InventoryValue

func NewInventoryValueUnknown added in v0.2.2

func NewInventoryValueUnknown() InventoryValue

func (InventoryValue) AttributeTypes added in v0.2.2

func (v InventoryValue) AttributeTypes(ctx context.Context) map[string]attr.Type

func (InventoryValue) Equal added in v0.2.2

func (v InventoryValue) Equal(o attr.Value) bool

func (InventoryValue) IsNull added in v0.2.2

func (v InventoryValue) IsNull() bool

func (InventoryValue) IsUnknown added in v0.2.2

func (v InventoryValue) IsUnknown() bool

func (InventoryValue) String added in v0.2.2

func (v InventoryValue) String() string

func (InventoryValue) ToObjectValue added in v0.2.2

func (InventoryValue) ToTerraformValue added in v0.2.2

func (v InventoryValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error)

func (InventoryValue) Type added in v0.2.2

func (v InventoryValue) Type(ctx context.Context) attr.Type

type OrgInventoryModel

type OrgInventoryModel struct {
	Devices   types.List   `tfsdk:"devices"`
	Inventory types.Map    `tfsdk:"inventory"`
	OrgId     types.String `tfsdk:"org_id"`
}

func SdkToTerraform

func SdkToTerraform(
	ctx context.Context,
	orgId string,
	data *[]models.Inventory,
	ref_inventory *OrgInventoryModel,
) (OrgInventoryModel, diag.Diagnostics)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL