nvosrestgo

package module
v0.0.0-...-f05ffc1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 9 Imported by: 0

README

NVOS-REST-go

A Golang RESTful API Library for working with the Keysight Network Visibility OS Line of Packet Brokers

This library is based on the python rest library.

Description

The intent of this file is to provide a Golang library that will facilitate simple access to Keysight Network Packet Broker (NPB) devices using the RESTful Web API interface.

Installation

Go install Golang from https://golang.org/doc/install

# Go Modules
require github.com/BrennenWright/NVOS-REST-go

Usage

Import this library

import nto "github.com/BrennenWright/NVOS-REST-go"

Initialize a broker connection

var IP = "10.10.10.10"
var username = "admin"
var password = "admin"
var port = "8000"

visionOneClient := nto.New(IP,username,password,port)

Connect and execute actions

visionOneClient.ExportConfig(....)

Examples

Several examples based on the origional python librarys examples can be found in the examples folder

These include:

TODO

  • NVOS API Authentication
  • Handle Token timeout
  • Update comments

Add Actions:

  • Export
  • Certificate Management
  • Change Filter Priority
  • Change QSFP Mode
  • Change speed configuration of a port
  • Clear configuration
  • Clear filters and ports
  • Clear system
  • Deploy netservice instance
  • Drain netservice instance
  • Enable FIPS Encryption
  • Export the offline license activation request file.
  • FIPS Server Encryption Status
  • Factory reset
  • Generate certificate signing request (CSR)
  • Get Available Filter Criteria
  • Get HA Config for CLI
  • Get Login Info
  • Get Memory Meters
  • Get Memory Meters Preview
  • Get Transceiver Info
  • Get a list of local ports valid for LFD
  • Get a list of peer ports valid for LFD
  • Get neighbors of a list of ports
  • Get object type
  • Get properties for a type
  • Get values for a property
  • Import
  • Install Mako OS software
  • Install license
  • Install netservice
  • Install software
  • MTU Query
  • Power down
  • Pull Config to HA Peer
  • Push Config to HA Peer
  • Read the publicly available information about the installed FNOOD license.
  • Remove license
  • Remove netservice
  • Remove plugin
  • Reset to factory defaults Visibility Application Module
  • Restart
  • Restore firewall
  • Revert software
  • Save logs
  • Set HA sync port
  • Set IP Config
  • Set Stack Mode
  • Swap Port Licenses
  • Update Single IP Address
  • Validate auth calls
  • resume_itr_traffic

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

type System struct {
	User     string `json:"username"`
	Password string `json:"password"`

	HTTPClient *http.Client `json:"-"`
	// contains filtered or unexported fields
}

System defines and tracks the system connection information

func New

func New(ip string, username string, password string, port int) *System

new initializes the system structure that is used to interact with this lib

it also attemps to connect and returns the system structure for client use

func (*System) ExportConfig

func (s *System) ExportConfig(description string, export_type string, file_name string) error

ExportConfig returns the settings file from an NTO system to a local file

func (*System) GetSystemProperty

func (s *System) GetSystemProperty(property string) (string, error)

GetSystemProperty requests the provided named property and returns the api response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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