vnets

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 vnet object.

func (*Client) Delete

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

Delete Delete sdn vnet object configuration.

func (*Client) Find

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

Find Read sdn vnet configuration.

func (*Client) Index

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

Index SDN vnets index.

func (*Client) Update

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

Update Update sdn vnet object configuration.

type CreateRequest

type CreateRequest struct {
	Vnet string `url:"vnet" json:"vnet"` // The SDN vnet object identifier.
	Zone string `url:"zone" json:"zone"` // zone id

	// The following parameters are optional
	Alias     *string       `url:"alias,omitempty" json:"alias,omitempty"`         // alias name of the vnet
	Tag       *int          `url:"tag,omitempty" json:"tag,omitempty"`             // vlan or vxlan id
	Type      *Type         `url:"type,omitempty" json:"type,omitempty"`           // Type
	Vlanaware *util.PVEBool `url:"vlanaware,omitempty" json:"vlanaware,omitempty"` // Allow vm VLANs to pass through this vnet.
}

type DeleteRequest

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

}

type FindRequest

type FindRequest struct {
	Vnet string `url:"vnet" json:"vnet"` // The SDN vnet 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 added in v0.0.15

type Type string
const (
	Type_VNET Type = "vnet"
)

func PtrType added in v0.0.15

func PtrType(i Type) *Type

type UpdateRequest

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

	// The following parameters are optional
	Alias     *string       `url:"alias,omitempty" json:"alias,omitempty"`         // alias name of the vnet
	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.
	Tag       *int          `url:"tag,omitempty" json:"tag,omitempty"`             // vlan or vxlan id
	Vlanaware *util.PVEBool `url:"vlanaware,omitempty" json:"vlanaware,omitempty"` // Allow vm VLANs to pass through this vnet.
	Zone      *string       `url:"zone,omitempty" json:"zone,omitempty"`           // zone id
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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