provider

package
v0.0.0-...-fff682c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const NDFC_BASEPATH = "/appcenter/cisco/ndfc/api/v1"

Variables

This section is empty.

Functions

func New

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

func NewInterfaceEthernetDataSource

func NewInterfaceEthernetDataSource() datasource.DataSource

func NewInterfaceEthernetResource

func NewInterfaceEthernetResource() resource.Resource

func NewInterfaceLoopbackDataSource

func NewInterfaceLoopbackDataSource() datasource.DataSource

func NewInterfaceLoopbackResource

func NewInterfaceLoopbackResource() resource.Resource

func NewInterfaceVlanDataSource

func NewInterfaceVlanDataSource() datasource.DataSource

func NewInterfaceVlanResource

func NewInterfaceVlanResource() resource.Resource

func NewNetworkDataSource

func NewNetworkDataSource() datasource.DataSource

func NewNetworkResource

func NewNetworkResource() resource.Resource

func NewVRFDataSource

func NewVRFDataSource() datasource.DataSource

func NewVRFResource

func NewVRFResource() resource.Resource

Types

type InterfaceEthernet

type InterfaceEthernet struct {
	Id                   types.String `tfsdk:"id"`
	SerialNumber         types.String `tfsdk:"serial_number"`
	InterfaceName        types.String `tfsdk:"interface_name"`
	Policy               types.String `tfsdk:"policy"`
	BpduGuard            types.String `tfsdk:"bpdu_guard"`
	PortTypeFast         types.Bool   `tfsdk:"port_type_fast"`
	Mtu                  types.String `tfsdk:"mtu"`
	Speed                types.String `tfsdk:"speed"`
	AccessVlan           types.Int64  `tfsdk:"access_vlan"`
	InterfaceDescription types.String `tfsdk:"interface_description"`
	OrphanPort           types.Bool   `tfsdk:"orphan_port"`
	FreeformConfig       types.String `tfsdk:"freeform_config"`
	AdminState           types.Bool   `tfsdk:"admin_state"`
	Ptp                  types.Bool   `tfsdk:"ptp"`
	Netflow              types.Bool   `tfsdk:"netflow"`
	NetflowMonitor       types.String `tfsdk:"netflow_monitor"`
	NetflowSampler       types.String `tfsdk:"netflow_sampler"`
	AllowedVlans         types.String `tfsdk:"allowed_vlans"`
	NativeVlan           types.Int64  `tfsdk:"native_vlan"`
}

type InterfaceEthernetDataSource

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

func (*InterfaceEthernetDataSource) Configure

func (*InterfaceEthernetDataSource) Metadata

func (*InterfaceEthernetDataSource) Read

func (*InterfaceEthernetDataSource) Schema

type InterfaceEthernetResource

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

func (*InterfaceEthernetResource) Configure

func (*InterfaceEthernetResource) Create

func (*InterfaceEthernetResource) Delete

func (*InterfaceEthernetResource) ImportState

func (*InterfaceEthernetResource) Metadata

func (*InterfaceEthernetResource) Read

func (*InterfaceEthernetResource) Schema

func (*InterfaceEthernetResource) Update

type InterfaceLoopback

type InterfaceLoopback struct {
	Id                   types.String `tfsdk:"id"`
	SerialNumber         types.String `tfsdk:"serial_number"`
	InterfaceName        types.String `tfsdk:"interface_name"`
	Policy               types.String `tfsdk:"policy"`
	Vrf                  types.String `tfsdk:"vrf"`
	Ipv4Address          types.String `tfsdk:"ipv4_address"`
	Ipv6Address          types.String `tfsdk:"ipv6_address"`
	RouteMapTag          types.String `tfsdk:"route_map_tag"`
	InterfaceDescription types.String `tfsdk:"interface_description"`
	FreeformConfig       types.String `tfsdk:"freeform_config"`
	AdminState           types.Bool   `tfsdk:"admin_state"`
}

type InterfaceLoopbackDataSource

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

func (*InterfaceLoopbackDataSource) Configure

func (*InterfaceLoopbackDataSource) Metadata

func (*InterfaceLoopbackDataSource) Read

func (*InterfaceLoopbackDataSource) Schema

type InterfaceLoopbackResource

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

func (*InterfaceLoopbackResource) Configure

func (*InterfaceLoopbackResource) Create

func (*InterfaceLoopbackResource) Delete

func (*InterfaceLoopbackResource) ImportState

func (*InterfaceLoopbackResource) Metadata

func (*InterfaceLoopbackResource) Read

func (*InterfaceLoopbackResource) Schema

func (*InterfaceLoopbackResource) Update

type InterfaceVlan

type InterfaceVlan struct {
	Id                        types.String `tfsdk:"id"`
	SerialNumber              types.String `tfsdk:"serial_number"`
	InterfaceName             types.String `tfsdk:"interface_name"`
	Policy                    types.String `tfsdk:"policy"`
	Vrf                       types.String `tfsdk:"vrf"`
	Ipv4Address               types.String `tfsdk:"ipv4_address"`
	Ipv4PrefixLength          types.Int64  `tfsdk:"ipv4_prefix_length"`
	Mtu                       types.Int64  `tfsdk:"mtu"`
	RoutingTag                types.String `tfsdk:"routing_tag"`
	DisableIpRedirects        types.Bool   `tfsdk:"disable_ip_redirects"`
	InterfaceDescription      types.String `tfsdk:"interface_description"`
	FreeformConfig            types.String `tfsdk:"freeform_config"`
	AdminState                types.Bool   `tfsdk:"admin_state"`
	Hsrp                      types.Bool   `tfsdk:"hsrp"`
	HsrpVip                   types.String `tfsdk:"hsrp_vip"`
	HsrpGroup                 types.Int64  `tfsdk:"hsrp_group"`
	HsrpVersion               types.String `tfsdk:"hsrp_version"`
	HsrpPriority              types.Int64  `tfsdk:"hsrp_priority"`
	HsrpPreempt               types.Bool   `tfsdk:"hsrp_preempt"`
	HsrpMac                   types.String `tfsdk:"hsrp_mac"`
	DhcpServer1               types.String `tfsdk:"dhcp_server_1"`
	DhcpServer1Vrf            types.String `tfsdk:"dhcp_server_1_vrf"`
	DhcpServer2               types.String `tfsdk:"dhcp_server_2"`
	DhcpServer2Vrf            types.String `tfsdk:"dhcp_server_2_vrf"`
	DhcpServer3               types.String `tfsdk:"dhcp_server_3"`
	DhcpServer3Vrf            types.String `tfsdk:"dhcp_server_3_vrf"`
	AdvertiseSubnetInUnderlay types.Bool   `tfsdk:"advertise_subnet_in_underlay"`
	Netflow                   types.Bool   `tfsdk:"netflow"`
	NetflowMonitor            types.String `tfsdk:"netflow_monitor"`
	NetflowSampler            types.String `tfsdk:"netflow_sampler"`
}

type InterfaceVlanDataSource

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

func (*InterfaceVlanDataSource) Configure

func (*InterfaceVlanDataSource) Metadata

func (*InterfaceVlanDataSource) Read

func (*InterfaceVlanDataSource) Schema

type InterfaceVlanResource

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

func (*InterfaceVlanResource) Configure

func (*InterfaceVlanResource) Create

func (*InterfaceVlanResource) Delete

func (*InterfaceVlanResource) ImportState

func (*InterfaceVlanResource) Metadata

func (*InterfaceVlanResource) Read

func (*InterfaceVlanResource) Schema

func (*InterfaceVlanResource) Update

type NdfcProvider

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

NdfcProvider defines the provider implementation.

func (*NdfcProvider) Configure

func (*NdfcProvider) DataSources

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

func (*NdfcProvider) Metadata

Metadata returns the provider type name.

func (*NdfcProvider) Resources

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

func (*NdfcProvider) Schema

type NdfcProviderData

type NdfcProviderData struct {
	Client      *nd.Client
	UpdateMutex *sync.Mutex
}

NdfcProviderData describes the data maintained by the provider.

type NdfcProviderModel

type NdfcProviderModel struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
	Domain   types.String `tfsdk:"domain"`
	URL      types.String `tfsdk:"url"`
	Insecure types.Bool   `tfsdk:"insecure"`
	Retries  types.Int64  `tfsdk:"retries"`
}

NdfcProviderModel describes the provider data model.

type Network

type Network struct {
	Id                       types.String              `tfsdk:"id"`
	FabricName               types.String              `tfsdk:"fabric_name"`
	NetworkName              types.String              `tfsdk:"network_name"`
	DisplayName              types.String              `tfsdk:"display_name"`
	NetworkId                types.Int64               `tfsdk:"network_id"`
	NetworkTemplate          types.String              `tfsdk:"network_template"`
	NetworkExtensionTemplate types.String              `tfsdk:"network_extension_template"`
	VrfName                  types.String              `tfsdk:"vrf_name"`
	GatewayIpv4Address       types.String              `tfsdk:"gateway_ipv4_address"`
	VlanId                   types.Int64               `tfsdk:"vlan_id"`
	GatewayIpv6Address       types.String              `tfsdk:"gateway_ipv6_address"`
	Layer2Only               types.Bool                `tfsdk:"layer2_only"`
	ArpSuppression           types.Bool                `tfsdk:"arp_suppression"`
	IngressReplication       types.Bool                `tfsdk:"ingress_replication"`
	MulticastGroup           types.String              `tfsdk:"multicast_group"`
	DhcpRelayServers         []NetworkDhcpRelayServers `tfsdk:"dhcp_relay_servers"`
	DhcpRelayLoopbackId      types.Int64               `tfsdk:"dhcp_relay_loopback_id"`
	VlanName                 types.String              `tfsdk:"vlan_name"`
	InterfaceDescription     types.String              `tfsdk:"interface_description"`
	Mtu                      types.Int64               `tfsdk:"mtu"`
	LoopbackRoutingTag       types.Int64               `tfsdk:"loopback_routing_tag"`
	Trm                      types.Bool                `tfsdk:"trm"`
	SecondaryGateway1        types.String              `tfsdk:"secondary_gateway_1"`
	SecondaryGateway2        types.String              `tfsdk:"secondary_gateway_2"`
	SecondaryGateway3        types.String              `tfsdk:"secondary_gateway_3"`
	SecondaryGateway4        types.String              `tfsdk:"secondary_gateway_4"`
	RouteTargetBoth          types.Bool                `tfsdk:"route_target_both"`
	Netflow                  types.Bool                `tfsdk:"netflow"`
	SviNetflowMonitor        types.String              `tfsdk:"svi_netflow_monitor"`
	VlanNetflowMonitor       types.String              `tfsdk:"vlan_netflow_monitor"`
	L3GatwayBorder           types.Bool                `tfsdk:"l3_gatway_border"`
	Attachments              []NetworkAttachments      `tfsdk:"attachments"`
}

type NetworkAttachments

type NetworkAttachments struct {
	SerialNumber      types.String `tfsdk:"serial_number"`
	AttachSwitchPorts types.String `tfsdk:"attach_switch_ports"`
	DetachSwitchPorts types.String `tfsdk:"detach_switch_ports"`
	VlanId            types.Int64  `tfsdk:"vlan_id"`
	FreeformConfig    types.String `tfsdk:"freeform_config"`
}

type NetworkDataSource

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

func (*NetworkDataSource) Configure

func (*NetworkDataSource) Metadata

func (*NetworkDataSource) Read

func (*NetworkDataSource) Schema

type NetworkDhcpRelayServers

type NetworkDhcpRelayServers struct {
	Address types.String `tfsdk:"address"`
	Vrf     types.String `tfsdk:"vrf"`
}

type NetworkResource

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

func (*NetworkResource) Configure

func (*NetworkResource) Create

func (*NetworkResource) Delete

func (*NetworkResource) Deploy

func (r *NetworkResource) Deploy(ctx context.Context, state Network, expectedStatus string) diag.Diagnostics

func (*NetworkResource) ImportState

func (*NetworkResource) Metadata

func (*NetworkResource) Read

func (*NetworkResource) Schema

func (*NetworkResource) Update

func (*NetworkResource) WaitForStatus

func (r *NetworkResource) WaitForStatus(ctx context.Context, state Network, expectedStatus string) diag.Diagnostics

type VRF

type VRF struct {
	Id                          types.String     `tfsdk:"id"`
	FabricName                  types.String     `tfsdk:"fabric_name"`
	VrfName                     types.String     `tfsdk:"vrf_name"`
	VrfTemplate                 types.String     `tfsdk:"vrf_template"`
	VrfExtensionTemplate        types.String     `tfsdk:"vrf_extension_template"`
	VrfId                       types.Int64      `tfsdk:"vrf_id"`
	VlanId                      types.Int64      `tfsdk:"vlan_id"`
	VlanName                    types.String     `tfsdk:"vlan_name"`
	InterfaceDescription        types.String     `tfsdk:"interface_description"`
	VrfDescription              types.String     `tfsdk:"vrf_description"`
	Mtu                         types.Int64      `tfsdk:"mtu"`
	LoopbackRoutingTag          types.Int64      `tfsdk:"loopback_routing_tag"`
	RedistributeDirectRouteMap  types.String     `tfsdk:"redistribute_direct_route_map"`
	MaxBgpPaths                 types.Int64      `tfsdk:"max_bgp_paths"`
	MaxIbgpPaths                types.Int64      `tfsdk:"max_ibgp_paths"`
	Ipv6LinkLocal               types.Bool       `tfsdk:"ipv6_link_local"`
	Trm                         types.Bool       `tfsdk:"trm"`
	NoRp                        types.Bool       `tfsdk:"no_rp"`
	RpExternal                  types.Bool       `tfsdk:"rp_external"`
	RpAddress                   types.String     `tfsdk:"rp_address"`
	RpLoopbackId                types.Int64      `tfsdk:"rp_loopback_id"`
	UnderlayMulticastAddress    types.String     `tfsdk:"underlay_multicast_address"`
	OverlayMulticastGroups      types.String     `tfsdk:"overlay_multicast_groups"`
	MvpnInterAs                 types.Bool       `tfsdk:"mvpn_inter_as"`
	TrmBgwMsite                 types.Bool       `tfsdk:"trm_bgw_msite"`
	AdvertiseHostRoutes         types.Bool       `tfsdk:"advertise_host_routes"`
	AdvertiseDefaultRoute       types.Bool       `tfsdk:"advertise_default_route"`
	ConfigureStaticDefaultRoute types.Bool       `tfsdk:"configure_static_default_route"`
	BgpPassword                 types.String     `tfsdk:"bgp_password"`
	BgpPasswordType             types.String     `tfsdk:"bgp_password_type"`
	Netflow                     types.Bool       `tfsdk:"netflow"`
	NetflowMonitor              types.String     `tfsdk:"netflow_monitor"`
	DisableRtAuto               types.Bool       `tfsdk:"disable_rt_auto"`
	RouteTargetImport           types.String     `tfsdk:"route_target_import"`
	RouteTargetExport           types.String     `tfsdk:"route_target_export"`
	RouteTargetImportEvpn       types.String     `tfsdk:"route_target_import_evpn"`
	RouteTargetExportEvpn       types.String     `tfsdk:"route_target_export_evpn"`
	RouteTargetImportMvpn       types.String     `tfsdk:"route_target_import_mvpn"`
	RouteTargetExportMvpn       types.String     `tfsdk:"route_target_export_mvpn"`
	RouteTargetImportCloudEvpn  types.String     `tfsdk:"route_target_import_cloud_evpn"`
	RouteTargetExportCloudEvpn  types.String     `tfsdk:"route_target_export_cloud_evpn"`
	Attachments                 []VRFAttachments `tfsdk:"attachments"`
}

type VRFAttachments

type VRFAttachments struct {
	SerialNumber   types.String `tfsdk:"serial_number"`
	VlanId         types.Int64  `tfsdk:"vlan_id"`
	FreeformConfig types.String `tfsdk:"freeform_config"`
	LoopbackId     types.Int64  `tfsdk:"loopback_id"`
	LoopbackIpv4   types.String `tfsdk:"loopback_ipv4"`
	LoopbackIpv6   types.String `tfsdk:"loopback_ipv6"`
}

type VRFDataSource

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

func (*VRFDataSource) Configure

func (*VRFDataSource) Metadata

func (*VRFDataSource) Read

func (*VRFDataSource) Schema

type VRFResource

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

func (*VRFResource) Configure

func (*VRFResource) Create

func (*VRFResource) Delete

func (*VRFResource) Deploy

func (r *VRFResource) Deploy(ctx context.Context, state VRF, expectedStatus string) diag.Diagnostics

func (*VRFResource) ImportState

func (*VRFResource) Metadata

func (*VRFResource) Read

func (*VRFResource) Schema

func (*VRFResource) Update

func (*VRFResource) WaitForStatus

func (r *VRFResource) WaitForStatus(ctx context.Context, state VRF, expectedStatus string) diag.Diagnostics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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