Skip to content

A Go module that interfaces with the Northbound Interface (NBI) of Extreme Networks' network management suite Extreme Management Center (XMC; formerly known as NetSight).

License

Notifications You must be signed in to change notification settings

rbrt-weiler/go-module-xmcnbiclient

Repository files navigation

Go module xmcnbiclient

xmcnbiclient is a Go module that interfaces with the Northbound Interface (NBI) of Extreme Management Center (XMC; formerly known as NetSight), the network management solution from Extreme Networks. The module currently provides the following features:

  • Supports HTTP as well as HTTPS access to XMC.
  • Allows setting the TCP port used to connect to XMC to any valid value.
  • Authentication via HTTP Basic Auth or OAuth.
  • Automatic refresh of OAuth tokens during longer sessions.

While the module should be production ready, tests are pending. Use with caution until v1.0.0 has been reached.

How to use the module

go get gitlab.com/rbrt-weiler/go-module-xmcnbiclient (or update using the -u flag) the module and start coding. A minimal Go program that uses the module might look as follows.

package main

import (
    "fmt"
    "os"

    xmcnbiclient "gitlab.com/rbrt-weiler/go-module-xmcnbiclient"
)

func main() {
    client := xmcnbiclient.New("localhost")
    client.UseBasicAuth("root", "abc123")
    client.UseInsecureHTTPS()
    res, err := client.QueryAPI("query { network { devices { up ip sysName nickName } } }")
    if err != nil {
        fmt.Printf("Oops: %s", err)
        os.Exit(255)
    }
    fmt.Println(string(res))
    os.Exit(0)
}

API Documentation

The module is fully commented, so documentation is available on GoDoc.

Source

The original project is hosted at GitLab, with a copy over at GitHub for the folks over there.

About

A Go module that interfaces with the Northbound Interface (NBI) of Extreme Networks' network management suite Extreme Management Center (XMC; formerly known as NetSight).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages