Documentation ¶
Overview ¶
* Portions copyright 2019-present Open Networking Foundation * Original 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 ¶
This section is empty.
Variables ¶
View Source
var CharReplacer = strings.NewReplacer("\\t", "\t", "\\n", "\n")
View Source
var GlobalConfig = GlobalConfigSpec{ Server: "localhost", Tls: TlsConfigSpec{ UseTls: false, }, Grpc: GrpcConfigSpec{ Timeout: time.Second * 10, }, }
View Source
var GlobalOptions struct { Config string `short:"c" long:"config" env:"CORDCONFIG" 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 XOS"` Username string `short:"u" long:"username" value-name:"USERNAME" default:"" description:"Username to authenticate with XOS"` Password string `short:"p" long:"password" value-name:"PASSWORD" default:"" description:"Password to authenticate with XOS"` Protoset string `long:"protoset" value-name:"FILENAME" description:"Load protobuf definitions from protoset instead of reflection api"` Debug bool `short:"d" long:"debug" description:"Enable debug mode"` 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"` Yes bool `short:"y" long:"yes" description:"answer yes to any confirmation prompts"` }
Functions ¶
func ProcessGlobalOptions ¶
func ProcessGlobalOptions()
Types ¶
type GlobalConfigSpec ¶
type GlobalConfigSpec struct { Server string `yaml:"server"` Username string `yaml:"username"` Password string `yaml:"password"` Protoset string `yaml:"protoset"` Tls TlsConfigSpec `yaml:"tls"` Grpc GrpcConfigSpec }
type GrpcConfigSpec ¶
type OutputType ¶
type OutputType uint8
const ( OUTPUT_TABLE OutputType = iota OUTPUT_JSON OUTPUT_YAML CORE_VERSION_CONSTRAINT = ">= 3, < 5" // Support XOS major versions 3 and 4 )
Click to show internal directories.
Click to hide internal directories.