providers

package
v0.0.0-...-fac1166 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

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

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 (provider *NetconfServiceProvider) ExecuteRpc(operation string, entity types.Entity, params map[string]string) types.DataNode

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 (provider *RestconfServiceProvider) ExecuteRpc(operation string, entity types.Entity, params map[string]string) types.DataNode

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL