Documentation ¶
Overview ¶
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- Variables
- func ConvertJsonProtobufArray(data_in interface{}) (string, error)
- func DecodeTimestamp(tsIntf interface{}) (time.Time, error)
- func ErrorToString(err error) string
- func GenerateOutput(result *CommandResult)
- func GetCommandOptionWithDefault(name, option, defaultValue string) string
- func NewConnection() (*grpc.ClientConn, error)
- func ParseSince(s string) (*time.Time, error)
- func PrintEventHeader(outputAs string, outputFormat string, hdr *EventHeader) error
- func PrintInterContainerHeader(outputAs string, outputFormat string, hdr *MessageHeader) error
- func PrintInterContainerMessage(outputAs string, b []byte) error
- func PrintMessage(outputAs string, b []byte) error
- func ProcessGlobalOptions()
- func RegisterAdapterCommands(parent *flags.Parser)
- func RegisterCompletionCommands(parent *flags.Parser)
- func RegisterComponentCommands(parser *flags.Parser)
- func RegisterConfigCommands(parent *flags.Parser)
- func RegisterDeviceCommands(parser *flags.Parser)
- func RegisterDeviceGroupCommands(parser *flags.Parser)
- func RegisterEventCommands(parent *flags.Parser)
- func RegisterLogCommands(parent *flags.Parser)
- func RegisterLogicalDeviceCommands(parser *flags.Parser)
- func RegisterMessageCommands(parent *flags.Parser)
- func RegisterVersionCommands(parent *flags.Parser)
- type AdapterList
- type AdapterOpts
- type BashOptions
- type ClearLogLevelsOpts
- type CommandOptionsDump
- type CommandResult
- type CompletionOptions
- type ComponentAndPackageName
- type ComponentList
- type ComponentName
- type ComponentOpts
- type ConfigOptions
- type ConfiguredComponentAndPackageName
- type DeviceCreate
- type DeviceDelete
- type DeviceDisable
- type DeviceEnable
- type DeviceFlowList
- type DeviceGetExtValue
- type DeviceGetPortStats
- type DeviceGroupList
- type DeviceGroupOpts
- type DeviceId
- type DeviceInspect
- type DeviceList
- type DeviceOnuActivateImageUpdate
- type DeviceOnuDownloadImage
- type DeviceOnuListImages
- type DeviceOpts
- type DevicePmConfigFrequencySet
- type DevicePmConfigGroupDisable
- type DevicePmConfigGroupEnable
- type DevicePmConfigGroupList
- type DevicePmConfigGroupMetricList
- type DevicePmConfigMetricDisable
- type DevicePmConfigMetricEnable
- type DevicePmConfigMetricList
- type DevicePmConfigSetMaxSkew
- type DevicePmConfigsGet
- type DevicePortDisable
- type DevicePortEnable
- type DevicePortList
- type DeviceReboot
- type DisableLogCorrelationOpts
- type DisableLogTracingOpts
- type EnableLogCorrelationOpts
- type EnableLogTracingOpts
- type EventHeader
- type EventHeaderWidths
- type EventListenOpts
- type EventOpts
- type FlowIdOptions
- type FlowList
- type FlowOpts
- type GlobalConfigSpec
- type GroupName
- type GrpcConfigSpec
- type KvStoreConfigSpec
- type LevelName
- type ListLogCorrelationOpts
- type ListLogLevelsOpts
- type ListLogPackagesOpts
- type ListLogTracingOpts
- type ListOutputOptions
- type ListOutputOptionsJson
- type LogCorrelationOpts
- type LogLevelOpts
- type LogLevelOutput
- type LogOpts
- type LogPackageOpts
- type LogTracingOpts
- type LogicalDeviceFlowList
- type LogicalDeviceId
- type LogicalDeviceInspect
- type LogicalDeviceList
- type LogicalDeviceOpts
- type LogicalDevicePortList
- type MessageHeader
- type MessageHeaderWidths
- type MessageListenOpts
- type MessageOpts
- type MetricName
- type OutputOptions
- type OutputOptionsJson
- type OutputType
- type PortNum
- type ReturnValueRow
- type RpcEventHandler
- func (h *RpcEventHandler) GetParams(msg proto.Message) error
- func (h *RpcEventHandler) OnReceiveHeaders(metadata.MD)
- func (h *RpcEventHandler) OnReceiveResponse(m proto.Message)
- func (h *RpcEventHandler) OnReceiveTrailers(s *status.Status, m metadata.MD)
- func (h *RpcEventHandler) OnResolveMethod(*desc.MethodDescriptor)
- func (h *RpcEventHandler) OnSendHeaders(metadata.MD)
- type SetLogLevelOpts
- type TlsConfigSpec
- type ValueFlag
- type VersionDetails
- type VersionOpts
- type VersionOutput
- type VolthaAnyResolver
Constants ¶
const ( DEFAULT_COMPONENT_FORMAT = "table{{.Namespace}}\t{{.Id}}\t{{.Name}}\t{{.Component}}\t{{.Version}}\t{{.Ready}}\t{{.Restarts}}\t{{.Status}}\t{{.Age}}" COMPONENT_LIST_KUBECTL_CMD = "" /* 148-byte string literal not displayed */ )
const ( DEFAULT_DEVICE_FORMAT = "" /* 137-byte string literal not displayed */ DEFAULT_DEVICE_PORTS_FORMAT = "table{{.PortNo}}\t{{.Label}}\t{{.Type}}\t{{.AdminState}}\t{{.OperStatus}}\t{{.DeviceId}}\t{{.Peers}}" DEFAULT_DEVICE_INSPECT_FORMAT = `` /* 260-byte string literal not displayed */ DEFAULT_DEVICE_PM_CONFIG_GET_FORMAT = "table{{.DefaultFreq}}\t{{.Grouped}}\t{{.FreqOverride}}" DEFAULT_DEVICE_PM_CONFIG_METRIC_LIST_FORMAT = "table{{.Name}}\t{{.Type}}\t{{.Enabled}}\t{{.SampleFreq}}" DEFAULT_DEVICE_PM_CONFIG_GROUP_LIST_FORMAT = "table{{.GroupName}}\t{{.Enabled}}\t{{.GroupFreq}}" DEFAULT_DEVICE_VALUE_GET_FORMAT = "table{{.Name}}\t{{.Result}}" DEFAULT_DEVICE_IMAGE_LIST_GET_FORMAT = "table{{.Name}}\t{{.Url}}\t{{.Crc}}\t{{.DownloadState}}\t{{.ImageVersion}}\t{{.LocalDir}}\t{{.ImageState}}\t{{.FileSize}}" DEFAULT_DEVICE_GET_PORT_STATUS_FORMAT = `` /* 410-byte string literal not displayed */ )
const ( DEFAULT_LOG_LEVELS_FORMAT = "table{{ .ComponentName }}\t{{.PackageName}}\t{{.Level}}" DEFAULT_LOG_PACKAGES_FORMAT = "table{{ .ComponentName }}\t{{.PackageName}}" DEFAULT_LOG_FEATURE_STATUS_FORMAT = "table{{ .ComponentName }}\t{{.Status}}" DEFAULT_LOG_RESULT_FORMAT = "table{{ .ComponentName }}\t{{.PackageName}}\t{{.Status}}\t{{.Error}}" DEFAULT_LOG_FEATURE_RESULT_FORMAT = "table{{ .ComponentName }}\t{{.Status}}\t{{.Error}}" )
const ( DEFAULT_LOGICAL_DEVICE_FORMAT = "" /* 199-byte string literal not displayed */ DEFAULT_LOGICAL_DEVICE_PORT_FORMAT = "" /* 226-byte string literal not displayed */ DEFAULT_LOGICAL_DEVICE_INSPECT_FORMAT = `ID: {{.Id}} DATAPATHID: {{.DatapathId}} ROOTDEVICEID: {{.RootDeviceId}} SERIALNUMNER: {{.Desc.SerialNum}}` )
const ClientOnlyFormat = `` /* 191-byte string literal not displayed */
const (
DEFAULT_DEVICE_GROUP_FORMAT = "table{{ .Id }}\t{{.LogicalDevices}}\t{{.Devices}}"
)
const (
DEFAULT_EVENT_FORMAT = "table{{.Category}}\t{{.SubCategory}}\t{{.Type}}\t{{.Timestamp}}\t{{.Device_ids}}\t{{.Titles}}"
)
const (
DEFAULT_MESSAGE_FORMAT = "table{{.Id}}\t{{.Type}}\t{{.FromTopic}}\t{{.ToTopic}}\t{{.KeyTopic}}\t{{.InterAdapterType}}"
)
const (
DEFAULT_OUTPUT_FORMAT = "" /* 151-byte string literal not displayed */
)
const DefaultFormat = `` /* 489-byte string literal not displayed */
Variables ¶
var ( ParamNames = map[string]map[string]string{ "v1": { "ID": "voltha.ID", }, "v2": { "ID": "common.ID", }, "v3": { "ID": "common.ID", "port": "voltha.Port", "ValueSpecifier": "common.ValueSpecifier", }, } CharReplacer = strings.NewReplacer("\\t", "\t", "\\n", "\n") GlobalConfig = GlobalConfigSpec{ Server: "localhost:55555", Kafka: "", KvStore: "localhost:2379", Tls: TlsConfigSpec{ UseTls: false, }, Grpc: GrpcConfigSpec{ Timeout: defaultGrpcTimeout, MaxCallRecvMsgSize: defaultGrpcMaxCallRecvMsgSize, }, KvStoreConfig: KvStoreConfigSpec{ Timeout: defaultKvTimeout, }, } GlobalCommandOptions = make(map[string]map[string]string) GlobalOptions struct { Config string `short:"c" long:"config" env:"VOLTCONFIG" value-name:"FILE" default:"" description:"Location of client config file"` Server string `short:"s" long:"server" default:"" value-name:"SERVER:PORT" description:"IP/Host and port of VOLTHA"` Kafka string `short:"k" long:"kafka" default:"" value-name:"SERVER:PORT" description:"IP/Host and port of Kafka"` KvStore string `short:"e" long:"kvstore" env:"KVSTORE" value-name:"SERVER:PORT" description:"IP/Host and port of KV store (etcd)"` // nolint: staticcheck Debug bool `short:"d" long:"debug" description:"Enable debug mode"` Timeout string `short:"t" long:"timeout" description:"API call timeout duration" value-name:"DURATION" default:""` UseTLS bool `long:"tls" description:"Use TLS"` CACert string `long:"tlscacert" value-name:"CA_CERT_FILE" description:"Trust certs signed only by this CA"` Cert string `long:"tlscert" value-name:"CERT_FILE" description:"Path to TLS vertificate file"` Key string `long:"tlskey" value-name:"KEY_FILE" description:"Path to TLS key file"` Verify bool `long:"tlsverify" description:"Use TLS and verify the remote"` K8sConfig string `short:"8" long:"k8sconfig" env:"KUBECONFIG" value-name:"FILE" default:"" description:"Location of Kubernetes config file"` KvStoreTimeout string `long:"kvstoretimeout" env:"KVSTORE_TIMEOUT" value-name:"DURATION" default:"" description:"timeout for calls to KV store"` CommandOptions string `` /* 160-byte string literal not displayed */ MaxCallRecvMsgSize string `` /* 134-byte string literal not displayed */ } Debug = log.New(os.Stdout, "DEBUG: ", 0) Info = log.New(os.Stdout, "INFO: ", 0) Warn = log.New(os.Stderr, "WARN: ", 0) Error = log.New(os.Stderr, "ERROR: ", 0) )
var (
NoReportErr = errors.New("no-report-please")
)
var ( // Used to sort the table colums in a consistent order SORT_ORDER = map[string]uint16{ "Id": 0, "TableId": 10, "Priority": 20, "Cookie": 30, "UnsupportedMatch": 35, "InPort": 40, "VlanId": 50, "VlanPcp": 55, "EthType": 60, "IpProto": 70, "UdpSrc": 80, "UdpDst": 90, "Metadata": 100, "TunnelId": 101, "UnsupportedInstruction": 102, "UnsupportedAction": 105, "UnsupportedSetField": 107, "SetVlanId": 110, "PopVlan": 120, "PushVlanId": 130, "Output": 1000, "GotoTable": 1010, "WriteMetadata": 1015, "ClearActions": 1020, "MeterId": 1030, } )
Functions ¶
func ConvertJsonProtobufArray ¶ added in v1.1.4
func DecodeTimestamp ¶ added in v1.0.9
Convert a timestamp field in an event to a time.Time
func ErrorToString ¶
func GenerateOutput ¶
func GenerateOutput(result *CommandResult)
func NewConnection ¶
func NewConnection() (*grpc.ClientConn, error)
func PrintEventHeader ¶ added in v1.0.3
func PrintEventHeader(outputAs string, outputFormat string, hdr *EventHeader) error
Print just the enriched EventHeader. This is either in JSON format, or in table format.
func PrintInterContainerHeader ¶ added in v1.1.2
func PrintInterContainerHeader(outputAs string, outputFormat string, hdr *MessageHeader) error
Print just the enriched InterContainerHeader. This is either in JSON format, or in table format.
func PrintInterContainerMessage ¶ added in v1.1.2
Print the full message, either in JSON or in GRPCURL-human-readable format, depending on which grpcurl formatter is passed in.
func PrintMessage ¶ added in v1.0.3
Print the full message, either in JSON or in GRPCURL-human-readable format, depending on which grpcurl formatter is passed in.
func ProcessGlobalOptions ¶
func ProcessGlobalOptions()
func RegisterAdapterCommands ¶
func RegisterAdapterCommands(parent *flags.Parser)
func RegisterConfigCommands ¶
func RegisterDeviceCommands ¶
func RegisterEventCommands ¶ added in v1.0.3
func RegisterLogCommands ¶ added in v1.1.2
RegisterLogCommands is used to register log and its sub-commands e.g. level, package etc
func RegisterMessageCommands ¶ added in v1.1.2
func RegisterVersionCommands ¶
Types ¶
type AdapterList ¶
type AdapterList struct {
ListOutputOptions
}
func (*AdapterList) Execute ¶
func (options *AdapterList) Execute(args []string) error
type AdapterOpts ¶
type AdapterOpts struct {
List AdapterList `command:"list"`
}
type BashOptions ¶
type BashOptions struct{}
func (*BashOptions) Execute ¶
func (options *BashOptions) Execute(args []string) error
type ClearLogLevelsOpts ¶ added in v1.0.15
type ClearLogLevelsOpts struct { OutputOptions Args struct { Component []ConfiguredComponentAndPackageName } `positional-args:"yes" required:"yes"` }
ClearLogLevelOpts represents the supported CLI arguments for the log level clear command
func (*ClearLogLevelsOpts) Execute ¶ added in v1.0.15
func (options *ClearLogLevelsOpts) Execute(args []string) error
This method clear loglevel for components. For example, using below command loglevel can be clear for specific component with default packageName voltctl loglevel clear <componentName> For example, using below command loglevel can be clear for specific component with specific packageName voltctl loglevel clear <componentName#packageName>
type CommandOptionsDump ¶
type CommandOptionsDump struct{}
func (*CommandOptionsDump) Execute ¶
func (commands *CommandOptionsDump) Execute(args []string) error
type CommandResult ¶
type CompletionOptions ¶
type CompletionOptions struct {
BashOptions `command:"bash"`
}
type ComponentAndPackageName ¶ added in v1.1.2
type ComponentAndPackageName string
Custom Option representing <component-name>#<package-name> format (package is optional) This is used by 'log level set' commands
func (*ComponentAndPackageName) Complete ¶ added in v1.1.2
func (cpn *ComponentAndPackageName) Complete(match string) []flags.Completion
type ComponentList ¶
type ComponentList struct { ListOutputOptions Kubectl bool `long:"kubectl" short:"k" description:"display the kubectl command to execute"` }
func (*ComponentList) Execute ¶
func (options *ComponentList) Execute(args []string) error
type ComponentName ¶ added in v1.1.2
type ComponentName string
Custom Option representing component-name. This is used by 'log level list' and 'log package list' commands
func (*ComponentName) Complete ¶ added in v1.1.2
func (cn *ComponentName) Complete(match string) []flags.Completion
type ComponentOpts ¶
type ComponentOpts struct {
List ComponentList `command:"list"`
}
type ConfigOptions ¶
type ConfigOptions struct {
Commands CommandOptionsDump `command:"commands"`
}
func (*ConfigOptions) Execute ¶
func (options *ConfigOptions) Execute(args []string) error
type ConfiguredComponentAndPackageName ¶ added in v1.1.2
type ConfiguredComponentAndPackageName string
Custom Option representing currently configured log configuration in <component-name>#<package-name> format (package is optional) This is used by 'log level clear' commands
func (*ConfiguredComponentAndPackageName) Complete ¶ added in v1.1.2
func (ccpn *ConfiguredComponentAndPackageName) Complete(match string) []flags.Completion
type DeviceCreate ¶
type DeviceCreate struct { DeviceType string `short:"t" required:"true" long:"devicetype" description:"Device type"` MACAddress string `short:"m" long:"macaddress" default:"" description:"MAC Address"` IPAddress string `short:"i" long:"ipaddress" default:"" description:"IP Address"` HostAndPort string `short:"H" long:"hostandport" default:"" description:"Host and port"` }
func (*DeviceCreate) Execute ¶
func (options *DeviceCreate) Execute(args []string) error
type DeviceDelete ¶
type DeviceDelete struct { Force bool `long:"force" description:"Delete device forcefully"` Args struct { Ids []DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceDelete) Execute ¶
func (options *DeviceDelete) Execute(args []string) error
type DeviceDisable ¶
type DeviceDisable struct { Args struct { Ids []DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceDisable) Execute ¶
func (options *DeviceDisable) Execute(args []string) error
type DeviceEnable ¶
type DeviceEnable struct { Args struct { Ids []DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceEnable) Execute ¶
func (options *DeviceEnable) Execute(args []string) error
type DeviceFlowList ¶
type DeviceFlowList struct { ListOutputOptions FlowIdOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceFlowList) Execute ¶
func (options *DeviceFlowList) Execute(args []string) error
type DeviceGetExtValue ¶ added in v1.1.3
type DeviceGetExtValue struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Valueflag ValueFlag `positional-arg-name:"VALUE_FLAG" required:"yes"` } `positional-args:"yes"` }
func (*DeviceGetExtValue) Execute ¶ added in v1.1.3
func (options *DeviceGetExtValue) Execute(args []string) error
Device get Onu Distance
type DeviceGetPortStats ¶ added in v1.4.1
type DeviceGetPortStats struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` PortNo uint32 `positional-arg-name:"PORT_NO" required:"yes"` PortType string `positional-arg-name:"PORT_TYPE" required:"yes"` } `positional-args:"yes"` }
func (*DeviceGetPortStats) Execute ¶ added in v1.4.1
func (options *DeviceGetPortStats) Execute(args []string) error
type DeviceGroupList ¶
type DeviceGroupList struct {
ListOutputOptions
}
func (*DeviceGroupList) Execute ¶
func (options *DeviceGroupList) Execute(args []string) error
type DeviceGroupOpts ¶
type DeviceGroupOpts struct {
List DeviceGroupList `command:"list"`
}
type DeviceInspect ¶
type DeviceInspect struct { OutputOptionsJson Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceInspect) Execute ¶
func (options *DeviceInspect) Execute(args []string) error
type DeviceList ¶
type DeviceList struct {
ListOutputOptions
}
func (*DeviceList) Execute ¶
func (options *DeviceList) Execute(args []string) error
type DeviceOnuActivateImageUpdate ¶ added in v1.4.0
type DeviceOnuActivateImageUpdate struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Name string `positional-arg-name:"IMAGE_NAME" required:"yes"` ImageVersion string `positional-arg-name:"IMAGE_VERSION" required:"yes"` SaveConfig bool `positional-arg-name:"SAVE_EXISTING_CONFIG"` LocalDir string `positional-arg-name:"IMAGE_LOCAL_DIRECTORY"` } }
func (*DeviceOnuActivateImageUpdate) Execute ¶ added in v1.4.0
func (options *DeviceOnuActivateImageUpdate) Execute(args []string) error
type DeviceOnuDownloadImage ¶ added in v1.4.0
type DeviceOnuDownloadImage struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Name string `positional-arg-name:"IMAGE_NAME" required:"yes"` Url string `positional-arg-name:"IMAGE_URL" required:"yes"` ImageVersion string `positional-arg-name:"IMAGE_VERSION" required:"yes"` Crc uint32 `positional-arg-name:"IMAGE_CRC" required:"yes"` LocalDir string `positional-arg-name:"IMAGE_LOCAL_DIRECTORY"` } `positional-args:"yes"` }
func (*DeviceOnuDownloadImage) Execute ¶ added in v1.4.0
func (options *DeviceOnuDownloadImage) Execute(args []string) error
type DeviceOnuListImages ¶ added in v1.4.0
type DeviceOnuListImages struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceOnuListImages) Execute ¶ added in v1.4.0
func (options *DeviceOnuListImages) Execute(args []string) error
type DeviceOpts ¶
type DeviceOpts struct { List DeviceList `command:"list"` Create DeviceCreate `command:"create"` Delete DeviceDelete `command:"delete"` Enable DeviceEnable `command:"enable"` Disable DeviceDisable `command:"disable"` Flows DeviceFlowList `command:"flows"` Port struct { List DevicePortList `command:"list"` Enable DevicePortEnable `command:"enable"` Disable DevicePortDisable `command:"disable"` } `command:"port"` Inspect DeviceInspect `command:"inspect"` Reboot DeviceReboot `command:"reboot"` Value struct { Get DeviceGetExtValue `command:"get"` } `command:"value"` PmConfig struct { Get DevicePmConfigsGet `command:"get"` MaxSkew struct { Set DevicePmConfigSetMaxSkew `command:"set"` } `command:"maxskew"` Frequency struct { Set DevicePmConfigFrequencySet `command:"set"` } `command:"frequency"` Metric struct { List DevicePmConfigMetricList `command:"list"` Enable DevicePmConfigMetricEnable `command:"enable"` Disable DevicePmConfigMetricDisable `command:"disable"` } `command:"metric"` Group struct { List DevicePmConfigGroupList `command:"list"` Enable DevicePmConfigGroupEnable `command:"enable"` Disable DevicePmConfigGroupDisable `command:"disable"` } `command:"group"` GroupMetric struct { List DevicePmConfigGroupMetricList `command:"list"` } `command:"groupmetric"` } `command:"pmconfig"` Image struct { Get DeviceOnuListImages `command:"list"` Download DeviceOnuDownloadImage `command:"download"` Activate DeviceOnuActivateImageUpdate `command:"activate"` } `command:"image"` GetExtVal struct { Stats DeviceGetPortStats `command:"portstats"` } `command:"getextval"` }
type DevicePmConfigFrequencySet ¶ added in v1.1.6
type DevicePmConfigFrequencySet struct { OutputOptions Args struct { Frequency uint32 `positional-arg-name:"FREQUENCY" required:"yes"` Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigFrequencySet) Execute ¶ added in v1.1.6
func (options *DevicePmConfigFrequencySet) Execute(args []string) error
type DevicePmConfigGroupDisable ¶ added in v1.1.6
type DevicePmConfigGroupDisable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Groups []GroupName `positional-arg-name:"GROUP_NAME" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigGroupDisable) Execute ¶ added in v1.1.6
func (options *DevicePmConfigGroupDisable) Execute(args []string) error
type DevicePmConfigGroupEnable ¶ added in v1.1.6
type DevicePmConfigGroupEnable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Groups []GroupName `positional-arg-name:"GROUP_NAME" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigGroupEnable) Execute ¶ added in v1.1.6
func (options *DevicePmConfigGroupEnable) Execute(args []string) error
type DevicePmConfigGroupList ¶ added in v1.1.6
type DevicePmConfigGroupList struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigGroupList) Execute ¶ added in v1.1.6
func (options *DevicePmConfigGroupList) Execute(args []string) error
type DevicePmConfigGroupMetricList ¶ added in v1.1.6
type DevicePmConfigGroupMetricList struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Group GroupName `positional-arg-name:"GROUP_NAME" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigGroupMetricList) Execute ¶ added in v1.1.6
func (options *DevicePmConfigGroupMetricList) Execute(args []string) error
type DevicePmConfigMetricDisable ¶ added in v1.1.6
type DevicePmConfigMetricDisable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Metrics []MetricName `positional-arg-name:"METRIC_NAME" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigMetricDisable) Execute ¶ added in v1.1.6
func (options *DevicePmConfigMetricDisable) Execute(args []string) error
type DevicePmConfigMetricEnable ¶ added in v1.1.6
type DevicePmConfigMetricEnable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` Metrics []MetricName `positional-arg-name:"METRIC_NAME" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigMetricEnable) Execute ¶ added in v1.1.6
func (options *DevicePmConfigMetricEnable) Execute(args []string) error
type DevicePmConfigMetricList ¶ added in v1.1.6
type DevicePmConfigMetricList struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigMetricList) Execute ¶ added in v1.1.6
func (options *DevicePmConfigMetricList) Execute(args []string) error
type DevicePmConfigSetMaxSkew ¶ added in v1.2.0
type DevicePmConfigSetMaxSkew struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` MaxSkew uint32 `positional-arg-name:"MAX_SKEW" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigSetMaxSkew) Execute ¶ added in v1.2.0
func (options *DevicePmConfigSetMaxSkew) Execute(args []string) error
type DevicePmConfigsGet ¶ added in v1.1.6
type DevicePmConfigsGet struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DevicePmConfigsGet) Execute ¶ added in v1.1.6
func (options *DevicePmConfigsGet) Execute(args []string) error
type DevicePortDisable ¶ added in v1.0.7
type DevicePortDisable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` PortId PortNum `positional-arg-name:"PORT_NUMBER" required:"yes"` } `positional-args:"yes"` }
func (*DevicePortDisable) Execute ¶ added in v1.0.7
func (options *DevicePortDisable) Execute(args []string) error
Device Port Disable
type DevicePortEnable ¶ added in v1.0.7
type DevicePortEnable struct { Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` PortId PortNum `positional-arg-name:"PORT_NUMBER" required:"yes"` } `positional-args:"yes"` }
func (*DevicePortEnable) Execute ¶ added in v1.0.7
func (options *DevicePortEnable) Execute(args []string) error
Device Port Enable
type DevicePortList ¶
type DevicePortList struct { ListOutputOptions Args struct { Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DevicePortList) Execute ¶
func (options *DevicePortList) Execute(args []string) error
type DeviceReboot ¶
type DeviceReboot struct { Args struct { Ids []DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*DeviceReboot) Execute ¶
func (options *DeviceReboot) Execute(args []string) error
type DisableLogCorrelationOpts ¶ added in v1.2.1
type DisableLogCorrelationOpts struct { OutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
DisableLogCorrelationOpts represent the supported CLI arguments for the log correlation disable command
func (*DisableLogCorrelationOpts) Execute ¶ added in v1.2.1
func (options *DisableLogCorrelationOpts) Execute(args []string) error
This method disables log correlation for components. For example, using below command, log correlation can be disabled for specific component voltctl log correlation disable <componentName> Omitting the component name will disable log correlation for all the components, as shown in below command. voltctl log correlation disable
type DisableLogTracingOpts ¶ added in v1.2.0
type DisableLogTracingOpts struct { OutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
DisableLogTracingOpts represents the supported CLI arguments for the log tracing disable command
func (*DisableLogTracingOpts) Execute ¶ added in v1.2.0
func (options *DisableLogTracingOpts) Execute(args []string) error
This method disables log trace publishing for components. For example, using below command, trace publishing can be disabled for specific component voltctl log tracing disable <componentName> Omitting the component name will disable trace publishing for all the components, as shown in below command. voltctl log tracing disable
type EnableLogCorrelationOpts ¶ added in v1.2.1
type EnableLogCorrelationOpts struct { OutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
EnableLogCorrelationOpts represent the supported CLI arguments for the log correlation enable command
func (*EnableLogCorrelationOpts) Execute ¶ added in v1.2.1
func (options *EnableLogCorrelationOpts) Execute(args []string) error
This method enables log correlation for components. For example, using below command, log correlation can be enabled for specific component voltctl log correlation enable <componentName> Omitting the component name will enable log correlation for all the components, as shown in below command. voltctl log correlation enable
type EnableLogTracingOpts ¶ added in v1.2.0
type EnableLogTracingOpts struct { OutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
EnableLogTracingOpts represents the supported CLI arguments for the log tracing enable command
func (*EnableLogTracingOpts) Execute ¶ added in v1.2.0
func (options *EnableLogTracingOpts) Execute(args []string) error
This method enables log trace publishing for components. For example, using below command, trace publishing can be enabled for specific component voltctl log tracing enable <componentName> Omitting the component name will enable trace publishing for all the components, as shown in below command. voltctl log tracing enable
type EventHeader ¶ added in v1.0.3
type EventHeader struct { Category string `json:"category"` SubCategory string `json:"sub_category"` Type string `json:"type"` Raised_ts time.Time `json:"raised_ts"` Reported_ts time.Time `json:"reported_ts"` Device_ids []string `json:"device_ids"` // Opportunistically collected list of device_ids Titles []string `json:"titles"` // Opportunistically collected list of titles Timestamp time.Time `json:"timestamp"` // Timestamp from Kafka }
func DecodeHeader ¶ added in v1.0.3
func DecodeHeader(b []byte, ts time.Time) (*EventHeader, error)
Extract the header, as well as a few other items that might be of interest
type EventHeaderWidths ¶ added in v1.0.3
type EventHeaderWidths struct { Category int SubCategory int Type int Raised_ts int Reported_ts int Device_ids int Titles int Timestamp int }
var DefaultWidths EventHeaderWidths = EventHeaderWidths{
Category: 13,
SubCategory: 3,
Type: 12,
Raised_ts: 10,
Reported_ts: 10,
Device_ids: 40,
Titles: 40,
Timestamp: 10,
}
type EventListenOpts ¶ added in v1.0.3
type EventListenOpts struct { Format string `long:"format" value-name:"FORMAT" default:"" description:"Format to use to output structured data"` // nolint: staticcheck OutputAs string `short:"o" long:"outputas" default:"table" choice:"table" choice:"json" choice:"yaml" description:"Type of output to generate"` Filter string `short:"f" long:"filter" default:"" value-name:"FILTER" description:"Only display results that match filter"` Follow bool `short:"F" long:"follow" description:"Continue to consume until CTRL-C is pressed"` ShowBody bool `short:"b" long:"show-body" description:"Show body of events rather than only a header summary"` Count int `short:"c" long:"count" default:"-1" value-name:"LIMIT" description:"Limit the count of messages that will be printed"` Now bool `short:"n" long:"now" description:"Stop printing events when current time is reached"` Timeout int `` /* 126-byte string literal not displayed */ Since string `short:"s" long:"since" default:"" value-name:"TIMESTAMP" description:"Do not show entries before timestamp"` }
func (*EventListenOpts) Execute ¶ added in v1.0.3
func (options *EventListenOpts) Execute(args []string) error
func (*EventListenOpts) FinishOutput ¶ added in v1.0.3
func (options *EventListenOpts) FinishOutput()
Finish output, print any column footers or other end characters
func (*EventListenOpts) StartOutput ¶ added in v1.0.3
func (options *EventListenOpts) StartOutput(outputFormat string) error
Start output, print any column headers or other start characters
type EventOpts ¶ added in v1.0.3
type EventOpts struct {
EventListen EventListenOpts `command:"listen"`
}
type FlowIdOptions ¶ added in v1.3.0
type FlowIdOptions struct {
HexId bool `short:"x" long:"hex-id" description:"Output Ids in hex format"`
}
type FlowList ¶
type FlowList struct { ListOutputOptions FlowIdOptions Args struct { Id string `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` Method string }
type GlobalConfigSpec ¶
type GlobalConfigSpec struct { Server string `yaml:"server"` Kafka string `yaml:"kafka"` KvStore string `yaml:"kvstore"` Tls TlsConfigSpec `yaml:"tls"` Grpc GrpcConfigSpec `yaml:"grpc"` KvStoreConfig KvStoreConfigSpec `yaml:"kvstoreconfig"` K8sConfig string `yaml:"-"` }
type GrpcConfigSpec ¶
type KvStoreConfigSpec ¶ added in v1.0.15
type LevelName ¶ added in v1.1.2
type LevelName string
Custom Option representing Log Level (one of debug, info, warn, error, fatal)
type ListLogCorrelationOpts ¶ added in v1.2.1
type ListLogCorrelationOpts struct { ListOutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
ListLogCorrelationOpts represents the supported CLI arguments for the log correlation list command
func (*ListLogCorrelationOpts) Execute ¶ added in v1.2.1
func (options *ListLogCorrelationOpts) Execute(args []string) error
This method lists current status of log correlation for components. For example, using below command, log correlation can be queried for specific component voltctl log correlation list <componentName> Omitting the component name will list log correlation for all the components, as shown in below command. voltctl log correlation list
type ListLogLevelsOpts ¶
type ListLogLevelsOpts struct { ListOutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
ListLogLevelOpts represents the supported CLI arguments for the log level list command
func (*ListLogLevelsOpts) Execute ¶
func (options *ListLogLevelsOpts) Execute(args []string) error
This method list loglevel for components. For example, using below command loglevel can be list for specific component voltctl loglevel list <componentName> For example, using below command loglevel can be list for all the components with all the packageName voltctl loglevel list
type ListLogPackagesOpts ¶ added in v1.1.2
type ListLogPackagesOpts struct { ListOutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
ListLogLevelOpts represents the supported CLI arguments for the log level list command
func (*ListLogPackagesOpts) Execute ¶ added in v1.1.2
func (options *ListLogPackagesOpts) Execute(args []string) error
This method lists registered log packages for components. For example, available log packages can be listed for specific component using below command voltctl loglevel listpackage <componentName> For example, available log packages can be listed for all the components using below command (omitting component name) voltctl loglevel listpackage
type ListLogTracingOpts ¶ added in v1.2.0
type ListLogTracingOpts struct { ListOutputOptions Args struct { Component []ComponentName } `positional-args:"yes" required:"yes"` }
ListLogTracingOpts represents the supported CLI arguments for the log tracing list command
func (*ListLogTracingOpts) Execute ¶ added in v1.2.0
func (options *ListLogTracingOpts) Execute(args []string) error
This method lists current status of log trace publishing for components. For example, using below command, trace publishing can be queried for specific component voltctl log tracing list <componentName> Omitting the component name will list trace publishing for all the components, as shown in below command. voltctl log tracing list
type ListOutputOptions ¶
type ListOutputOptions struct { OutputOptions Filter string `short:"f" long:"filter" default:"" value-name:"FILTER" description:"Only display results that match filter"` OrderBy string `short:"r" long:"orderby" default:"" value-name:"ORDER" description:"Specify the sort order of the results"` }
type ListOutputOptionsJson ¶
type ListOutputOptionsJson struct { OutputOptionsJson Filter string `short:"f" long:"filter" default:"" value-name:"FILTER" description:"Only display results that match filter"` OrderBy string `short:"r" long:"orderby" default:"" value-name:"ORDER" description:"Specify the sort order of the results"` }
type LogCorrelationOpts ¶ added in v1.2.1
type LogCorrelationOpts struct { EnableLogCorrelation EnableLogCorrelationOpts `command:"enable"` DisableLogCorrelation DisableLogCorrelationOpts `command:"disable"` ListLogCorrelation ListLogCorrelationOpts `command:"list"` }
LogCorrelationOpts represents the log correlation commands
type LogLevelOpts ¶
type LogLevelOpts struct { SetLogLevel SetLogLevelOpts `command:"set"` ListLogLevels ListLogLevelsOpts `command:"list"` ClearLogLevels ClearLogLevelsOpts `command:"clear"` }
LogLevelOpts represents the log level commands
type LogLevelOutput ¶ added in v1.0.15
LogLevelOutput represents the output structure for the loglevel
type LogOpts ¶ added in v1.1.2
type LogOpts struct { LogLevel LogLevelOpts `command:"level"` LogPackage LogPackageOpts `command:"package"` LogTracing LogTracingOpts `command:"tracing"` LogCorrelation LogCorrelationOpts `command:"correlation"` }
LogOpts represents the log commands
type LogPackageOpts ¶ added in v1.1.2
type LogPackageOpts struct {
ListLogPackages ListLogPackagesOpts `command:"list"`
}
LogPackageOpts represents the log package commands
type LogTracingOpts ¶ added in v1.2.0
type LogTracingOpts struct { EnableLogTracing EnableLogTracingOpts `command:"enable"` DisableLogTracing DisableLogTracingOpts `command:"disable"` ListLogTracing ListLogTracingOpts `command:"list"` }
LogTracingOpts represents the log tracing commands
type LogicalDeviceFlowList ¶
type LogicalDeviceFlowList struct { ListOutputOptions FlowIdOptions Args struct { Id LogicalDeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*LogicalDeviceFlowList) Execute ¶
func (options *LogicalDeviceFlowList) Execute(args []string) error
type LogicalDeviceId ¶
type LogicalDeviceId string
func (*LogicalDeviceId) Complete ¶
func (i *LogicalDeviceId) Complete(match string) []flags.Completion
type LogicalDeviceInspect ¶
type LogicalDeviceInspect struct { OutputOptionsJson Args struct { Id LogicalDeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*LogicalDeviceInspect) Execute ¶
func (options *LogicalDeviceInspect) Execute(args []string) error
type LogicalDeviceList ¶
type LogicalDeviceList struct {
ListOutputOptions
}
func (*LogicalDeviceList) Execute ¶
func (options *LogicalDeviceList) Execute(args []string) error
type LogicalDeviceOpts ¶
type LogicalDeviceOpts struct { List LogicalDeviceList `command:"list"` Flows LogicalDeviceFlowList `command:"flows"` Port struct { List LogicalDevicePortList `command:"list"` } `command:"port"` Inspect LogicalDeviceInspect `command:"inspect"` }
type LogicalDevicePortList ¶
type LogicalDevicePortList struct { ListOutputOptions Args struct { Id LogicalDeviceId `positional-arg-name:"DEVICE_ID" required:"yes"` } `positional-args:"yes"` }
func (*LogicalDevicePortList) Execute ¶
func (options *LogicalDevicePortList) Execute(args []string) error
type MessageHeader ¶ added in v1.1.2
type MessageHeader struct { Id string `json:"id"` Type string `json:"type"` FromTopic string `json:"from_topic"` ToTopic string `json:"to_topic"` KeyTopic string `json:"key_topic"` Timestamp time.Time `json:"timestamp"` InterAdapterType string `json:"inter_adapter_type"` // interadapter header ToDeviceId string `json:"to_device_id"` // interadapter header ProxyDeviceId string `json:"proxy_device_id"` //interadapter header }
MessageHeader is a set of fields extracted * from voltha.MessageHeader as well as useful other * places such as InterAdapterHeader. These are fields that * will be summarized in list mode and/or can be filtered * on.
func DecodeInterContainerHeader ¶ added in v1.1.2
func DecodeInterContainerHeader(b []byte, ts time.Time) (*MessageHeader, error)
Extract the header, as well as a few other items that might be of interest
type MessageHeaderWidths ¶ added in v1.1.2
type MessageHeaderWidths struct { Id int Type int FromTopic int ToTopic int KeyTopic int InterAdapterType int ToDeviceId int ProxyDeviceId int Timestamp int }
Fixed widths because we output in a continuous streaming * mode rather than a table-based dump at the end.
var DefaultMessageWidths MessageHeaderWidths = MessageHeaderWidths{
Id: 32,
Type: 10,
FromTopic: 16,
ToTopic: 16,
KeyTopic: 10,
Timestamp: 10,
InterAdapterType: 14,
ToDeviceId: 10,
ProxyDeviceId: 10,
}
type MessageListenOpts ¶ added in v1.1.2
type MessageListenOpts struct { Format string `long:"format" value-name:"FORMAT" default:"" description:"Format to use to output structured data"` // nolint: staticcheck OutputAs string `short:"o" long:"outputas" default:"table" choice:"table" choice:"json" choice:"yaml" description:"Type of output to generate"` Filter string `short:"f" long:"filter" default:"" value-name:"FILTER" description:"Only display results that match filter"` Follow bool `short:"F" long:"follow" description:"Continue to consume until CTRL-C is pressed"` ShowBody bool `short:"b" long:"show-body" description:"Show body of messages rather than only a header summary"` Count int `short:"c" long:"count" default:"-1" value-name:"LIMIT" description:"Limit the count of messages that will be printed"` Now bool `short:"n" long:"now" description:"Stop printing messages when current time is reached"` Timeout int `` /* 126-byte string literal not displayed */ Since string `short:"s" long:"since" default:"" value-name:"TIMESTAMP" description:"Do not show entries before timestamp"` Args struct { Topic string } `positional-args:"yes" required:"yes"` }
func (*MessageListenOpts) Execute ¶ added in v1.1.2
func (options *MessageListenOpts) Execute(args []string) error
func (*MessageListenOpts) FinishOutput ¶ added in v1.1.2
func (options *MessageListenOpts) FinishOutput()
Finish output, print any column footers or other end characters
func (*MessageListenOpts) StartOutput ¶ added in v1.1.2
func (options *MessageListenOpts) StartOutput(outputFormat string) error
Start output, print any column headers or other start characters
type MessageOpts ¶ added in v1.1.2
type MessageOpts struct {
MessageListen MessageListenOpts `command:"listen"`
}
type MetricName ¶ added in v1.1.6
type MetricName string
func (*MetricName) Complete ¶ added in v1.1.6
func (i *MetricName) Complete(match string) []flags.Completion
type OutputOptions ¶
type OutputOptions struct { Format string `long:"format" value-name:"FORMAT" default:"" description:"Format to use to output structured data"` Quiet bool `short:"q" long:"quiet" description:"Output only the IDs of the objects"` // nolint: staticcheck OutputAs string `short:"o" long:"outputas" default:"table" choice:"table" choice:"json" choice:"yaml" description:"Type of output to generate"` NameLimit int `short:"l" long:"namelimit" default:"-1" value-name:"LIMIT" description:"Limit the depth (length) in the table column name"` }
type OutputOptionsJson ¶
type OutputOptionsJson struct { Format string `long:"format" value-name:"FORMAT" default:"" description:"Format to use to output structured data"` Quiet bool `short:"q" long:"quiet" description:"Output only the IDs of the objects"` // nolint: staticcheck OutputAs string `short:"o" long:"outputas" default:"json" choice:"table" choice:"json" choice:"yaml" description:"Type of output to generate"` NameLimit int `short:"l" long:"namelimit" default:"-1" value-name:"LIMIT" description:"Limit the depth (length) in the table column name"` }
type OutputType ¶
type OutputType uint8
const ( OUTPUT_TABLE OutputType = iota OUTPUT_JSON OUTPUT_YAML )
type ReturnValueRow ¶ added in v1.1.4
type ReturnValueRow struct { Name string `json:"name"` Result interface{} `json:"result"` }
type RpcEventHandler ¶
type RpcEventHandler struct { Response proto.Message Status *status.Status Data []byte Fields map[string]map[string]interface{} }
func (*RpcEventHandler) OnReceiveHeaders ¶
func (h *RpcEventHandler) OnReceiveHeaders(metadata.MD)
func (*RpcEventHandler) OnReceiveResponse ¶
func (h *RpcEventHandler) OnReceiveResponse(m proto.Message)
func (*RpcEventHandler) OnReceiveTrailers ¶
func (h *RpcEventHandler) OnReceiveTrailers(s *status.Status, m metadata.MD)
func (*RpcEventHandler) OnResolveMethod ¶
func (h *RpcEventHandler) OnResolveMethod(*desc.MethodDescriptor)
func (*RpcEventHandler) OnSendHeaders ¶
func (h *RpcEventHandler) OnSendHeaders(metadata.MD)
type SetLogLevelOpts ¶
type SetLogLevelOpts struct { OutputOptions Args struct { Level LevelName Component []ComponentAndPackageName } `positional-args:"yes" required:"yes"` }
SetLogLevelOpts represents the supported CLI arguments for the log level set command
func (*SetLogLevelOpts) Execute ¶
func (options *SetLogLevelOpts) Execute(args []string) error
This method set loglevel for components. For example, using below command loglevel can be set for specific component with default packageName voltctl loglevel set level <componentName> For example, using below command loglevel can be set for specific component with specific packageName voltctl loglevel set level <componentName#packageName> For example, using below command loglevel can be set for more than one component for default package and other component for specific packageName voltctl loglevel set level <componentName1#packageName> <componentName2>
type TlsConfigSpec ¶
type VersionDetails ¶
type VersionOpts ¶
type VersionOpts struct { OutputOptions ClientOnly bool `long:"clientonly" description:"Display only client version information"` }
func (*VersionOpts) Execute ¶
func (options *VersionOpts) Execute(args []string) error
type VersionOutput ¶
type VersionOutput struct { Client VersionDetails `json:"client"` Cluster VersionDetails `json:"cluster"` }
type VolthaAnyResolver ¶ added in v1.1.4
type VolthaAnyResolver struct{}
jsonpb requires a resolver to resolve Any.Any into proto.Message.