connection

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpeedFormat = regexp.MustCompile(`^(\d+)((M|G)bps)$`)
)

Functions

func AddTestSweeper added in v1.33.0

func AddTestSweeper()

func NewDataSource

func NewDataSource() datasource.DataSource

func NewResource

func NewResource() resource.Resource

Types

type DataSource

type DataSource struct {
	framework.BaseDataSource
}

func (*DataSource) Read

func (*DataSource) Schema

type DataSourceModel

type DataSourceModel struct {
	ID                types.String                                       `tfsdk:"id"`
	ConnectionID      types.String                                       `tfsdk:"connection_id"`
	Name              types.String                                       `tfsdk:"name"`
	Facility          types.String                                       `tfsdk:"facility"`
	Metro             types.String                                       `tfsdk:"metro"`
	Redundancy        types.String                                       `tfsdk:"redundancy"`
	ContactEmail      types.String                                       `tfsdk:"contact_email"`
	Type              types.String                                       `tfsdk:"type"`
	ProjectID         types.String                                       `tfsdk:"project_id"`
	AuthorizationCode types.String                                       `tfsdk:"authorization_code"`
	Speed             types.String                                       `tfsdk:"speed"`
	Description       types.String                                       `tfsdk:"description"`
	Mode              types.String                                       `tfsdk:"mode"`
	Tags              types.List                                         `tfsdk:"tags"`  // List of strings
	Vlans             types.List                                         `tfsdk:"vlans"` // List of ints
	Vrfs              types.List                                         `tfsdk:"vrfs"`  // List of strings
	ServiceTokenType  types.String                                       `tfsdk:"service_token_type"`
	OrganizationID    types.String                                       `tfsdk:"organization_id"`
	Status            types.String                                       `tfsdk:"status"`
	Token             types.String                                       `tfsdk:"token"`
	Ports             fwtypes.ListNestedObjectValueOf[PortModel]         `tfsdk:"ports"`          // List of Port
	ServiceTokens     fwtypes.ListNestedObjectValueOf[ServiceTokenModel] `tfsdk:"service_tokens"` // List of ServiceToken
}

type PortModel

type PortModel struct {
	ID                types.String                      `tfsdk:"id"`
	Name              types.String                      `tfsdk:"name"`
	Role              types.String                      `tfsdk:"role"`
	Speed             types.Int64                       `tfsdk:"speed"`
	Status            types.String                      `tfsdk:"status"`
	LinkStatus        types.String                      `tfsdk:"link_status"`
	VirtualCircuitIDs fwtypes.ListValueOf[types.String] `tfsdk:"virtual_circuit_ids"` // List of String
}

type Resource

type Resource struct {
	framework.BaseResource
}

func (*Resource) Create

func (r *Resource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

func (*Resource) Delete

func (r *Resource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

func (*Resource) Read

func (r *Resource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

func (*Resource) Schema

func (r *Resource) Schema(
	ctx context.Context,
	req resource.SchemaRequest,
	resp *resource.SchemaResponse,
)

func (*Resource) Update

func (r *Resource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

type ResourceModel

type ResourceModel struct {
	ID                types.String                                       `tfsdk:"id"`
	Name              types.String                                       `tfsdk:"name"`
	Facility          types.String                                       `tfsdk:"facility"`
	Metro             types.String                                       `tfsdk:"metro"`
	Redundancy        types.String                                       `tfsdk:"redundancy"`
	ContactEmail      types.String                                       `tfsdk:"contact_email"`
	Type              types.String                                       `tfsdk:"type"`
	ProjectID         types.String                                       `tfsdk:"project_id"`
	AuthorizationCode types.String                                       `tfsdk:"authorization_code"`
	Speed             types.String                                       `tfsdk:"speed"`
	Description       types.String                                       `tfsdk:"description"`
	Mode              types.String                                       `tfsdk:"mode"`
	Tags              types.List                                         `tfsdk:"tags"`  // List of strings
	Vlans             types.List                                         `tfsdk:"vlans"` // List of ints
	Vrfs              types.List                                         `tfsdk:"vrfs"`  // List of strings
	ServiceTokenType  types.String                                       `tfsdk:"service_token_type"`
	OrganizationID    types.String                                       `tfsdk:"organization_id"`
	Status            types.String                                       `tfsdk:"status"`
	Token             types.String                                       `tfsdk:"token"`
	Ports             fwtypes.ListNestedObjectValueOf[PortModel]         `tfsdk:"ports"`          // List of Port
	ServiceTokens     fwtypes.ListNestedObjectValueOf[ServiceTokenModel] `tfsdk:"service_tokens"` // List of ServiceToken
}

type ServiceTokenModel

type ServiceTokenModel struct {
	ID              types.String `tfsdk:"id"`
	ExpiresAt       types.String `tfsdk:"expires_at"`
	MaxAllowedSpeed types.String `tfsdk:"max_allowed_speed"`
	Role            types.String `tfsdk:"role"`
	State           types.String `tfsdk:"state"`
	Type            types.String `tfsdk:"type"`
}

Jump to

Keyboard shortcuts

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