nsx

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCPProtocol = "TCP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditBase added in v0.17.14

type AuditBase struct {
	CreateTime       int64  `json:"_create_time"`
	LastModifiedUser string `json:"_last_modified_user"`
	LastModifiedTime int64  `json:"_last_modified_time"`
	SystemOwned      bool   `json:"_system_owned"`
	CreateUser       string `json:"_create_user"`
	Protection       string `json:"_protection"`
	Revision         int    `json:"_revision"`
}

type Error added in v0.17.15

type Error struct {
	HTTPStatus   string  `json:"httpStatus"`
	ErrorCode    int     `json:"error_code"`
	ModuleName   string  `json:"module_name"`
	ErrorMessage string  `json:"error_message"`
	Related      []Error `json:"related_errors"`
}

type LBService added in v0.17.14

type LBService struct {
	PolicyBase           `json:",inline"`
	Enabled              bool   `json:"enabled"`
	RelaxScaleValidation bool   `json:"relax_scale_validation"`
	Size                 string `json:"size"`
	ErrorLogLevel        string `json:"error_log_level"`
	AccessLogEnabled     bool   `json:"access_log_enabled"`
}

type LBTcpMonitorProfile added in v0.17.14

type LBTcpMonitorProfile struct {
	PolicyBase  `json:",inline"`
	MonitorPort int `json:"monitor_port"`
	Interval    int `json:"interval"`
	Timeout     int `json:"timeout"`
	RiseCount   int `json:"rise_count"`
	FallCount   int `json:"fall_count"`
}

type LBVirtualServer added in v0.17.14

type LBVirtualServer struct {
	PolicyBase               `json:",inline"`
	Enabled                  bool     `json:"enabled"`
	IPAddress                string   `json:"ip_address"`
	Ports                    []string `json:"ports"`
	AccessLogEnabled         bool     `json:"access_log_enabled"`
	LbPersistenceProfilePath string   `json:"lb_persistence_profile_path"`
	LbServicePath            string   `json:"lb_service_path"`
	PoolPath                 string   `json:"pool_path"`
	ApplicationProfilePath   string   `json:"application_profile_path"`
	LogSignificantEventOnly  bool     `json:"log_significant_event_only"`
}

type LoadBalancer

type LoadBalancer struct {
	Id string
	// contains filtered or unexported fields
}

nolint: structcheck, unused, golint, stylecheck

type LoadBalancerOptions

type LoadBalancerOptions struct {
	Name       string
	IPPool     string
	Protocol   string
	Ports      []string
	Tier0      string
	MemberTags map[string]string
}

type LoadBalancerPool added in v0.17.14

type LoadBalancerPool struct {
	Members []LoadBalancerPoolMember `json:"members,omitempty"`
}

type LoadBalancerPoolMember added in v0.17.14

type LoadBalancerPoolMember struct {
	AdminState string `json:"admin_state"`
	IPAddress  string `json:"ip_address"`
}

type LoadBalancerPoolResults added in v0.17.14

type LoadBalancerPoolResults struct {
	ResultCount int                `json:"result_count"`
	Results     []LoadBalancerPool `json:"results"`
}

type NSGroup

type NSGroup struct {
	Name, Id string
	// contains filtered or unexported fields
}

nolint: golint, stylecheck

func (*NSGroup) Add

func (group *NSGroup) Add(ips ...string) error

func (*NSGroup) List

func (group *NSGroup) List() ([]string, error)

func (*NSGroup) Remove

func (group *NSGroup) Remove(ips ...string) error

type NSXClient

type NSXClient struct {
	logger.Logger
	Username, Password, Host string
	RemoteAuth               bool
	// contains filtered or unexported fields
}

nolint: golint

func (*NSXClient) AllocateIP

func (c *NSXClient) AllocateIP(pool string) (string, error)

func (*NSXClient) CreateLoadBalancer

func (c *NSXClient) CreateLoadBalancer(opts LoadBalancerOptions) (string, bool, error)

CreateLoadBalancer creates a new loadbalancer or returns the existing loadbalancer's IP

func (*NSXClient) CreateOrUpdateNSGroup

func (c *NSXClient) CreateOrUpdateNSGroup(name string, targetType string, tags map[string]string) (*NSGroup, error)

func (*NSXClient) DrainLoadBalancerMember added in v0.17.14

func (c *NSXClient) DrainLoadBalancerMember(name, ip string) error

func (*NSXClient) GET

func (c *NSXClient) GET(path string) ([]byte, int, error)

func (*NSXClient) GetLoadBalancer

func (c *NSXClient) GetLoadBalancer(name string) (*loadbalancer.LbVirtualServer, error)

func (*NSXClient) GetLoadBalancerPool added in v0.17.14

func (c *NSXClient) GetLoadBalancerPool(name string) (*loadbalancer.LbPool, error)

func (*NSXClient) GetLogicalPorts

func (c *NSXClient) GetLogicalPorts(ctx context.Context, vm string) ([]manager.LogicalPort, error)

func (*NSXClient) GetOrCreateHTTPHealthCheck

func (c *NSXClient) GetOrCreateHTTPHealthCheck(port string) (string, error)

func (*NSXClient) GetOrCreateTCPHealthCheck

func (c *NSXClient) GetOrCreateTCPHealthCheck(port string) (string, error)

func (*NSXClient) Init

func (c *NSXClient) Init() error

func (*NSXClient) POST added in v0.17.14

func (c *NSXClient) POST(path string, body interface{}) ([]byte, int, error)

func (*NSXClient) Ping

func (c *NSXClient) Ping() (string, error)

func (*NSXClient) TagLogicalPort

func (c *NSXClient) TagLogicalPort(ctx context.Context, id string, tags map[string]string) error

type PolicyBase added in v0.17.14

type PolicyBase struct {
	ResourceType string `json:"resource_type"`
	ID           string `json:"id"`
	DisplayName  string `json:"display_name"`
	Tags         []struct {
		Scope string `json:"scope"`
		Tag   string `json:"tag"`
	} `json:"tags,omitempty"`
	Path            string `json:"path,omitempty"`
	RelativePath    string `json:"relative_path,omitempty"`
	ParentPath      string `json:"parent_path,omitempty"`
	UniqueID        string `json:"unique_id,omitempty"`
	MarkedForDelete bool   `json:"marked_for_delete,omitempty"`
	Overridden      bool   `json:"overridden,omitempty"`
	AuditBase       `json:",inline"`
}

type PolicyLoadBalancerPool added in v0.17.14

type PolicyLoadBalancerPool struct {
	PolicyBase  `json:",inline"`
	Algorithm   string `json:"algorithm"`
	MemberGroup struct {
		GroupPath        string `json:"group_path"`
		Port             int    `json:"port"`
		IPRevisionFilter string `json:"ip_revision_filter"`
	} `json:"member_group"`
	ActiveMonitorPaths []string `json:"active_monitor_paths"`
	SnatTranslation    struct {
		Type string `json:"type"`
	} `json:"snat_translation"`
	TCPMultiplexingEnabled bool `json:"tcp_multiplexing_enabled"`
	TCPMultiplexingNumber  int  `json:"tcp_multiplexing_number"`
	MinActiveMembers       int  `json:"min_active_members"`
}

type SegmentPort added in v0.17.14

type SegmentPort struct {
	PolicyBase `json:",inline"`
	Attachment struct {
		ID           string `json:"id"`
		TrafficTag   int    `json:"traffic_tag"`
		HyperbusMode string `json:"hyperbus_mode"`
	} `json:"attachment"`
	AdminState string `json:"admin_state"`
}

Jump to

Keyboard shortcuts

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