cmd

package
v0.0.0-...-fa59329 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdPodnet

func NewCmdPodnet(streams genericclioptions.IOStreams) *cobra.Command

NewCmdPodnet provides a cobra command wrapping NamespaceOptions

Types

type PodNetDefaultOutput

type PodNetDefaultOutput struct {
	Pod       string   `json:"pod"`
	Net       string   `json:"net"`
	Interface string   `json:"interface"`
	Address   []string `json:"address"`
	Mac       string   `json:"mac"`
}

PodNetDefaultOutput is intermediate representation of output. This structure will be used to output JSON/yaml (we cannot use cli-runtime because we don't have CRD for that)

func (*PodNetDefaultOutput) ConvertRow

func (p *PodNetDefaultOutput) ConvertRow() []interface{}

ConvertRow convets PodNetDefaultOutput to TableRow's interface structure

type PodnetOptions

type PodnetOptions struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

PodnetOptions provides ...

func NewPodnetOptions

func NewPodnetOptions(streams genericclioptions.IOStreams) *PodnetOptions

NewPodnetOptions provides an instance of NamespaceOptions with default values

func (*PodnetOptions) Complete

func (o *PodnetOptions) Complete(cmd *cobra.Command, args []string) error

Complete sets all information required for updating the current context

func (*PodnetOptions) Run

func (o *PodnetOptions) Run() error

Run lists all available namespaces on a user's KUBECONFIG or updates the current context based on a provided namespace.

func (*PodnetOptions) ShowDefaultOutput

func (o *PodnetOptions) ShowDefaultOutput() error

ShowDefaultOutput shows default (non DeviceInfo result)

func (*PodnetOptions) ShowDefaultOutputJSON

func (o *PodnetOptions) ShowDefaultOutputJSON(output []PodNetDefaultOutput) error

ShowDefaultOutputJSON outputs PodNetDefaultOutput in json

func (*PodnetOptions) ShowDefaultOutputText

func (o *PodnetOptions) ShowDefaultOutputText(rows []metav1.TableRow) error

ShowDefaultOutputText outputs TableRow, converted from PodNetDefaultOutput, in text

func (*PodnetOptions) Validate

func (o *PodnetOptions) Validate() error

Validate ensures that all required arguments and flag values are provided

Jump to

Keyboard shortcuts

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