provider

package
v0.0.0-...-fd08d72 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MPL-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewDeviceDataSource

func NewDeviceDataSource() datasource.DataSource

func NewDeviceSwitchDataSource

func NewDeviceSwitchDataSource() datasource.DataSource

func NewDeviceSwitchResource

func NewDeviceSwitchResource() resource.Resource

func NewExampleFunction

func NewExampleFunction() function.Function

Types

type DeviceDataSource

type DeviceDataSource struct {
	// contains filtered or unexported fields
}

DeviceDataSource defines the data source implementation.

func (*DeviceDataSource) Configure

func (*DeviceDataSource) Metadata

func (*DeviceDataSource) Read

func (*DeviceDataSource) Schema

type DeviceDataSourceModel

type DeviceDataSourceModel struct {
	Mac  types.String `tfsdk:"mac"`
	Site types.String `tfsdk:"site"`

	// Read Only
	ID            types.String                                 `tfsdk:"id"`
	Adopted       types.Bool                                   `tfsdk:"adopted"`
	Disabled      types.Bool                                   `tfsdk:"disabled"`
	Model         types.String                                 `tfsdk:"model"`
	Name          types.String                                 `tfsdk:"name"`
	PortOverrides map[string]DevicePortOverrideDataSourceModel `tfsdk:"port_overrides"`
	State         types.String                                 `tfsdk:"state"`
	Type          types.String                                 `tfsdk:"type"`
}

DeviceDataSourceModel describes the data source data model.

type DevicePortOverrideDataSourceModel

type DevicePortOverrideDataSourceModel struct {
	AggregateNumPorts        types.Int32  `tfsdk:"aggregate_num_ports"`
	ExcludedNetworkIDs       types.List   `tfsdk:"excluded_network_ids"`
	Name                     types.String `tfsdk:"name"`
	NativeNetworkID          types.String `tfsdk:"native_network_id"`
	OpMode                   types.String `tfsdk:"op_mode"`
	POEMode                  types.String `tfsdk:"poe_mode"`
	PortProfileID            types.String `tfsdk:"port_profile_id"`
	PortSecurityEnabled      types.Bool   `tfsdk:"port_security_enabled"`
	PortSecurityMACAddresses types.List   `tfsdk:"port_security_mac_addresses"`
}

type DeviceSwitchConfigNetworkDataSourceModel

type DeviceSwitchConfigNetworkDataSourceModel struct {
	AlternativeDNS iptypes.IPv4Address `tfsdk:"alternative_dns"`
	BondingEnabled types.Bool          `tfsdk:"bonding_enabled"`
	DNSSuffix      types.String        `tfsdk:"dns_suffix"`
	Gateway        iptypes.IPv4Address `tfsdk:"gateway"`
	IP             iptypes.IPv4Address `tfsdk:"ip"`
	Netmask        iptypes.IPv4Address `tfsdk:"netmask"`
	PreferredDNS   iptypes.IPv4Address `tfsdk:"preferred_dns"`
	Type           types.String        `tfsdk:"type"`
}

type DeviceSwitchDataSource

type DeviceSwitchDataSource struct {
	// contains filtered or unexported fields
}

DeviceSwitchDataSource defines the data source implementation.

func (*DeviceSwitchDataSource) Configure

func (*DeviceSwitchDataSource) Metadata

func (*DeviceSwitchDataSource) Read

func (*DeviceSwitchDataSource) Schema

type DeviceSwitchDataSourceModel

type DeviceSwitchDataSourceModel struct {
	Mac  types.String `tfsdk:"mac"`
	Site types.String `tfsdk:"site"`

	// Read Only
	ID                         types.String                                       `tfsdk:"id"`
	Adopted                    types.Bool                                         `tfsdk:"adopted"`
	ConfigNetwork              *DeviceSwitchConfigNetworkDataSourceModel          `tfsdk:"config_network"`
	Disabled                   types.Bool                                         `tfsdk:"disabled"`
	Dot1XFallbackNetworkID     types.String                                       `tfsdk:"dot1x_fallback_networkconf_id"`
	Dot1XPortctrlEnabled       types.Bool                                         `tfsdk:"dot1x_portctrl_enabled"`
	FlowctrlEnabled            types.Bool                                         `tfsdk:"flowctrl_enabled"`
	IP                         types.String                                       `tfsdk:"ip"`
	JumboframeEnabled          types.Bool                                         `tfsdk:"jumboframe_enabled"`
	LEDOverride                types.String                                       `tfsdk:"led_override"`
	LEDOverrideColor           types.String                                       `tfsdk:"led_override_color"`
	LEDOverrideColorBrightness types.Int32                                        `tfsdk:"led_override_color_brightness"`
	MgmtNetworkID              types.String                                       `tfsdk:"mgmt_network_id"`
	Model                      types.String                                       `tfsdk:"model"`
	Name                       types.String                                       `tfsdk:"name"`
	PortOverrides              map[string]DeviceSwitchPortOverrideDataSourceModel `tfsdk:"port_overrides"`
	SnmpContact                types.String                                       `tfsdk:"snmp_contact"`
	SnmpLocation               types.String                                       `tfsdk:"snmp_location"`
	State                      types.String                                       `tfsdk:"state"`
	StpPriority                types.String                                       `tfsdk:"stp_priority"`
	StpVersion                 types.String                                       `tfsdk:"stp_version"`
	Type                       types.String                                       `tfsdk:"type"`
}

DeviceSwitchDataSourceModel describes the data source data model.

type DeviceSwitchLEDSettingsResourceModel

type DeviceSwitchLEDSettingsResourceModel struct {
	Brightness types.Int32  `tfsdk:"brightness"`
	Color      types.String `tfsdk:"color"`
	Enabled    types.Bool   `tfsdk:"enabled"`
}

func (*DeviceSwitchLEDSettingsResourceModel) GetOverrideState

func (m *DeviceSwitchLEDSettingsResourceModel) GetOverrideState() types.String

type DeviceSwitchPortOverrideDataSourceModel

type DeviceSwitchPortOverrideDataSourceModel struct {
	AggregateNumPorts            types.Int32                                        `tfsdk:"aggregate_num_ports"`
	AutoNegotiate                types.Bool                                         `tfsdk:"auto_negotiate"`
	Dot1XCtrl                    types.String                                       `tfsdk:"dot1x_ctrl"`
	Dot1XIDleTimeout             types.Int32                                        `tfsdk:"dot1x_idle_timeout"`
	EgressRateLimitKbps          types.Int32                                        `tfsdk:"egress_rate_limit_kbps"`
	EgressRateLimitKbpsEnabled   types.Bool                                         `tfsdk:"egress_rate_limit_kbps_enabled"`
	ExcludedNetworkIDs           types.List                                         `tfsdk:"excluded_network_ids"`
	FECMode                      types.String                                       `tfsdk:"fec_mode"`
	Forward                      types.String                                       `tfsdk:"forward"`
	FullDuplex                   types.Bool                                         `tfsdk:"full_duplex"`
	Isolation                    types.Bool                                         `tfsdk:"isolation"`
	LLPMEDEnabled                types.Bool                                         `tfsdk:"lldp_med_enabled"`
	LLPMEDNotifyEnabled          types.Bool                                         `tfsdk:"lldp_med_notify_enabled"`
	MirrorPortIDX                types.Int32                                        `tfsdk:"mirror_port_idx"`
	Name                         types.String                                       `tfsdk:"name"`
	NativeNetworkID              types.String                                       `tfsdk:"native_network_id"`
	Operation                    types.String                                       `tfsdk:"operation"`
	PriorityQueue1Level          types.Int32                                        `tfsdk:"priority_queue1_level"`
	PriorityQueue2Level          types.Int32                                        `tfsdk:"priority_queue2_level"`
	PriorityQueue3Level          types.Int32                                        `tfsdk:"priority_queue3_level"`
	PriorityQueue4Level          types.Int32                                        `tfsdk:"priority_queue4_level"`
	POEMode                      types.String                                       `tfsdk:"poe_mode"`
	PortKeepaliveEnabled         types.Bool                                         `tfsdk:"port_keepalive_enabled"`
	PortProfileID                types.String                                       `tfsdk:"port_profile_id"`
	PortSecurityEnabled          types.Bool                                         `tfsdk:"port_security_enabled"`
	PortSecurityMACAddresses     types.List                                         `tfsdk:"port_security_mac_addresses"`
	QOSProfile                   *DeviceSwitchPortOverrideQOSProfileDataSourceModel `tfsdk:"qos_profile"`
	SettingPreference            types.String                                       `tfsdk:"setting_preference"`
	Speed                        types.Int32                                        `tfsdk:"speed"`
	StormControlBroadcastEnabled types.Bool                                         `tfsdk:"storm_control_broadcast_enabled"`
	StormControlBroadcastLevel   types.Int32                                        `tfsdk:"storm_control_broadcast_level"`
	StormControlBroadcastRate    types.Int32                                        `tfsdk:"storm_control_broadcast_rate"`
	StormControlMulticastEnabled types.Bool                                         `tfsdk:"storm_control_multicast_enabled"`
	StormControlMulticastLevel   types.Int32                                        `tfsdk:"storm_control_multicast_level"`
	StormControlMulticastRate    types.Int32                                        `tfsdk:"storm_control_mulitcast_rate"`
	StormControlType             types.String                                       `tfsdk:"storm_control_type"`
	StormControlUnicastEnabled   types.Bool                                         `tfsdk:"storm_control_unicast_enabled"`
	StormControlUnicastLevel     types.Int32                                        `tfsdk:"storm_control_unicast_level"`
	StormControlUnicastRate      types.Int32                                        `tfsdk:"storm_control_unicast_rate"`
	STPPortMode                  types.Bool                                         `tfsdk:"stp_port_mode"`
	TaggedVLANMgmt               types.String                                       `tfsdk:"tagged_vlan_mgmt"`
	VoiceNetworkID               types.String                                       `tfsdk:"voice_networkconf_id"`
}

type DeviceSwitchPortOverrideQOSMarkingDataSourceModel

type DeviceSwitchPortOverrideQOSMarkingDataSourceModel struct {
	CosCode          types.Int32 `tfsdk:"cos_code"`
	DscpCode         types.Int32 `tfsdk:"dscp_code"`
	IPPrecedenceCode types.Int32 `tfsdk:"ip_precedence_code"`
	Queue            types.Int32 `tfsdk:"queue"`
}

type DeviceSwitchPortOverrideQOSMatchingDataSourceModel

type DeviceSwitchPortOverrideQOSMatchingDataSourceModel struct {
	CosCode          types.Int32  `tfsdk:"cos_code"`
	DscpCode         types.Int32  `tfsdk:"dscp_code"`
	DstPort          types.Int32  `tfsdk:"dst_port"`
	IPPrecedenceCode types.Int32  `tfsdk:"ip_precedence_code"`
	Protocol         types.String `tfsdk:"protocol"`
	SrcPort          types.Int32  `tfsdk:"src_port"`
}

type DeviceSwitchPortOverrideQOSPolicyDataSourceModel

type DeviceSwitchPortOverrideQOSPolicyDataSourceModel struct {
	QOSMarking  DeviceSwitchPortOverrideQOSMarkingDataSourceModel  `tfsdk:"qos_marking"`
	QOSMatching DeviceSwitchPortOverrideQOSMatchingDataSourceModel `tfsdk:"qos_matching"`
}

type DeviceSwitchPortOverrideQOSProfileDataSourceModel

type DeviceSwitchPortOverrideQOSProfileDataSourceModel struct {
	QOSPolicies    []DeviceSwitchPortOverrideQOSPolicyDataSourceModel `tfsdk:"qos_policies"`
	QOSProfileMode types.String                                       `tfsdk:"qos_profile_mode"`
}

type DeviceSwitchPortOverrideResourceModel

type DeviceSwitchPortOverrideResourceModel struct {
	// Configurable Values
	Disabled                 types.Bool   `tfsdk:"disabled"`
	AggregateNumPorts        types.Int32  `tfsdk:"aggregate_num_ports"`
	ExcludedTaggedNetworkIds types.List   `tfsdk:"excluded_tagged_network_ids"`
	FullDuplex               types.Bool   `tfsdk:"full_duplex"`
	LinkSpeed                types.Int32  `tfsdk:"link_speed"`
	MirrorPortIndex          types.Int32  `tfsdk:"mirror_port_index"`
	Name                     types.String `tfsdk:"name"`
	NativeNetworkID          types.String `tfsdk:"native_network_id"`
	Operation                types.String `tfsdk:"operation"`
	POEMode                  types.String `tfsdk:"poe_mode"`
	PortProfileID            types.String `tfsdk:"port_profile_id"`
	TaggedVLANManagement     types.String `tfsdk:"tagged_vlan_management"`
}

type DeviceSwitchResource

type DeviceSwitchResource struct {
	// contains filtered or unexported fields
}

DeviceSwitchResource defines the resource implementation.

func (*DeviceSwitchResource) Configure

func (*DeviceSwitchResource) Create

func (*DeviceSwitchResource) Delete

func (*DeviceSwitchResource) ImportState

func (*DeviceSwitchResource) Metadata

func (*DeviceSwitchResource) Read

func (*DeviceSwitchResource) Schema

func (*DeviceSwitchResource) Update

type DeviceSwitchResourceModel

type DeviceSwitchResourceModel struct {
	// Computed Values
	ID     types.String `tfsdk:"id"`
	Model  types.String `tfsdk:"model"`
	SiteID types.String `tfsdk:"site_id"`

	// Configurable Values
	Adopt               types.Bool                                       `tfsdk:"adopt"`
	Disabled            types.Bool                                       `tfsdk:"disabled"`
	LEDSettings         *DeviceSwitchLEDSettingsResourceModel            `tfsdk:"led_settings"`
	Mac                 customtype.Mac                                   `tfsdk:"mac"`
	ManagementNetworkID types.String                                     `tfsdk:"management_network_id"`
	Name                types.String                                     `tfsdk:"name"`
	PortOverrides       map[string]DeviceSwitchPortOverrideResourceModel `tfsdk:"port_overrides"`
	RemoveOnDestroy     types.Bool                                       `tfsdk:"remove_on_destroy"`
	Site                types.String                                     `tfsdk:"site"`
	SNMPContact         types.String                                     `tfsdk:"snmp_contact"`
	SNMPLocation        types.String                                     `tfsdk:"snmp_location"`
	StaticIPSettings    *DeviceSwitchStaticIPSettingResourceModel        `tfsdk:"static_ip_settings"`
}

type DeviceSwitchStaticIPSettingResourceModel

type DeviceSwitchStaticIPSettingResourceModel struct {
	AlternativeDNS iptypes.IPv4Address `tfsdk:"alternative_dns"`
	BondingEnabled types.Bool          `tfsdk:"bonding_enabled"`
	DNSSuffix      types.String        `tfsdk:"dns_suffix"`
	Gateway        iptypes.IPv4Address `tfsdk:"gateway"`
	IP             iptypes.IPv4Address `tfsdk:"ip"`
	Netmask        iptypes.IPv4Address `tfsdk:"netmask"`
	PreferredDNS   iptypes.IPv4Address `tfsdk:"preferred_dns"`
}

type ExampleFunction

type ExampleFunction struct{}

func (ExampleFunction) Definition

func (ExampleFunction) Metadata

func (ExampleFunction) Run

type UnifiProvider

type UnifiProvider struct {
	// contains filtered or unexported fields
}

UnifiProvider defines the provider implementation.

func (*UnifiProvider) Configure

func (*UnifiProvider) DataSources

func (p *UnifiProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*UnifiProvider) Functions

func (p *UnifiProvider) Functions(ctx context.Context) []func() function.Function

func (*UnifiProvider) Metadata

func (*UnifiProvider) Resources

func (p *UnifiProvider) Resources(ctx context.Context) []func() resource.Resource

func (*UnifiProvider) Schema

type UnifiProviderModel

type UnifiProviderModel struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
	URL      types.String `tfsdk:"url"`
	Site     types.String `tfsdk:"site"`
	Insecure types.Bool   `tfsdk:"insecure"`
}

UnifiProviderModel describes the provider data model.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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