Documentation ¶
Index ¶
- func NewCmdPodnet(streams genericclioptions.IOStreams) *cobra.Command
- type PodNetDefaultOutput
- type PodnetOptions
- func (o *PodnetOptions) Complete(cmd *cobra.Command, args []string) error
- func (o *PodnetOptions) Run() error
- func (o *PodnetOptions) ShowDefaultOutput() error
- func (o *PodnetOptions) ShowDefaultOutputJSON(output []PodNetDefaultOutput) error
- func (o *PodnetOptions) ShowDefaultOutputText(rows []metav1.TableRow) error
- func (o *PodnetOptions) Validate() error
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