Documentation ¶
Overview ¶
Package providers implements support for Go service providers.
YANG Development Kit Copyright 2017 Cisco Systems. All rights reserved. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 ¶
- type CodecServiceProvider
- func (provider *CodecServiceProvider) GetEncoding() encoding.EncodingFormat
- func (provider *CodecServiceProvider) GetRootSchemaNode(entity types.Entity) types.RootSchemaNode
- func (provider *CodecServiceProvider) GetState() *errors.State
- func (provider *CodecServiceProvider) Initialize(entity types.Entity)
- type NetconfServiceProvider
- func (provider *NetconfServiceProvider) Connect()
- func (provider *NetconfServiceProvider) Disconnect()
- func (provider *NetconfServiceProvider) ExecuteRpc(operation string, entity types.Entity, params map[string]string) types.DataNode
- func (provider *NetconfServiceProvider) GetCapabilities() []string
- func (provider *NetconfServiceProvider) GetPrivate() interface{}
- func (provider *NetconfServiceProvider) GetState() *errors.State
- type OpenDaylightServiceProvider
- func (provider *OpenDaylightServiceProvider) Connect()
- func (provider *OpenDaylightServiceProvider) Disconnect()
- func (provider *OpenDaylightServiceProvider) GetNodeIDs() []string
- func (provider *OpenDaylightServiceProvider) GetNodeProvider(nodeID string) types.ServiceProvider
- func (provider *OpenDaylightServiceProvider) GetPrivate() interface{}
- func (provider *OpenDaylightServiceProvider) GetState() *errors.State
- type RestconfServiceProvider
- func (provider *RestconfServiceProvider) Connect()
- func (provider *RestconfServiceProvider) Disconnect()
- func (provider *RestconfServiceProvider) ExecuteRpc(operation string, entity types.Entity, params map[string]string) types.DataNode
- func (provider *RestconfServiceProvider) GetPrivate() interface{}
- func (provider *RestconfServiceProvider) GetState() *errors.State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodecServiceProvider ¶
type CodecServiceProvider struct { Repo types.Repository Encoding encoding.EncodingFormat RootSchemaTable map[string]types.RootSchemaNode State errors.State }
CodecServiceProvider Encode and decode to XML/JSON format
func (*CodecServiceProvider) GetEncoding ¶
func (provider *CodecServiceProvider) GetEncoding() encoding.EncodingFormat
GetEncoding returns encoding format for CodecServiceProvider
func (*CodecServiceProvider) GetRootSchemaNode ¶
func (provider *CodecServiceProvider) GetRootSchemaNode(entity types.Entity) types.RootSchemaNode
GetRootSchemaNode returns root schema node for entity
func (*CodecServiceProvider) GetState ¶
func (provider *CodecServiceProvider) GetState() *errors.State
GetState returns error state from CodecServiceProvider
func (*CodecServiceProvider) Initialize ¶
func (provider *CodecServiceProvider) Initialize(entity types.Entity)
Initialize CodecServiceProvider
type NetconfServiceProvider ¶
type NetconfServiceProvider struct { Repo types.Repository Address string Username string Password string Port int Protocol string OnDemand bool CommonCache bool Private types.CServiceProvider State errors.State }
NetconfServiceProvider Implementation of ServiceProvider for the NETCONF protocol: https://tools.ietf.org/html/rfc6241
func (*NetconfServiceProvider) Connect ¶
func (provider *NetconfServiceProvider) Connect()
Connect to NetconfServiceProvider using Repo/Address/Username/Password/Port
func (*NetconfServiceProvider) Disconnect ¶
func (provider *NetconfServiceProvider) Disconnect()
Disconnect from NetconfServiceProvider
func (*NetconfServiceProvider) ExecuteRpc ¶
func (*NetconfServiceProvider) GetCapabilities ¶
func (provider *NetconfServiceProvider) GetCapabilities() []string
GetCapabilities returns the capabilities supported by NetconfServiceProvider
func (*NetconfServiceProvider) GetPrivate ¶
func (provider *NetconfServiceProvider) GetPrivate() interface{}
GetPrivate returns private pointer for NetconfServiceProvider
func (*NetconfServiceProvider) GetState ¶
func (provider *NetconfServiceProvider) GetState() *errors.State
GetState returns error state from NetconfServiceProvider
type OpenDaylightServiceProvider ¶
type OpenDaylightServiceProvider struct { Path string Address string Username string Password string Port int EncodingFormat encoding.EncodingFormat Protocol protocol.Protocol Private types.COpenDaylightServiceProvider // keep alive ProvidersHolder []types.ServiceProvider State errors.State }
OpenDaylightServiceProvider A service provider to be used to communicate with an OpenDaylight instance: https://www.opendaylight.org
func (*OpenDaylightServiceProvider) Connect ¶
func (provider *OpenDaylightServiceProvider) Connect()
Connect to OpenDaylightServiceProvider using Path/Address/Username/Password/Port
func (*OpenDaylightServiceProvider) Disconnect ¶
func (provider *OpenDaylightServiceProvider) Disconnect()
Disconnect from OpenDaylightServiceProvider
func (*OpenDaylightServiceProvider) GetNodeIDs ¶
func (provider *OpenDaylightServiceProvider) GetNodeIDs() []string
GetNodeIDs returns OpenDaylightServiceProvider Node IDs
func (*OpenDaylightServiceProvider) GetNodeProvider ¶
func (provider *OpenDaylightServiceProvider) GetNodeProvider(nodeID string) types.ServiceProvider
GetNodeProvider returns Node provider by ID
func (*OpenDaylightServiceProvider) GetPrivate ¶
func (provider *OpenDaylightServiceProvider) GetPrivate() interface{}
GetPrivate returns private pointer for OpenDaylightServiceProvider
func (*OpenDaylightServiceProvider) GetState ¶
func (provider *OpenDaylightServiceProvider) GetState() *errors.State
GetState returns error state from OpenDaylightServiceProvider
type RestconfServiceProvider ¶
type RestconfServiceProvider struct { Path string Address string Username string Password string Port int Encoding encoding.EncodingFormat StateURLRoot string ConfigURLRoot string Private types.CServiceProvider State errors.State }
RestconfServiceProvider Implementation of ServiceProvider for the RESTCONF protocol: https://tools.ietf.org/html/draft-ietf-netconf-restconf-18
func (*RestconfServiceProvider) Connect ¶
func (provider *RestconfServiceProvider) Connect()
Connect to RestconfServiceProvider using Path/Address/Username/Password/Port
func (*RestconfServiceProvider) Disconnect ¶
func (provider *RestconfServiceProvider) Disconnect()
Disconnect from RestconfServiceProvider
func (*RestconfServiceProvider) ExecuteRpc ¶
func (*RestconfServiceProvider) GetPrivate ¶
func (provider *RestconfServiceProvider) GetPrivate() interface{}
GetPrivate returns private pointer for RestconfServiceProvider
func (*RestconfServiceProvider) GetState ¶
func (provider *RestconfServiceProvider) GetState() *errors.State
GetState returns error state from RestconfServiceProvider