client

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Parser       = flags.NewParser(&opts, flags.Default)
	Table        = table.NewWriter()
	Mapper       = reflectx.NewMapper("json")
	ArcherClient = client.Default
	Provider     *gophercloud.ProviderClient
)
View Source
var AgentOptions struct {
	AgentList `command:"list" description:"List Agents"`
	AgentShow `command:"show" description:"Show Agent details"`
}
View Source
var DefaultColumns []string
View Source
var EndpointOptions struct {
	EndpointList   `command:"list" description:"List Endpoints"`
	EndpointShow   `command:"show" description:"Show Endpoint"`
	EndpointCreate `command:"create" description:"Create Endpoint"`
	EndpointSet    `command:"set" description:"Set Endpoint"`
	EndpointDelete `command:"delete" description:"Delete Endpoint"`
}
View Source
var QuotaOptions struct {
	QuotaList         `command:"list" description:"List Quotas"`
	QuotaShow         `command:"show" description:"Show Quota detail"`
	QuotaShowDefaults `command:"defaults" description:"Show Quota defaults"`
	QuotaSet          `command:"set" description:"Set Quota"`
	QuotaDelete       `command:"reset" description:"Reset all Quota of a project"`
}
View Source
var RbacOptions struct {
	RbacList   `command:"list" description:"List RBACs"`
	RbacCreate `command:"create" description:"Create RBACs"`
	RbacShow   `command:"show" description:"Show RBAC policy detail"`
	RbacSet    `command:"set" description:"Set RBAC properties"`
	RbacDelete `command:"delete" description:"Delete RBAC policy"`
}
View Source
var ServiceOptions struct {
	ServiceList     `command:"list" description:"List Services"`
	ServiceEndpoint `command:"endpoint" description:"Service Endpoint Commands"`
	ServiceShow     `command:"show" description:"Show Service"`
	ServiceCreate   `command:"create" description:"Create Service"`
	ServiceSet      `command:"set" description:"Update Service"`
	ServiceDelete   `command:"delete" description:"Delete Service"`
	ServiceMigrate  `command:"migrate" description:"Migrate Service to another agent"`
}

Functions

func ResolveEndpointID

func ResolveEndpointID(nameOrID string) (strfmt.UUID, error)

ResolveEndpointID resolves an endpoint name or ID to a UUID. If the input is a valid UUID, it returns it directly. If it's a name, it looks up the endpoint and returns its ID. Returns an error if no endpoint is found or multiple endpoints have the same name.

func ResolveNetworkID

func ResolveNetworkID(nameOrID string) (strfmt.UUID, error)

ResolveNetworkID resolves a network name or ID to a UUID. If the input is a valid UUID, it returns it directly. If it's a name, it queries Neutron and returns the network ID. Returns an error if no network is found or multiple networks have the same name.

func ResolveServiceID

func ResolveServiceID(nameOrID string) (strfmt.UUID, error)

ResolveServiceID resolves a service name or ID to a UUID. If the input is a valid UUID, it returns it directly. If it's a name, it looks up the service and returns its ID. Returns an error if no service is found or multiple services have the same name.

func SetupClient

func SetupClient()

func WriteTable

func WriteTable(data any) error

WriteTable scans a struct and prints content via Table writer

Types

type AgentList

type AgentList struct{}

func (*AgentList) Execute

func (*AgentList) Execute(_ []string) error

type AgentShow

type AgentShow struct {
	Positional struct {
		Host string `positional-arg-name:"host" description:"Agent hostname" required:"true"`
	} `positional-args:"true" required:"true"`
}

func (*AgentShow) Execute

func (a *AgentShow) Execute(_ []string) error

type EndpointCreate

type EndpointCreate struct {
	Name                string   `short:"n" long:"name" description:"New endpoint name"`
	Description         string   `long:"description" description:"Set endpoint description"`
	Tags                []string `long:"tag" description:"Tag to be added to the endpoint (repeat option to set multiple tags)"`
	Network             *string  `long:"network" description:"Endpoint network (name or ID)"`
	Port                *string  `long:"port" description:"Endpoint port (ID)"`
	Subnet              *string  `long:"subnet" description:"Endpoint subnet (ID)"`
	ConnectionMirroring bool     `` /* 130-byte string literal not displayed */
	Wait                bool     `long:"wait" description:"Wait for endpoint to be ready"`
	Positional          struct {
		Service string `positional-arg-name:"service" description:"Service to reference (name or ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*EndpointCreate) Execute

func (*EndpointCreate) Execute(_ []string) error

type EndpointDelete

type EndpointDelete struct {
	Positional struct {
		Endpoint string `description:"Endpoint to delete (name or ID)"`
	} `positional-args:"yes" required:"yes"`
	Wait bool `long:"wait" description:"Wait for endpoint to be deleted"`
}

func (*EndpointDelete) Execute

func (*EndpointDelete) Execute(_ []string) error

type EndpointList

type EndpointList struct {
	Tags       []string `long:"tags" description:"List endpoints which have all given tag(s) (repeat option for multiple tags)"`
	AnyTags    []string `long:"any-tags" description:"List endpoints which have any given tag(s) (repeat option for multiple tags)"`
	NotTags    []string `long:"not-tags" description:"Exclude endpoints which have all given tag(s) (repeat option for multiple tags)"`
	NotAnyTags []string `long:"not-any-tags" description:"Exclude endpoints which have any given tag(s) (repeat option for multiple tags)"`
	Project    *string  `short:"p" long:"project" description:"List endpoints in the given project (ID)"`
	Service    *string  `short:"s" long:"service" description:"List endpoints for the given service (name or ID)"`
}

func (*EndpointList) Execute

func (*EndpointList) Execute(_ []string) error

type EndpointSet

type EndpointSet struct {
	Positional struct {
		Endpoint string `positional-arg-name:"endpoint" description:"Endpoint to set (name or ID)"`
	} `positional-args:"yes" required:"yes"`
	Name                  *string  `short:"n" long:"name" description:"New endpoint name"`
	Description           *string  `long:"description" description:"Set endpoint description"`
	ConnectionMirroring   bool     `` /* 130-byte string literal not displayed */
	NoConnectionMirroring bool     `long:"no-connection-mirroring" description:"Disable BIG-IP connection mirroring"`
	NoTags                bool     `` /* 126-byte string literal not displayed */
	Tags                  []string `long:"tag" description:"Tag to be added to the endpoint (repeat option to set multiple tags)"`
	Wait                  bool     `long:"wait" description:"Wait for endpoint to be ready"`
}

func (*EndpointSet) Execute

func (*EndpointSet) Execute(_ []string) error

type EndpointShow

type EndpointShow struct {
	Positional struct {
		Endpoint string `positional-arg-name:"endpoint" description:"Endpoint to display (name or ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*EndpointShow) Execute

func (*EndpointShow) Execute(_ []string) error

type QuotaDelete

type QuotaDelete struct {
	Project string `long:"project" description:"Project (ID)" required:"true"`
}

func (*QuotaDelete) Execute

func (*QuotaDelete) Execute(_ []string) error

type QuotaList

type QuotaList struct {
	Project *string `long:"project" description:"Project (ID)"`
}

func (*QuotaList) Execute

func (*QuotaList) Execute(_ []string) error

type QuotaSet

type QuotaSet struct {
	Project  string `long:"project" description:"Project (ID)" required:"true"`
	Endpoint *int64 `` /* 166-byte string literal not displayed */
	Service  *int64 `` /* 164-byte string literal not displayed */
}

func (*QuotaSet) Execute

func (*QuotaSet) Execute(_ []string) error

type QuotaShow

type QuotaShow struct {
	Project string `long:"project" description:"Project (ID)" required:"true"`
}

func (*QuotaShow) Execute

func (*QuotaShow) Execute(_ []string) error

type QuotaShowDefaults

type QuotaShowDefaults struct{}

func (*QuotaShowDefaults) Execute

func (*QuotaShowDefaults) Execute(_ []string) error

type RbacCreate

type RbacCreate struct {
	Service    string `long:"service" description:"The service resource (name or ID)." required:"true"`
	Target     string `long:"target" description:"The ID of the project to which the RBAC policy will be enforced."`
	TargetType string `long:"target-type" description:"RBAC Policy Target Type." choice:"project"`
}

func (*RbacCreate) Execute

func (*RbacCreate) Execute(_ []string) error

type RbacDelete

type RbacDelete struct {
	Positional struct {
		RbacPolicy strfmt.UUID `description:"RBAC Policy to display (ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*RbacDelete) Execute

func (*RbacDelete) Execute(_ []string) error

type RbacList

type RbacList struct{}

func (*RbacList) Execute

func (*RbacList) Execute(_ []string) error

type RbacSet

type RbacSet struct {
	Positional struct {
		RbacPolicy strfmt.UUID `description:"RBAC Policy to display (ID)"`
	} `positional-args:"yes" required:"yes"`
	Target     *string `long:"target" description:"The ID of the project to which the RBAC policy will be enforced."`
	TargetType *string `long:"target-type" description:"RBAC Policy Target Type." choice:"project"`
}

func (*RbacSet) Execute

func (*RbacSet) Execute(_ []string) error

type RbacShow

type RbacShow struct {
	Positional struct {
		RbacPolicy strfmt.UUID `description:"RBAC Policy to display (ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*RbacShow) Execute

func (*RbacShow) Execute(_ []string) error

type ServiceCreate

type ServiceCreate struct {
	Name              string   `short:"n" long:"name" description:"New service name"`
	Description       string   `long:"description" description:"Set service description"`
	Provider          *string  `long:"provider" description:"Provider type" choice:"tenant" choice:"cp"`
	Enable            bool     `long:"enable" description:"Enable service"`
	Disable           bool     `long:"disable" description:"Disable service"`
	Network           *string  `long:"network" description:"Network (name or ID, required for tenant provider)"`
	IPAddresses       []string `` /* 155-byte string literal not displayed */
	Port              []int32  `long:"port" description:"Port exposed by the service (repeat option to set multiple ports)" required:"true"`
	Protocol          *string  `long:"protocol" description:"Protocol type of the service" choice:"TCP" choice:"HTTP"`
	ProxyProtocol     bool     `long:"proxy-protocol" description:"Enable proxy protocol v2."`
	NoProxyProtocol   bool     `long:"no-proxy-protocol" description:"Disable proxy protocol v2."`
	RequireApproval   bool     `long:"require-approval" description:"Require explicit project approval for the service owner."`
	NoRequireApproval bool     `long:"no-require-approval" description:"Disable require approval for the service owner."`
	SnatPoolSize      *int32   `` /* 149-byte string literal not displayed */
	Tags              []string `long:"tag" description:"Tag to be added to the service (repeat option to set multiple tags)"`
	Visibility        *string  `` /* 187-byte string literal not displayed */
	Wait              bool     `long:"wait" description:"Wait for service to be ready"`
	AvailabilityZone  *string  `long:"availability-zone" description:"Availability zone for the service"`
}

func (*ServiceCreate) Execute

func (*ServiceCreate) Execute(_ []string) error

type ServiceDelete

type ServiceDelete struct {
	Positional struct {
		Service string `description:"Service to delete (name or ID)"`
	} `positional-args:"yes" required:"yes"`
	Cascade bool `long:"cascade" description:"Delete all associated endpoints along with the service"`
	Wait    bool `long:"wait" description:"Wait for endpoint to be deleted"`
}

func (*ServiceDelete) Execute

func (*ServiceDelete) Execute(_ []string) error

type ServiceEndpoint

type ServiceEndpoint struct {
	Service               string `long:"service" description:"Service (name or ID)" required:"true"`
	ServiceEndpointList   `command:"list" description:"List Service Endpoints"`
	ServiceEndpointAccept `command:"accept" description:"Accept Service Endpoint"`
	ServiceEndpointReject `command:"reject" description:"Reject Service Endpoint"`
}

type ServiceEndpointAccept

type ServiceEndpointAccept struct {
	Endpoints []strfmt.UUID `long:"endpoint" description:"Accept endpoint (repeat option to accept multiple endpoints)"`
	Projects  []strfmt.UUID `long:"project" description:"Accept all endpoints of project (repeat option to accept multiple projects)"`
}

func (*ServiceEndpointAccept) Execute

func (*ServiceEndpointAccept) Execute(_ []string) error

type ServiceEndpointList

type ServiceEndpointList struct {
}

func (*ServiceEndpointList) Execute

func (*ServiceEndpointList) Execute(_ []string) error

type ServiceEndpointReject

type ServiceEndpointReject struct {
	Endpoints []strfmt.UUID `long:"endpoint" description:"Reject endpoint (repeat option to reject multiple endpoints)"`
	Projects  []strfmt.UUID `long:"project" description:"Reject all endpoints of project (repeat option to reject multiple projects)"`
}

func (*ServiceEndpointReject) Execute

func (*ServiceEndpointReject) Execute(_ []string) error

type ServiceList

type ServiceList struct {
	Tags       []string `long:"tags" description:"List services which have all given tag(s) (repeat option for multiple tags)"`
	AnyTags    []string `long:"any-tags" description:"List services which have any given tag(s) (repeat option for multiple tags)"`
	NotTags    []string `long:"not-tags" description:"Exclude services which have all given tag(s) (repeat option for multiple tags)"`
	NotAnyTags []string `long:"not-any-tags" description:"Exclude services which have any given tag(s) (repeat option for multiple tags)"`
	Project    *string  `short:"p" long:"project" description:"List services in the given project (ID)"`
}

func (*ServiceList) Execute

func (*ServiceList) Execute(_ []string) error

type ServiceMigrate

type ServiceMigrate struct {
	Positional struct {
		Service string `description:"Service to migrate (name or ID)"`
	} `positional-args:"yes" required:"yes"`
	TargetHost *string `long:"target-host" description:"Target agent hostname. If not specified, least-loaded agent is selected."`
	Wait       bool    `long:"wait" description:"Wait for service migration to complete"`
}

func (*ServiceMigrate) Execute

func (*ServiceMigrate) Execute(_ []string) error

type ServiceSet

type ServiceSet struct {
	Positional struct {
		Service string `positional-arg-name:"service" description:"Service to set (name or ID)"`
	} `positional-args:"yes" required:"yes"`
	NoTags            bool     `long:"no-tag" description:"Clear tags associated with the service. Specify both --tag and --no-tag to overwrite current tags"`
	Tags              []string `long:"tag" description:"Tag to be added to the service (repeat option to set multiple tags)"`
	Description       *string  `long:"description" description:"Set service description"`
	Enable            bool     `long:"enable" description:"Enable service"`
	Disable           bool     `long:"disable" description:"Disable service"`
	IPAddresses       []string `` /* 139-byte string literal not displayed */
	Name              *string  `long:"name" description:"Service name"`
	Port              []int32  `long:"port" description:"Port exposed by the service (repeat option to set multiple ports)"`
	Protocol          *string  `long:"protocol" description:"Protocol type of the service" choice:"TCP" choice:"HTTP"`
	ProxyProtocol     bool     `long:"proxy-protocol" description:"Enable proxy protocol v2."`
	NoProxyProtocol   bool     `long:"no-proxy-protocol" description:"Disable proxy protocol v2."`
	RequireApproval   bool     `long:"require-approval" description:"Require explicit project approval for the service owner."`
	NoRequireApproval bool     `long:"no-require-approval" description:"Disable require approval for the service owner."`
	SnatPoolSize      *int32   `long:"snat-pool-size" description:"Number of SNAT IP addresses allocated for this service (1-8, f5 provider only)."`
	Visibility        *string  `` /* 187-byte string literal not displayed */
	Wait              bool     `long:"wait" description:"Wait for service to be ready"`
}

func (*ServiceSet) Execute

func (*ServiceSet) Execute(_ []string) error

type ServiceShow

type ServiceShow struct {
	Positional struct {
		Service string `description:"Service to display (name or ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*ServiceShow) Execute

func (*ServiceShow) Execute(_ []string) error

type VersionOptions

type VersionOptions struct{}

func (*VersionOptions) Execute

func (*VersionOptions) Execute(_ []string) error

Jump to

Keyboard shortcuts

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