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.
Index ¶
- Constants
- Variables
- func RegisterCompletionCommands(parent *flags.Parser)
- func RegisterConfigCommands(parent *flags.Parser)
- func RegisterDMICommands(parser *flags.Parser)
- func RegisterLoggingCommands(parent *flags.Parser)
- func RegisterONUCommands(parser *flags.Parser)
- func RegisterOltCommands(parser *flags.Parser)
- func RegisterPonCommands(parser *flags.Parser)
- func RegisterServiceCommands(parser *flags.Parser)
- func RegisterUNICommands(parser *flags.Parser)
- type AlarmClear
- type AlarmList
- type AlarmListOutput
- type AlarmNameString
- type AlarmOptions
- type AlarmRaise
- type BashOptions
- type CompletionOptions
- type ConfigOptions
- type DMIOptions
- type DmiEventCreate
- type DmiEventOptions
- type DmiTransceiverOptions
- type DmiTransceiverPlugIn
- type DmiTransceiverPlugOut
- type DmiTransceiversList
- type GroupAddress
- type IgmpSubAction
- type LoggingOptions
- type ONUDhcpRestart
- type ONUEapolRestart
- type ONUFlows
- type ONUGet
- type ONUIgmp
- type ONUInvalidateMds
- type ONUList
- type ONUOptions
- type ONUPowerOn
- type ONUServices
- type ONUShutDown
- type ONUTrafficSchedulers
- type ONUUnis
- type OltAlarmClear
- type OltAlarmList
- type OltAlarmListOutput
- type OltAlarmNameString
- type OltAlarmOptions
- type OltAlarmRaise
- type OltFlows
- type OltGet
- type OltInterfaceID
- type OltInterfaceStatus
- type OltNNIs
- type OltPONs
- type OltPoweron
- type OltPoweronAllOnus
- type OltReboot
- type OltResources
- type OltShutdown
- type OltShutdownAllOnus
- type OnuSnString
- type PONOptions
- type PonPoweronAllOnus
- type PonShutdownAllOnus
- type RestartGrpcServer
- type ServiceList
- type ServiceOptions
- type StartGrpcServer
- type StopGrpcServer
- type UNIDhcpRestart
- type UNIEapolRestart
- type UNIGet
- type UNIList
- type UNIOptions
- type UNIServices
- type UniIdInt
Constants ¶
const ( DEFAULT_OLT_DEVICE_HEADER_FORMAT = "table{{ .ID }}\t{{ .SerialNumber }}\t{{ .OperState }}\t{{ .InternalState }}\t{{ .IP }}\t{{ .NniDhcpTrapVid }}" DEFAULT_OLT_RESOURCES_HEADER_FORMAT = "table{{ .Type }}\t{{ .PonPortId }}\t{{ .OnuId }}\t{{ .PortNo }}\t{{ .ResourceId }}\t{{ .FlowId }}" DEFAULT_NNI_PORT_HEADER_FORMAT = "table{{ .ID }}\t{{ .OperState }}\t{{ .InternalState }}\t{{ .PacketCount }}" DEFAULT_PON_PORT_HEADER_FORMAT = "" /* 169-byte string literal not displayed */ )
const ( DEFAULT_ONU_DEVICE_HEADER_FORMAT = "" /* 228-byte string literal not displayed */ DEFAULT_ONU_DEVICE_HEADER_FORMAT_WITH_SERVICES = "" /* 241-byte string literal not displayed */ )
const ( DEFAULT_UNI_HEADER_FORMAT = "table{{ .OnuSn }}\t{{ .OnuID }}\t{{ .ID }}\t{{ .MeID }}\t{{ .PortNo }}\t{{ .OperState }}\t{{ .Type }}" DEFAULT_UNI_HEADER_FORMAT_WITH_SERVICES = "table{{ .OnuSn }}\t{{ .OnuID }}\t{{ .ID }}\t{{ .MeID }}\t{{ .PortNo }}\t{{ .OperState }}\t{{ .Type }}\t{{ .Services }}" )
const (
DEFAULT_OLT_ALARM_LIST_FORMAT = "table{{ .Name }}"
)
const (
DEFAULT_SERVICE_HEADER_FORMAT = "" /* 421-byte string literal not displayed */
)
const (
DEFAULT_TRANSCEIVER_HEADER_FORMAT = "table{{ .ID }}\t{{ .UUID }}\t{{ .Name }}\t{{ .Technology }}\t{{ .PluggedIn }}\t{{ .PonIds }}"
)
const IgmpJoinKey string = "join"
const IgmpJoinKeyV3 string = "joinv3"
const IgmpLeaveKey string = "leave"
Variables ¶
var IgmpAllowedActions = []string{IgmpJoinKey, IgmpLeaveKey, IgmpJoinKeyV3}
Functions ¶
func RegisterCompletionCommands ¶
func RegisterCompletionCommands(parent *flags.Parser)
func RegisterConfigCommands ¶
func RegisterConfigCommands(parent *flags.Parser)
func RegisterDMICommands ¶ added in v1.4.3
func RegisterDMICommands(parser *flags.Parser)
func RegisterLoggingCommands ¶
func RegisterLoggingCommands(parent *flags.Parser)
func RegisterONUCommands ¶
func RegisterONUCommands(parser *flags.Parser)
func RegisterOltCommands ¶
func RegisterOltCommands(parser *flags.Parser)
func RegisterPonCommands ¶ added in v0.0.19
func RegisterPonCommands(parser *flags.Parser)
func RegisterServiceCommands ¶ added in v1.0.0
func RegisterServiceCommands(parser *flags.Parser)
func RegisterUNICommands ¶ added in v1.9.0
func RegisterUNICommands(parser *flags.Parser)
Types ¶
type AlarmClear ¶ added in v0.0.12
type AlarmClear struct { Parameters []string `short:"p" description:"Additional Alarm Parameter in name=value form"` Args struct { Name AlarmNameString SerialNumber OnuSnString } `positional-args:"yes" required:"yes"` }
func (*AlarmClear) Execute ¶ added in v0.0.12
func (o *AlarmClear) Execute(args []string) error
Execute alarm clear
type AlarmListOutput ¶ added in v0.0.12
type AlarmListOutput struct {
Name string
}
type AlarmNameString ¶ added in v0.0.13
type AlarmNameString string
func (*AlarmNameString) Complete ¶ added in v0.0.13
func (onuSn *AlarmNameString) Complete(match string) []flags.Completion
type AlarmOptions ¶ added in v0.0.12
type AlarmOptions struct { Raise AlarmRaise `command:"raise"` Clear AlarmClear `command:"clear"` List AlarmList `command:"list"` }
type AlarmRaise ¶ added in v0.0.12
type AlarmRaise struct { Parameters []string `short:"p" description:"Additional Alarm Parameter in name=value form"` Args struct { Name AlarmNameString SerialNumber OnuSnString } `positional-args:"yes" required:"yes"` }
func (*AlarmRaise) Execute ¶ added in v0.0.12
func (o *AlarmRaise) Execute(args []string) error
Execute alarm raise
type BashOptions ¶
type BashOptions struct{}
func (*BashOptions) Execute ¶
func (options *BashOptions) Execute(args []string) error
type CompletionOptions ¶
type CompletionOptions struct {
BashOptions `command:"bash"`
}
type ConfigOptions ¶
type ConfigOptions struct{}
func (*ConfigOptions) Execute ¶
func (options *ConfigOptions) Execute(args []string) error
type DMIOptions ¶ added in v1.4.3
type DMIOptions struct { Events DmiEventOptions `command:"events"` Transceiver DmiTransceiverOptions `command:"transceiver"` }
type DmiEventCreate ¶ added in v1.4.3
type DmiEventCreate struct { Args struct { Name string } `positional-args:"yes" required:"yes"` }
func (*DmiEventCreate) Execute ¶ added in v1.4.3
func (o *DmiEventCreate) Execute(args []string) error
Execute create event
type DmiEventOptions ¶ added in v1.4.3
type DmiEventOptions struct {
Create DmiEventCreate `command:"create"`
}
type DmiTransceiverOptions ¶ added in v1.12.5
type DmiTransceiverOptions struct { PlugIn DmiTransceiverPlugIn `command:"plug_in"` PlugOut DmiTransceiverPlugOut `command:"plug_out"` List DmiTransceiversList `command:"list"` }
type DmiTransceiverPlugIn ¶ added in v1.12.5
type DmiTransceiverPlugIn struct { Args struct { TransceiverId uint32 } `positional-args:"yes" required:"yes"` }
func (*DmiTransceiverPlugIn) Execute ¶ added in v1.12.5
func (pon *DmiTransceiverPlugIn) Execute(args []string) error
Plug in the specified transceiver
type DmiTransceiverPlugOut ¶ added in v1.12.5
type DmiTransceiverPlugOut struct { Args struct { TransceiverId uint32 } `positional-args:"yes" required:"yes"` }
func (*DmiTransceiverPlugOut) Execute ¶ added in v1.12.5
func (pon *DmiTransceiverPlugOut) Execute(args []string) error
Plug out the specified transceiver
type DmiTransceiversList ¶ added in v1.12.5
type DmiTransceiversList struct { }
func (*DmiTransceiversList) Execute ¶ added in v1.12.5
func (pon *DmiTransceiversList) Execute(args []string) error
Print a list of the transceivers and their state
type GroupAddress ¶ added in v1.5.0
type GroupAddress string
type IgmpSubAction ¶ added in v0.0.15
type IgmpSubAction string
func (*IgmpSubAction) Complete ¶ added in v1.0.0
func (onuSn *IgmpSubAction) Complete(match string) []flags.Completion
type LoggingOptions ¶
type LoggingOptions struct { Args struct { Level string Caller bool } `positional-args:"yes" required:"yes"` }
func (*LoggingOptions) Execute ¶
func (options *LoggingOptions) Execute(args []string) error
type ONUDhcpRestart ¶ added in v0.0.5
type ONUDhcpRestart struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUDhcpRestart) Execute ¶ added in v0.0.5
func (options *ONUDhcpRestart) Execute(args []string) error
type ONUEapolRestart ¶ added in v0.0.5
type ONUEapolRestart struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUEapolRestart) Execute ¶ added in v0.0.5
func (options *ONUEapolRestart) Execute(args []string) error
type ONUFlows ¶ added in v0.0.18
type ONUFlows struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
type ONUGet ¶
type ONUGet struct { Verbose bool `short:"v" long:"verbose" description:"Print all the informations we have about ONUs"` Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
type ONUIgmp ¶ added in v0.0.15
type ONUIgmp struct { Args struct { OnuSn OnuSnString SubAction IgmpSubAction GroupAddress GroupAddress } `positional-args:"yes" required:"yes"` }
type ONUInvalidateMds ¶ added in v1.10.0
type ONUInvalidateMds struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUInvalidateMds) Execute ¶ added in v1.10.0
func (options *ONUInvalidateMds) Execute(args []string) error
type ONUList ¶
type ONUList struct {
Verbose bool `short:"v" long:"verbose" description:"Print all the informations we have about ONUs"`
}
type ONUOptions ¶
type ONUOptions struct { List ONUList `command:"list"` Get ONUGet `command:"get"` ShutDown ONUShutDown `command:"shutdown"` PowerOn ONUPowerOn `command:"poweron"` RestartEapol ONUEapolRestart `command:"auth_restart"` RestartDchp ONUDhcpRestart `command:"dhcp_restart"` Igmp ONUIgmp `command:"igmp"` TrafficSchedulers ONUTrafficSchedulers `command:"traffic_schedulers"` Alarms AlarmOptions `command:"alarms"` Flows ONUFlows `command:"flows"` Services ONUServices `command:"services"` InvalidateMds ONUInvalidateMds `command:"invalidate_mds"` }
type ONUPowerOn ¶
type ONUPowerOn struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUPowerOn) Execute ¶
func (options *ONUPowerOn) Execute(args []string) error
type ONUServices ¶ added in v1.0.0
type ONUServices struct { Args struct { OnuSn OnuSnString } `positional-args:"yes"` }
func (*ONUServices) Execute ¶ added in v1.0.0
func (options *ONUServices) Execute(args []string) error
type ONUShutDown ¶
type ONUShutDown struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUShutDown) Execute ¶
func (options *ONUShutDown) Execute(args []string) error
type ONUTrafficSchedulers ¶ added in v0.0.18
type ONUTrafficSchedulers struct { Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
func (*ONUTrafficSchedulers) Execute ¶ added in v0.0.18
func (options *ONUTrafficSchedulers) Execute(args []string) error
type ONUUnis ¶ added in v1.8.0
type ONUUnis struct { Verbose bool `short:"v" long:"verbose" description:"Print all the informations we have about UNIs"` Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
type OltAlarmClear ¶ added in v0.0.18
type OltAlarmClear struct { Args struct { Name OltAlarmNameString IntfID OltInterfaceID } `positional-args:"yes" required:"yes"` }
func (*OltAlarmClear) Execute ¶ added in v0.0.18
func (o *OltAlarmClear) Execute(args []string) error
Execute alarm clear
type OltAlarmList ¶ added in v0.0.18
type OltAlarmList struct{}
func (*OltAlarmList) Execute ¶ added in v0.0.18
func (o *OltAlarmList) Execute(args []string) error
Execute OLT alarm list
type OltAlarmListOutput ¶ added in v0.0.18
type OltAlarmListOutput struct {
Name string
}
type OltAlarmNameString ¶ added in v0.0.18
type OltAlarmNameString string
func (*OltAlarmNameString) Complete ¶ added in v0.0.18
func (o *OltAlarmNameString) Complete(match string) []flags.Completion
type OltAlarmOptions ¶ added in v0.0.18
type OltAlarmOptions struct { Raise OltAlarmRaise `command:"raise"` Clear OltAlarmClear `command:"clear"` List OltAlarmList `command:"list"` }
type OltAlarmRaise ¶ added in v0.0.18
type OltAlarmRaise struct { Args struct { Name OltAlarmNameString IntfID OltInterfaceID } `positional-args:"yes" required:"yes"` }
func (*OltAlarmRaise) Execute ¶ added in v0.0.18
func (o *OltAlarmRaise) Execute(args []string) error
Execute alarm raise
type OltInterfaceID ¶ added in v0.0.18
type OltInterfaceID uint32
type OltInterfaceStatus ¶ added in v0.0.18
type OltInterfaceStatus string
type OltPoweron ¶ added in v0.0.7
type OltPoweron struct{}
func (*OltPoweron) Execute ¶ added in v0.0.7
func (o *OltPoweron) Execute(args []string) error
type OltPoweronAllOnus ¶ added in v0.0.19
type OltPoweronAllOnus struct{}
func (*OltPoweronAllOnus) Execute ¶ added in v0.0.19
func (o *OltPoweronAllOnus) Execute(args []string) error
type OltResources ¶ added in v1.5.2
type OltResources struct {
Args struct {
Type oltResourcesType
} `positional-args:"yes" required:"yes"`
}
func (*OltResources) Execute ¶ added in v1.5.2
func (o *OltResources) Execute(args []string) error
type OltShutdown ¶ added in v0.0.7
type OltShutdown struct{}
func (*OltShutdown) Execute ¶ added in v0.0.7
func (o *OltShutdown) Execute(args []string) error
type OltShutdownAllOnus ¶ added in v0.0.19
type OltShutdownAllOnus struct{}
func (*OltShutdownAllOnus) Execute ¶ added in v0.0.19
func (o *OltShutdownAllOnus) Execute(args []string) error
type OnuSnString ¶
type OnuSnString string
func (*OnuSnString) Complete ¶
func (onuSn *OnuSnString) Complete(match string) []flags.Completion
type PONOptions ¶ added in v0.0.19
type PONOptions struct { PoweronAllOnus PonPoweronAllOnus `command:"poweronAllONUs"` ShutdownAllOnus PonShutdownAllOnus `command:"shutdownAllONUs"` }
type PonPoweronAllOnus ¶ added in v0.0.19
type PonPoweronAllOnus struct { Args struct { IntfID OltInterfaceID } `positional-args:"yes" required:"yes"` }
func (*PonPoweronAllOnus) Execute ¶ added in v0.0.19
func (pon *PonPoweronAllOnus) Execute(args []string) error
type PonShutdownAllOnus ¶ added in v0.0.19
type PonShutdownAllOnus struct { Args struct { IntfID OltInterfaceID } `positional-args:"yes" required:"yes"` }
func (*PonShutdownAllOnus) Execute ¶ added in v0.0.19
func (pon *PonShutdownAllOnus) Execute(args []string) error
type RestartGrpcServer ¶ added in v1.4.1
type RestartGrpcServer struct { Args struct { Delay uint32 } `positional-args:"yes" required:"yes"` }
func (*RestartGrpcServer) Execute ¶ added in v1.4.1
func (o *RestartGrpcServer) Execute(args []string) error
type ServiceList ¶ added in v1.0.0
type ServiceList struct{}
func (*ServiceList) Execute ¶ added in v1.0.0
func (options *ServiceList) Execute(args []string) error
type ServiceOptions ¶ added in v1.0.0
type ServiceOptions struct {
List ServiceList `command:"list"`
}
type StartGrpcServer ¶ added in v1.4.1
type StartGrpcServer struct{}
func (*StartGrpcServer) Execute ¶ added in v1.4.1
func (o *StartGrpcServer) Execute(args []string) error
type StopGrpcServer ¶ added in v1.4.1
type StopGrpcServer struct{}
func (*StopGrpcServer) Execute ¶ added in v1.4.1
func (o *StopGrpcServer) Execute(args []string) error
type UNIDhcpRestart ¶ added in v1.9.0
type UNIDhcpRestart struct { Args struct { OnuSn OnuSnString UniId UniIdInt } `positional-args:"yes" required:"yes"` }
func (*UNIDhcpRestart) Execute ¶ added in v1.9.0
func (options *UNIDhcpRestart) Execute(args []string) error
type UNIEapolRestart ¶ added in v1.9.0
type UNIEapolRestart struct { Args struct { OnuSn OnuSnString UniId UniIdInt } `positional-args:"yes" required:"yes"` }
func (*UNIEapolRestart) Execute ¶ added in v1.9.0
func (options *UNIEapolRestart) Execute(args []string) error
type UNIGet ¶ added in v1.9.0
type UNIGet struct { Verbose bool `short:"v" long:"verbose" description:"Print all the informations we have about UNIs"` Args struct { OnuSn OnuSnString } `positional-args:"yes" required:"yes"` }
type UNIList ¶ added in v1.9.0
type UNIList struct {
Verbose bool `short:"v" long:"verbose" description:"Print all the Unis from all the ONUs"`
}
type UNIOptions ¶ added in v1.9.0
type UNIOptions struct { List UNIList `command:"list"` Get UNIGet `command:"get"` Services UNIServices `command:"services"` RestartEapol UNIEapolRestart `command:"auth_restart"` RestartDchp UNIDhcpRestart `command:"dhcp_restart"` }
type UNIServices ¶ added in v1.9.0
type UNIServices struct { Verbose bool `short:"v" long:"verbose" description:"Print all the Services from the specified UNI"` Args struct { OnuSn OnuSnString UniId UniIdInt } `positional-args:"yes"` }
func (*UNIServices) Execute ¶ added in v1.9.0
func (options *UNIServices) Execute(args []string) error
Get Services for specified UNI First get UNIs from specified ONU SN Then get Services from appropriate UNI