provider

package
v0.0.0-...-0e26f47 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Generated code. DO NOT EDIT!

Index

Constants

This section is empty.

Variables

View Source
var (
	BgpsessionListParamsFields    = []string{"by_local_address", "by_remote_address", "created", "created_by_request", "description", "device", "device_id", "export_policies", "id", "import_policies", "last_updated", "local_address", "local_address_id", "local_as", "local_as_id", "modified_by_request", "name", "peer_group", "q", "remote_address", "remote_address_id", "remote_as", "remote_as_id", "site", "site_id", "status", "tag", "tenant", "updated_by_request"}
	BgpsessionListParamsOperators = []string{"empty", "eq", "gt", "gte", "ic", "ie", "iew", "isw", "lt", "lte", "n", "nic", "nie", "niew", "nisw"}
)
View Source
var (
	TagFieldName = "tags"
	TagSchema    = schema.ListAttribute{
		ElementType: types.StringType,
		Optional:    true,
	}
)

Functions

func FiltersSchema

func FiltersSchema(fields, ops []string) schema.NestedAttributeObject

func New

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

func NewPeerGroupDataSource

func NewPeerGroupDataSource() datasource.DataSource

func NewSessionDataSource

func NewSessionDataSource() datasource.DataSource

func NewSessionResource

func NewSessionResource() resource.Resource

func NewSessionsDataSource

func NewSessionsDataSource() datasource.DataSource

func TagsForAPIModel

func TagsForAPIModel(ctx context.Context, l types.List, diags diag.Diagnostics) *[]client.NestedTagRequest

func TagsFromAPI

func TagsFromAPI(ctx context.Context, tags *[]client.NestedTag, diags diag.Diagnostics) types.List

Types

type Filter

type Filter struct {
	Name     types.String `tfsdk:"name"`
	Operator types.String `tfsdk:"operator"`
	Value    types.String `tfsdk:"value"`
}

type Filters

type Filters []Filter

type NestedASN

type NestedASN struct {
	ASN     types.Int64  `tfsdk:"asn"`
	Display types.String `tfsdk:"display"`
	ID      types.Int64  `tfsdk:"id"`
	URL     types.String `tfsdk:"url"`
}

func NestedASNFromAPI

func NestedASNFromAPI(resp *client.NestedASN) *NestedASN

func (*NestedASN) SchemaAttributes

func (*NestedASN) SchemaAttributes() map[string]schema.Attribute

func (NestedASN) ToAPIModel

func (tfo NestedASN) ToAPIModel() client.NestedASN

type NestedBGPPeerGroup

type NestedBGPPeerGroup struct {
	Description types.String `tfsdk:"description"`
	Display     types.String `tfsdk:"display"`
	ID          types.Int64  `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	URL         types.String `tfsdk:"url"`
}

func NestedBGPPeerGroupFromAPI

func NestedBGPPeerGroupFromAPI(resp *client.NestedBGPPeerGroup) *NestedBGPPeerGroup

func (*NestedBGPPeerGroup) SchemaAttributes

func (*NestedBGPPeerGroup) SchemaAttributes() map[string]schema.Attribute

func (NestedBGPPeerGroup) ToAPIModel

func (tfo NestedBGPPeerGroup) ToAPIModel() client.NestedBGPPeerGroup

type NestedDevice

type NestedDevice struct {
	Display types.String `tfsdk:"display"`
	ID      types.Int64  `tfsdk:"id"`
	Name    types.String `tfsdk:"name"`
	URL     types.String `tfsdk:"url"`
}

func NestedDeviceFromAPI

func NestedDeviceFromAPI(resp *client.NestedDevice) *NestedDevice

func (*NestedDevice) SchemaAttributes

func (*NestedDevice) SchemaAttributes() map[string]schema.Attribute

func (NestedDevice) ToAPIModel

func (tfo NestedDevice) ToAPIModel() client.NestedDevice

type NestedIPAddress

type NestedIPAddress struct {
	Address types.String `tfsdk:"address"`
	Display types.String `tfsdk:"display"`
	Family  types.Int64  `tfsdk:"family"`
	ID      types.Int64  `tfsdk:"id"`
	URL     types.String `tfsdk:"url"`
}

func NestedIPAddressFromAPI

func NestedIPAddressFromAPI(resp *client.NestedIPAddress) *NestedIPAddress

func (*NestedIPAddress) SchemaAttributes

func (*NestedIPAddress) SchemaAttributes() map[string]schema.Attribute

func (NestedIPAddress) ToAPIModel

func (tfo NestedIPAddress) ToAPIModel() client.NestedIPAddress

type NestedPrefixList

type NestedPrefixList struct {
	Display types.String `tfsdk:"display"`
	ID      types.Int64  `tfsdk:"id"`
	Name    types.String `tfsdk:"name"`
	URL     types.String `tfsdk:"url"`
}

func NestedPrefixListFromAPI

func NestedPrefixListFromAPI(resp *client.NestedPrefixList) *NestedPrefixList

func (*NestedPrefixList) SchemaAttributes

func (*NestedPrefixList) SchemaAttributes() map[string]schema.Attribute

func (NestedPrefixList) ToAPIModel

func (tfo NestedPrefixList) ToAPIModel() client.NestedPrefixList

type NestedSite

type NestedSite struct {
	Display types.String `tfsdk:"display"`
	ID      types.Int64  `tfsdk:"id"`
	Name    types.String `tfsdk:"name"`
	Slug    types.String `tfsdk:"slug"`
	URL     types.String `tfsdk:"url"`
}

func NestedSiteFromAPI

func NestedSiteFromAPI(resp *client.NestedSite) *NestedSite

func (*NestedSite) SchemaAttributes

func (*NestedSite) SchemaAttributes() map[string]schema.Attribute

func (NestedSite) ToAPIModel

func (tfo NestedSite) ToAPIModel() client.NestedSite

type NestedTenant

type NestedTenant struct {
	Display types.String `tfsdk:"display"`
	ID      types.Int64  `tfsdk:"id"`
	Name    types.String `tfsdk:"name"`
	Slug    types.String `tfsdk:"slug"`
	URL     types.String `tfsdk:"url"`
}

func NestedTenantFromAPI

func NestedTenantFromAPI(resp *client.NestedTenant) *NestedTenant

func (*NestedTenant) SchemaAttributes

func (*NestedTenant) SchemaAttributes() map[string]schema.Attribute

func (NestedTenant) ToAPIModel

func (tfo NestedTenant) ToAPIModel() client.NestedTenant

type NetboxBGPProvider

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

NetboxBGPProvider defines the provider implementation.

func (*NetboxBGPProvider) Configure

func (*NetboxBGPProvider) DataSources

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

func (*NetboxBGPProvider) Metadata

func (*NetboxBGPProvider) Resources

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

func (*NetboxBGPProvider) Schema

type NetboxBGPProviderEnvModel

type NetboxBGPProviderEnvModel struct {
	ServerURL          string `env:"NETBOX_SERVER_URL"`
	APIToken           string `env:"NETBOX_API_TOKEN"`
	AllowInsecureHTTPS *bool  `env:"NETBOX_ALLOW_INSECURE_HTTPS"`
	RequestTimeout     int64  `env:"NETBOX_REQUEST_TIMEOUT"`
}

type NetboxBGPProviderModel

type NetboxBGPProviderModel struct {
	ServerURL          types.String `tfsdk:"server_url"`
	APIToken           types.String `tfsdk:"api_token"`
	AllowInsecureHTTPS types.Bool   `tfsdk:"allow_insecure_https"`
	Headers            types.Map    `tfsdk:"headers"`
	RequestTimeout     types.Int64  `tfsdk:"request_timeout"`
}

NetboxBGPProviderModel describes the provider data model.

type PeerGroupDataSource

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

func (*PeerGroupDataSource) Configure

func (*PeerGroupDataSource) Metadata

func (*PeerGroupDataSource) Read

func (*PeerGroupDataSource) Schema

type PeerGroupDataSourceModel

type PeerGroupDataSourceModel struct {
	ID              types.Int64   `tfsdk:"id"`
	Name            types.String  `tfsdk:"name"`
	Description     types.String  `tfsdk:"description"`
	Comments        types.String  `tfsdk:"comments"`
	ExportPolicyIDs []types.Int64 `tfsdk:"export_policy_ids"`
	ImportPolicyIDs []types.Int64 `tfsdk:"import_policy_ids"`
}

func (*PeerGroupDataSourceModel) FillFromAPIModel

func (pgm *PeerGroupDataSourceModel) FillFromAPIModel(resp *client.BGPPeerGroup)

type SessionDataSource

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

func (*SessionDataSource) Configure

func (*SessionDataSource) Metadata

func (*SessionDataSource) Read

func (*SessionDataSource) Schema

type SessionDataSourceModel

type SessionDataSourceModel struct {
	ID          types.Int64  `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Comments    types.String `tfsdk:"comments"`
	Status      types.String `tfsdk:"status"`

	Site   *NestedSite   `tfsdk:"site"`
	Tenant *NestedTenant `tfsdk:"tenant"`
	Device *NestedDevice `tfsdk:"device"`

	LocalAddress  *NestedIPAddress    `tfsdk:"local_address"`
	RemoteAddress *NestedIPAddress    `tfsdk:"remote_address"`
	LocalAS       *NestedASN          `tfsdk:"local_as"`
	RemoteAS      *NestedASN          `tfsdk:"remote_as"`
	PeerGroup     *NestedBGPPeerGroup `tfsdk:"peer_group"`

	ImportPolicyIDs []types.Int64 `tfsdk:"import_policy_ids"`
	ExportPolicyIDs []types.Int64 `tfsdk:"export_policy_ids"`

	PrefixListIn  *NestedPrefixList `tfsdk:"prefix_list_in"`
	PrefixListOut *NestedPrefixList `tfsdk:"prefix_list_out"`

	Tags types.List `tfsdk:"tags"`
}

func (*SessionDataSourceModel) FillFromAPIModel

func (m *SessionDataSourceModel) FillFromAPIModel(ctx context.Context, resp *client.BGPSession, diags diag.Diagnostics)

type SessionResource

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

SessionResource defines the resource implementation.

func (*SessionResource) Configure

func (*SessionResource) Create

func (*SessionResource) Delete

func (*SessionResource) ImportState

func (*SessionResource) Metadata

func (*SessionResource) Read

func (*SessionResource) Schema

func (*SessionResource) Update

type SessionResourceModel

type SessionResourceModel struct {
	ID          types.Int64  `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Comments    types.String `tfsdk:"comments"`
	Status      types.String `tfsdk:"status"`

	SiteID   types.Int64 `tfsdk:"site_id"`
	TenantID types.Int64 `tfsdk:"tenant_id"`
	DeviceID types.Int64 `tfsdk:"device_id"`

	LocalAddressID  types.Int64 `tfsdk:"local_address_id"`
	RemoteAddressID types.Int64 `tfsdk:"remote_address_id"`
	LocalASID       types.Int64 `tfsdk:"local_as_id"`
	RemoteASID      types.Int64 `tfsdk:"remote_as_id"`
	PeerGroupID     types.Int64 `tfsdk:"peer_group_id"`

	ImportPolicyIDs types.List `tfsdk:"import_policy_ids"`
	ExportPolicyIDs types.List `tfsdk:"export_policy_ids"`

	PrefixListInID  types.Int64 `tfsdk:"prefix_list_in_id"`
	PrefixListOutID types.Int64 `tfsdk:"prefix_list_out_id"`

	Tags types.List `tfsdk:"tags"`
}

SessionResourceModel describes the resource data model.

func (*SessionResourceModel) FillFromAPIModel

func (m *SessionResourceModel) FillFromAPIModel(ctx context.Context, resp *client.BGPSession, diags diag.Diagnostics)

func (*SessionResourceModel) ToAPIModel

type SessionsDataSource

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

func (*SessionsDataSource) Configure

func (*SessionsDataSource) Metadata

func (*SessionsDataSource) Read

func (*SessionsDataSource) Schema

type SessionsDataSourceModel

type SessionsDataSourceModel struct {
	Filters  Filters                  `tfsdk:"filters"`
	Limit    types.Int64              `tfsdk:"limit"`
	Ordering types.String             `tfsdk:"ordering"`
	Sessions []SessionDataSourceModel `tfsdk:"sessions"`
}

Jump to

Keyboard shortcuts

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