controllers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req CreateRequest) error

Create Create a new sdn controller object.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req DeleteRequest) error

Delete Delete sdn controller object configuration.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req FindRequest) (map[string]interface{}, error)

Find Read sdn controller configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)

Index SDN controllers index.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req UpdateRequest) error

Update Update sdn controller object configuration.

type CreateRequest

type CreateRequest struct {
	Controller string `url:"controller" json:"controller"` // The SDN controller object identifier.
	Type       Type   `url:"type" json:"type"`             // Plugin type.

	// The following parameters are optional
	Asn                     *int          `url:"asn,omitempty" json:"asn,omitempty"` // autonomous system number
	BgpMultipathAsPathRelax *util.PVEBool `url:"bgp-multipath-as-path-relax,omitempty" json:"bgp-multipath-as-path-relax,omitempty"`
	Ebgp                    *util.PVEBool `url:"ebgp,omitempty" json:"ebgp,omitempty"` // Enable ebgp. (remote-as external)
	EbgpMultihop            *int          `url:"ebgp-multihop,omitempty" json:"ebgp-multihop,omitempty"`
	Loopback                *string       `url:"loopback,omitempty" json:"loopback,omitempty"` // source loopback interface.
	Node                    *string       `url:"node,omitempty" json:"node,omitempty"`         // The cluster node name.
	Peers                   *string       `url:"peers,omitempty" json:"peers,omitempty"`       // peers address list.
}

type DeleteRequest

type DeleteRequest struct {
	Controller string `url:"controller" json:"controller"` // The SDN controller object identifier.

}

type FindRequest

type FindRequest struct {
	Controller string `url:"controller" json:"controller"` // The SDN controller object identifier.

	// The following parameters are optional
	Pending *util.PVEBool `url:"pending,omitempty" json:"pending,omitempty"` // Display pending config.
	Running *util.PVEBool `url:"running,omitempty" json:"running,omitempty"` // Display running config.
}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexRequest

type IndexRequest struct {

	// The following parameters are optional
	Pending *util.PVEBool `url:"pending,omitempty" json:"pending,omitempty"` // Display pending config.
	Running *util.PVEBool `url:"running,omitempty" json:"running,omitempty"` // Display running config.
	Type    *Type         `url:"type,omitempty" json:"type,omitempty"`       // Only list sdn controllers of specific type
}

type IndexResponse

type IndexResponse struct {
	Controller string `url:"controller" json:"controller"`
	Type       string `url:"type" json:"type"`

	// The following parameters are optional
	State *string `url:"state,omitempty" json:"state,omitempty"`
}

type Type added in v0.0.15

type Type string
const (
	Type_BGP    Type = "bgp"
	Type_EVPN   Type = "evpn"
	Type_FAUCET Type = "faucet"
)

func PtrType added in v0.0.15

func PtrType(i Type) *Type

type UpdateRequest

type UpdateRequest struct {
	Controller string `url:"controller" json:"controller"` // The SDN controller object identifier.

	// The following parameters are optional
	Asn                     *int          `url:"asn,omitempty" json:"asn,omitempty"` // autonomous system number
	BgpMultipathAsPathRelax *util.PVEBool `url:"bgp-multipath-as-path-relax,omitempty" json:"bgp-multipath-as-path-relax,omitempty"`
	Delete                  *string       `url:"delete,omitempty" json:"delete,omitempty"` // A list of settings you want to delete.
	Digest                  *string       `url:"digest,omitempty" json:"digest,omitempty"` // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Ebgp                    *util.PVEBool `url:"ebgp,omitempty" json:"ebgp,omitempty"`     // Enable ebgp. (remote-as external)
	EbgpMultihop            *int          `url:"ebgp-multihop,omitempty" json:"ebgp-multihop,omitempty"`
	Loopback                *string       `url:"loopback,omitempty" json:"loopback,omitempty"` // source loopback interface.
	Node                    *string       `url:"node,omitempty" json:"node,omitempty"`         // The cluster node name.
	Peers                   *string       `url:"peers,omitempty" json:"peers,omitempty"`       // peers address list.
}

Jump to

Keyboard shortcuts

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