client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 30 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 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"`
}

Functions

func SetupClient

func SetupClient()

func WriteTable

func WriteTable(data any) error

WriteTable scans a struct and prints content via Table writer

Types

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     *strfmt.UUID `long:"network" description:"Endpoint network (ID)"`
	Port        *strfmt.UUID `long:"port" description:"Endpoint port (ID)"`
	Subnet      *strfmt.UUID `long:"subnet" description:"Endpoint subnet (ID)"`
	Wait        bool         `long:"wait" description:"Wait for endpoint to be ready"`
	Positional  struct {
		Service strfmt.UUID `positional-arg-name:"service" description:"Service to reference (ID)"`
	} `positional-args:"yes" required:"yes"`
}

func (*EndpointCreate) Execute

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

type EndpointDelete

type EndpointDelete struct {
	Positional struct {
		Endpoint strfmt.UUID `description:"Endpoint to set (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)"`
}

func (*EndpointList) Execute

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

type EndpointSet

type EndpointSet struct {
	Positional struct {
		Endpoint strfmt.UUID `positional-arg-name:"endpoint" description:"Endpoint to set (ID)"`
	} `positional-args:"yes" required:"yes"`
	Name        *string  `short:"n" long:"name" description:"New endpoint name"`
	Description *string  `long:"description" description:"Set endpoint description"`
	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 strfmt.UUID `positional-arg-name:"endpoint" description:"Endpoint to display (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    strfmt.UUID `long:"service" description:"The ID of the service resource." 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         strfmt.UUID   `long:"network" description:"Network id" required:"true"`
	IPAddresses     []strfmt.IPv4 `` /* 140-byte string literal not displayed */
	Port            int32         `long:"port" description:"Port exposed by the service" required:"true"`
	ProxyProtocol   bool          `long:"proxy-protocol" description:"Enable proxy protocol v2."`
	RequireApproval bool          `long:"require-approval" description:"Require explicit project approval for the service owner."`
	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"`
}

func (*ServiceCreate) Execute

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

type ServiceDelete

type ServiceDelete struct {
	Positional struct {
		Service strfmt.UUID `description:"Service to delete (ID)"`
	} `positional-args:"yes" required:"yes"`
	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               strfmt.UUID `long:"service" description:"Service" 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 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)"`
}

func (*ServiceList) Execute

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

type ServiceSet

type ServiceSet struct {
	Positional struct {
		Service strfmt.UUID `positional-arg-name:"endpoint" description:"Service to set (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" optional-value:"false"`
	IPAddresses     []strfmt.IPv4 `long:"ip-address" description:"IP Addresses of the providing service, multiple addresses will be round robin load balanced."`
	Name            *string       `long:"name" description:"Service name"`
	Port            *int32        `long:"port" description:"Port exposed by the service"`
	ProxyProtocol   *bool         `long:"proxy-protocol" description:"Enable proxy protocol v2."`
	RequireApproval *bool         `long:"require-approval" description:"Require explicit project approval for the service owner."`
	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 strfmt.UUID `description:"Service to display (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