wnc

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 10 Imported by: 1

README

cisco-ios-xe-wireless-go

GitHub Tag Go Reference Go Report Card

A Go library for interacting with Cisco Catalyst 9800 Wireless Network Controller.

  • 🔧 Developer Friendly: Transparent YANG model handling with all responses in JSON format
  • 📊 Comprehensive Coverage: Access most status information and metrics available from the WNC
  • 🚀 Quick Integration: Get started in minutes with simple configuration and clear examples
  • 🎯 Type-Safe Operations: Strongly-typed Go structs for all API interactions and responses
  • 📖 Comprehensive Documentation: Detailed API reference, testing guides, and best practices

📡 Supported Environment

Cisco Catalyst 9800 Wireless Network Controller running Cisco IOS-XE 17.12.x.

📦 Installation

go get github.com/umatare5/cisco-ios-xe-wireless-go

🚀 Quick Start

🔑 Creating Basic Auth Token

You must create a Basic Auth token using your Cisco WNC credentials before using the client.

# Create token for username:password
echo -n "admin:your-password" | base64
# Output: YWRtaW46eW91ci1wYXNzd29yZA==
🔧 Basic Usage

Start with this simple example to verify your WNC connection and credentials.

package main

import (
    "context"
    "fmt"
    "time"

    wnc "github.com/umatare5/cisco-ios-xe-wireless-go"
)

func main() {
    // Create configuration
    config := wnc.Config{
        Controller:  "192.168.1.100",
        AccessToken: "YWRtaW46eW91ci1wYXNzd29yZA==",
        Timeout:     30 * time.Second,
    }

    // Create client with configuration
    client, err := wnc.NewClient(config)
    if err != nil {
        fmt.Printf("Failed to create client: %v\n", err)
        return
    }

    // Get AP operational data with context timeout
    ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
    defer cancel()

    apData, err := client.GetApOper(ctx)
    if err != nil {
        fmt.Printf("Failed to get AP data: %v\n", err)
        return
    }

    fmt.Printf("Successfully connected! Found %d APs\n", len(apData.CiscoIOSXEWirelessAccessPointOperAccessPointOperData.OperData))
}
⚙️ Advanced Configuration

Customize client behavior using configuration options to optimize for your specific environment and requirements.

import (
    "log/slog"
    "time"

    wnc "github.com/umatare5/cisco-ios-xe-wireless-go"
)

// Create client with custom configuration
config := wnc.Config{
    Controller:         "192.168.1.100",
    AccessToken:        "YWRtaW46eW91ci1wYXNzd29yZA==",
    Timeout:            30 * time.Second,
    InsecureSkipVerify: true, // Only for development
}

client, err := wnc.NewClient(config)
if err != nil {
    fmt.Printf("Failed to create client: %v\n", err)
    return
}

[!CAUTION] The WithInsecureSkipVerify(true) option disables TLS certificate verification. This should only be used in development environments or when connecting to controllers with self-signed certificates. Never use this option in production environments as it compromises security.

📊 Custom Logging

The library supports structured logging using Go's standard slog package.

import (
    "log/slog"
    "os"

    wnc "github.com/umatare5/cisco-ios-xe-wireless-go"
)

logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
    Level: slog.LevelDebug,
}))

config := wnc.Config{
    Controller:  "192.168.1.100",
    AccessToken: "YWRtaW46eW91ci1wYXNzd29yZA==",
    Logger:      logger,
}

client, err := wnc.NewClient(config)

⚙️ Configuration Options

All configuration options are set in the Config struct during client creation.

Field Type Description
Controller string Hostname or IP address of the WNC (required)
AccessToken string Authentication token for API access (required)
Timeout time.Duration HTTP request timeout (default: 15s)
InsecureSkipVerify bool Skips TLS certificate verification (dev only)
Logger *slog.Logger Custom structured logger instance

🌐 API Reference

The library provides a set of functions for interacting with all major Cisco Catalyst 9800 WNC subsystems. For detailed API documentation, please see API_REFERENCE.md.

🧪 Testing

This library includes comprehensive unit and integration tests to ensure reliability and compatibility with Cisco Catalyst 9800 controllers. For detailed testing information, please see TESTING.md.

🛠️ Debugging

This library includes the scripts that are useful for debugging and development. These scripts use curl to access WNC, so they don't depend on Go. For detailed scripts documentation, please refer to SCRIPT_REFERENCE.md.

🤝 Contributing

I welcome contributions to improve this library. Please follow these guidelines to ensure smooth collaboration.

  1. Fork the repository and create a feature branch from main
  2. Make your changes following existing code style and conventions
  3. Add comprehensive tests for new functionality
  4. Update documentation including README.md and code comments
  5. Ensure all tests pass including unit and integration tests
  6. Submit a pull request with a clear description of changes

🙏 Acknowledgments

This code was developed with the assistance of GitHub Copilot Agent Mode, an advanced AI-powered development assistant that helped create reliable, well-structured code for Cisco Catalyst 9800 WNC RESTCONF interactions. I extend our heartfelt gratitude to the global developer community who have contributed their knowledge, code, and expertise to open source projects and public repositories.

📄 License

Please see the LICENSE file for details.

Documentation

Overview

Package wnc provides the components for interacting with the Cisco Wireless Network Controller API.

Index

Constants

View Source
const (
	// HTTPMethodGet defines the GET HTTP method
	HTTPMethodGet = http.MethodGet

	// HTTPMethodPost defines the POST HTTP method
	HTTPMethodPost = http.MethodPost

	// HTTPMethodPut defines the PUT HTTP method
	HTTPMethodPut = http.MethodPut

	// HTTPMethodDelete defines the DELETE HTTP method
	HTTPMethodDelete = http.MethodDelete
)

HTTP method constants

View Source
const (
	// NetworkTimeoutSeconds defines timeout in seconds for backward compatibility
	NetworkTimeoutSeconds = 60

	// HTTPSScheme defines the HTTPS URL scheme
	HTTPSScheme = "https"

	// HTTPScheme defines the HTTP URL scheme
	HTTPScheme = "http"

	// URLSchemeSeparator defines the scheme separator in URLs
	URLSchemeSeparator = "://"
)

Network and protocol constants

View Source
const (
	// QuickTimeoutSeconds for fast operations
	QuickTimeoutSeconds = 5

	// StandardTimeoutSeconds for normal operations
	StandardTimeoutSeconds = NetworkTimeoutSeconds

	// ExtendedTimeoutSeconds for longer operations
	ExtendedTimeoutSeconds = 90

	// ComprehensiveTimeoutSeconds for test suites
	ComprehensiveTimeoutSeconds = 150

	// MicroTimeoutMicroseconds for immediate cancellation tests
	MicroTimeoutMicroseconds = 1
)

Timeout duration constants in seconds for readability

View Source
const (
	// QuickTimeout for fast operations
	QuickTimeout = QuickTimeoutSeconds * time.Second

	// StandardTimeout for normal operations (same as DefaultTimeout for compatibility)
	StandardTimeout = DefaultTimeout

	// ExtendedTimeout for longer operations
	ExtendedTimeout = ExtendedTimeoutSeconds * time.Second

	// ComprehensiveTimeout for test suites
	ComprehensiveTimeout = ComprehensiveTimeoutSeconds * time.Second

	// MicroTimeout for immediate cancellation tests
	MicroTimeout = MicroTimeoutMicroseconds * time.Microsecond
)

Timeout variation constants

View Source
const (
	// EnvVarController is the environment variable name for controller address
	EnvVarController = "WNC_CONTROLLER"

	// EnvVarAccessToken is the environment variable name for access token
	EnvVarAccessToken = "WNC_ACCESS_TOKEN"
)

Environment variable names

View Source
const (
	// ExampleControllerIPAddress is used in documentation examples
	ExampleControllerIPAddress = "192.168.1.100"

	// ExampleControllerHostname is used in documentation examples
	ExampleControllerHostname = "wnc.example.local"

	// ExampleAccessToken is used in documentation examples
	ExampleAccessToken = "your-token"

	// ExampleTimeoutSeconds is used in documentation examples
	ExampleTimeoutSeconds = 20

	// ExampleTestHostname is used in test examples
	ExampleTestHostname = "test.local"
)

Documentation and example constants

View Source
const (
	// TestAccessTokenValue is a base64 encoded test token for "test:test"
	TestAccessTokenValue = "dGVzdDp0ZXN0"

	// TestTimestamp defines a standard test timestamp
	TestTimestamp = "2024-01-01T00:00:00.000Z"

	// TestAPName defines a standard test access point name
	TestAPName = "test-ap-01"
)

Test constants

View Source
const (
	// Success status codes
	StatusOK = http.StatusOK

	// Client error status codes
	StatusBadRequest          = http.StatusBadRequest
	StatusUnauthorized        = http.StatusUnauthorized
	StatusForbidden           = http.StatusForbidden
	StatusNotFound            = http.StatusNotFound
	StatusMethodNotAllowed    = http.StatusMethodNotAllowed
	StatusConflict            = http.StatusConflict
	StatusUnprocessableEntity = http.StatusUnprocessableEntity

	// Server error status codes
	StatusInternalServerError = http.StatusInternalServerError
	StatusBadGateway          = http.StatusBadGateway
	StatusServiceUnavailable  = http.StatusServiceUnavailable
	StatusGatewayTimeout      = http.StatusGatewayTimeout
)

HTTP status code constants

View Source
const (
	// DefaultTLSHandshakeTimeout is the default timeout for TLS handshake
	DefaultTLSHandshakeTimeout = 10 * time.Second

	// DefaultResponseHeaderTimeout is the default timeout for response headers
	DefaultResponseHeaderTimeout = 10 * time.Second

	// DefaultIdleConnTimeout is the default timeout for idle connections
	DefaultIdleConnTimeout = 90 * time.Second
)

HTTP timeout constants

View Source
const (
	// HTTPHeaderKeyAuthorization defines the Authorization header key
	HTTPHeaderKeyAuthorization = "Authorization"

	// HTTPHeaderKeyAccept defines the Accept header key
	HTTPHeaderKeyAccept = "Accept"

	// HTTPHeaderKeyUserAgent defines the User-Agent header key
	HTTPHeaderKeyUserAgent = "User-Agent"

	// HTTPHeaderKeyContentType defines the Content-Type header key
	HTTPHeaderKeyContentType = "Content-Type"
)

HTTP header key constants

View Source
const (
	// HTTPHeaderValueBasicPrefix defines the Basic authentication prefix
	HTTPHeaderValueBasicPrefix = "Basic "

	// HTTPHeaderValueYANGData defines the YANG data content type
	HTTPHeaderValueYANGData = "application/yang-data+json"

	// HTTPHeaderUserAgent defines the User-Agent string
	HTTPHeaderUserAgent = "wnc-go-client/1.0"

	// HTTPHeaderAccept defines the default Accept header value
	HTTPHeaderAccept = HTTPHeaderValueYANGData

	// HTTPHeaderContentType defines the default Content-Type header value
	HTTPHeaderContentType = HTTPHeaderValueYANGData
)

HTTP header value constants

View Source
const (
	// RESTCONFPathPrefix is the base path for all RESTCONF API endpoints
	RESTCONFPathPrefix = "/restconf/data"

	// RESTCONFModulesPathPrefix is the base path for YANG module queries
	RESTCONFModulesPathPrefix = "/restconf/tailf/modules"

	// RESTCONFLibraryQuery is the query string for YANG library modules
	RESTCONFLibraryQuery = "?fields=ietf-yang-library:modules-state/module"
)

RESTCONF and API path constants

View Source
const (
	// ProtocolHTTP represents HTTP protocol
	ProtocolHTTP = "http"

	// ProtocolHTTPS represents HTTPS protocol
	ProtocolHTTPS = "https"

	// DefaultProtocol is the default protocol for connections
	DefaultProtocol = ProtocolHTTPS
)

Protocol constants

View Source
const (
	// YANGModelPrefix is the expected prefix for Cisco wireless YANG models
	YANGModelPrefix = "Cisco-IOS-XE-wireless-"

	// YANGModelOperSuffix is the suffix for operational YANG models
	YANGModelOperSuffix = "-oper"

	// YANGModelCfgSuffix is the suffix for configuration YANG models
	YANGModelCfgSuffix = "-cfg"
)

YANG model validation constants

View Source
const (
	// CiscoIOSXEWirelessPrefix is the common prefix for all wireless YANG models
	CiscoIOSXEWirelessPrefix = YANGModelPrefix

	// OperDataSuffix is the common suffix for operational data endpoints
	OperDataSuffix = YANGModelOperSuffix + "-data"

	// CfgDataSuffix is the common suffix for configuration data endpoints
	CfgDataSuffix = YANGModelCfgSuffix + "-data"
)

Common YANG model patterns

View Source
const (
	// MinEndpointLengthChars is the minimum character length for API endpoints
	MinEndpointLengthChars = 10

	// MinTokenLengthChars is the minimum character length for authentication tokens
	MinTokenLengthChars = 8

	// MinEndpointLength is the minimum length for API endpoints
	MinEndpointLength = MinEndpointLengthChars

	// MinTokenLength is the minimum length for authentication tokens
	MinTokenLength = MinTokenLengthChars

	// ZeroTimeoutSeconds represents zero timeout for validation tests
	ZeroTimeoutSeconds = 0

	// ValidationTimeoutThreshold is the minimum timeout for validation
	ValidationTimeoutThreshold = 1
)

Validation constants

View Source
const (
	// EndpointMismatchErrorTemplate is used for endpoint validation errors
	EndpointMismatchErrorTemplate = "Expected %s = %s, got %s"

	// EmptyEndpointErrorTemplate is used when an endpoint is empty
	EmptyEndpointErrorTemplate = "%s endpoint is empty"

	// ShortEndpointErrorTemplate is used when an endpoint is too short
	ShortEndpointErrorTemplate = "%s endpoint is too short: %s"

	// InvalidEndpointErrorTemplate is used for invalid endpoint formats
	InvalidEndpointErrorTemplate = "%s endpoint has invalid format: %s"
)

Error message templates for validation errors

View Source
const (
	// DefaultController is the default controller hostname
	DefaultController = "wnc1.example.internal"
)

Default values

View Source
const (
	// DefaultTimeout is the default timeout for API requests
	DefaultTimeout = NetworkTimeoutSeconds * time.Second
)

HTTP and API related constants

View Source
const (
	// URLPathSeparator defines the path separator in URLs
	URLPathSeparator = "/"
)

URL construction constants

Variables

View Source
var (
	// ErrAuthenticationFailed indicates that authentication with the WNC failed due to invalid credentials
	ErrAuthenticationFailed = errors.New("authentication failed: invalid credentials")
	// ErrAccessForbidden indicates that the client lacks sufficient permissions for the requested operation
	ErrAccessForbidden = errors.New("access forbidden: insufficient permissions")
	// ErrResourceNotFound indicates that the requested resource or endpoint was not found
	ErrResourceNotFound = errors.New("resource not found")
	// ErrInvalidConfiguration indicates that the client configuration is invalid or incomplete
	ErrInvalidConfiguration = errors.New("invalid client configuration")
	// ErrRequestTimeout indicates that the request exceeded the configured timeout period
	ErrRequestTimeout = errors.New("request timeout")
)

Custom error types for better error handling and debugging

Functions

func IsValidProtocol

func IsValidProtocol(protocol string) bool

IsValidProtocol checks if the protocol is supported

func IsValidRevision

func IsValidRevision(revisionString string) bool

IsValidRevision checks if the revision follows YYYY-MM-DD format

func IsValidYANGModel

func IsValidYANGModel(yangModelName string) bool

IsValidYANGModel checks if the YANG model name follows Cisco wireless conventions

Types

type AFCApi

type AFCApi interface {
	GetAfcOper(ctx context.Context) (any, error)
	GetAfcEwlcAfcApResp(ctx context.Context) (any, error)
}

AFCApi defines the interface for AFC operations.

type APIError

type APIError struct {
	StatusCode int    `json:"status_code"`
	Message    string `json:"message"`
	Body       []byte `json:"-"`
}

APIError represents an API-specific error with HTTP status code and message

func (*APIError) Error

func (e *APIError) Error() string

type AWIPSApi

type AWIPSApi interface {
	GetAwipsOper(ctx context.Context) (any, error)
	GetAwipsPerApInfo(ctx context.Context) (any, error)
	GetAwipsDwldStatus(ctx context.Context) (any, error)
	GetAwipsApDwldStatus(ctx context.Context) (any, error)
}

AWIPSApi defines the interface for AWIPS operations.

type AccessPointAPI

type AccessPointAPI interface {
	// Access Point Operational Data
	GetApOper(ctx context.Context) (any, error)
	GetApRadioNeighbor(ctx context.Context) (any, error)
	GetApRadioOperData(ctx context.Context) (any, error)
	GetApRadioResetStats(ctx context.Context) (any, error)
	GetApQosClientData(ctx context.Context) (any, error)
	GetApCapwapData(ctx context.Context) (any, error)
	GetApNameMacMap(ctx context.Context) (any, error)
	GetApWtpSlotWlanStats(ctx context.Context) (any, error)
	GetApEthernetMacWtpMacMap(ctx context.Context) (any, error)
	GetApRadioOperStats(ctx context.Context) (any, error)
	GetApEthernetIfStats(ctx context.Context) (any, error)
	GetApEwlcWncdStats(ctx context.Context) (any, error)
	GetApIoxOperData(ctx context.Context) (any, error)
	GetApQosGlobalStats(ctx context.Context) (any, error)
	GetApOperData(ctx context.Context) (any, error)
	GetApRlanOper(ctx context.Context) (any, error)
	GetApEwlcMewlcPredownloadRec(ctx context.Context) (any, error)
	GetApCdpCacheData(ctx context.Context) (any, error)
	GetApLldpNeigh(ctx context.Context) (any, error)
	GetApTpCertInfo(ctx context.Context) (any, error)
	GetApDiscData(ctx context.Context) (any, error)
	GetApCapwapPkts(ctx context.Context) (any, error)
	GetApCountryOper(ctx context.Context) (any, error)
	GetApSuppCountryOper(ctx context.Context) (any, error)
	GetApNhGlobalData(ctx context.Context) (any, error)
	GetApImagePrepareLocation(ctx context.Context) (any, error)
	GetApImageActiveLocation(ctx context.Context) (any, error)

	// Access Point Configuration
	GetApCfg(ctx context.Context) (any, error)
	GetTagSourcePriorityConfigs(ctx context.Context) (any, error)
	GetApTagSourcePriorityConfigs(ctx context.Context) (any, error)
	GetApApTags(ctx context.Context) (any, error)
}

AccessPointAPI defines the interface for Access Point operations.

type ApfAPI

type ApfAPI interface {
	GetApfCfg(ctx context.Context) (any, error)
	GetApf(ctx context.Context) (any, error)
}

ApfAPI defines the interface for APF configuration operations.

type BluetoothAPI

type BluetoothAPI interface {
	GetBleLtxOper(ctx context.Context) (any, error)
	GetBleLtxApAntenna(ctx context.Context) (any, error)
	GetBleLtxAp(ctx context.Context) (any, error)
}

BluetoothAPI defines the interface for Bluetooth Low Energy operations.

type CTSAPI

type CTSAPI interface {
	GetCtsSxpCfg(ctx context.Context) (any, error)
	GetCtsSxpConfiguration(ctx context.Context) (any, error)
}

CTSAPI defines the interface for CTS configuration operations.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a WNC API client with configuration and logging capabilities. This is the main client structure used to interact with the Cisco Wireless Network Controller. It implements the comprehensive WirelessControllerAPI interface providing unified access to all features.

func NewClient

func NewClient(config Config) (*Client, error)

NewClient creates a new WNC client using a configuration struct. This is the primary constructor that follows the architectural guidelines.

Example usage:

config := wnc.Config{
	Controller:         "controller.example.com",
	AccessToken:        "your-access-token",
	Timeout:            15 * time.Second,
	InsecureSkipVerify: true,
	Logger:             customLogger,
}
client, err := wnc.NewClient(config)

func NewClientWithConfig

func NewClientWithConfig(config Config, options ...ClientOption) (*Client, error)

NewClientWithConfig creates a new WNC client using a configuration struct. This is the preferred method for creating clients as it follows the architectural guidelines. Additional configuration can still be provided through options for flexibility.

Example usage:

config := wnc.Config{
	Controller:         "controller.example.com",
	AccessToken:        "your-access-token",
	Timeout:            15 * time.Second,
	InsecureSkipVerify: true,
	Logger:             customLogger,
}
client, err := wnc.NewClientWithConfig(config)

func (*Client) SendAPIRequest

func (c *Client) SendAPIRequest(ctx context.Context, endpoint string, result any) error

SendAPIRequest sends an API request to the specified endpoint and unmarshals the response into the result. This is the core method used by all feature-specific methods in the individual packages.

Parameters:

  • ctx: Context for request cancellation and timeouts
  • endpoint: The API endpoint URL to call
  • result: Pointer to a struct where the response should be unmarshaled

Returns an error if the request fails or if the response cannot be unmarshaled.

type ClientAPI

type ClientAPI interface {
	GetClientOper(ctx context.Context) (any, error)
	GetClientOperCommonOperData(ctx context.Context) (any, error)
	GetClientOperDot11OperData(ctx context.Context) (any, error)
	GetClientOperMobilityOperData(ctx context.Context) (any, error)
	GetClientOperMmIfClientStats(ctx context.Context) (any, error)
	GetClientOperMmIfClientHistory(ctx context.Context) (any, error)
	GetClientOperTrafficStats(ctx context.Context) (any, error)
	GetClientOperPolicyData(ctx context.Context) (any, error)
	GetClientOperSisfDbMac(ctx context.Context) (any, error)
	GetClientOperDcInfo(ctx context.Context) (any, error)
}

ClientAPI defines the interface for client operations.

type ClientOption

type ClientOption func(*Client)

ClientOption represents an option for configuring the WNC client. This provides a functional options pattern for backwards compatibility.

func WithInsecureSkipVerify

func WithInsecureSkipVerify(skip bool) ClientOption

WithInsecureSkipVerify skips TLS certificate verification. This should only be used for testing or when connecting to controllers with self-signed certificates.

func WithLogger

func WithLogger(logger *slog.Logger) ClientOption

WithLogger sets a custom logger for the client.

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

WithTimeout sets the timeout duration for API requests.

type Config

type Config struct {
	// Controller is the hostname or IP address of the WNC
	Controller string
	// AccessToken is the authentication token for API access
	AccessToken string
	// Timeout is the duration for API request timeouts (default: 15 seconds)
	Timeout time.Duration
	// InsecureSkipVerify skips TLS certificate verification when true
	// This should only be used for testing or with self-signed certificates
	InsecureSkipVerify bool
	// Logger is a custom logger instance (default: slog.Default())
	Logger *slog.Logger
}

Config represents the configuration for the WNC client. This struct contains all necessary settings for connecting to and interacting with the Cisco Wireless Network Controller API.

type CoreAPI

type CoreAPI interface {
	SendAPIRequest(ctx context.Context, endpoint string, result any) error
}

CoreAPI defines the core interface for basic API operations.

type Dot11API

type Dot11API interface {
	GetDot11Cfg(ctx context.Context) (any, error)
	GetDot11ConfiguredCountries(ctx context.Context) (any, error)
	GetDot11acMcsEntries(ctx context.Context) (any, error)
	GetDot11Entries(ctx context.Context) (any, error)
}

Dot11API defines the interface for 802.11 configuration operations.

type Dot15API

type Dot15API interface {
	GetDot15Cfg(ctx context.Context) (any, error)
	GetDot15GlobalConfig(ctx context.Context) (any, error)
}

Dot15API defines the interface for 802.15 configuration operations.

type FabricAPI

type FabricAPI interface {
	GetFabricCfg(ctx context.Context) (any, error)
	GetFabricControlplaneNames(ctx context.Context) (any, error)
	GetFabric(ctx context.Context) (any, error)
}

FabricAPI defines the interface for Fabric configuration operations.

type FlexAPI

type FlexAPI interface {
	GetFlexCfg(ctx context.Context) (any, error)
	GetFlexCfgData(ctx context.Context) (any, error)
}

FlexAPI defines the interface for Flex configuration operations.

type GeneralAPI

type GeneralAPI interface {
	// General Operational Data
	GetGeneralOper(ctx context.Context) (any, error)
	GetGeneralOperMgmtIntfData(ctx context.Context) (any, error)

	// General Configuration
	GetGeneralCfg(ctx context.Context) (any, error)
	GetGeneralMewlcConfig(ctx context.Context) (any, error)
	GetGeneralCacConfig(ctx context.Context) (any, error)
	GetGeneralMfp(ctx context.Context) (any, error)
	GetGeneralFipsCfg(ctx context.Context) (any, error)
	GetGeneralWsaApClientEvent(ctx context.Context) (any, error)
	GetGeneralSimL3InterfaceCacheData(ctx context.Context) (any, error)
	GetGeneralWlcManagementData(ctx context.Context) (any, error)
	GetGeneralLaginfo(ctx context.Context) (any, error)
	GetGeneralMulticastConfig(ctx context.Context) (any, error)
	GetGeneralFeatureUsageCfg(ctx context.Context) (any, error)
	GetGeneralThresholdWarnCfg(ctx context.Context) (any, error)
	GetGeneralApLocRangingCfg(ctx context.Context) (any, error)
	GetGeneralGeolocationCfg(ctx context.Context) (any, error)
}

GeneralAPI defines the interface for general controller operations.

type GeolocationAPI

type GeolocationAPI interface {
	GetGeolocationOper(ctx context.Context) (any, error)
	GetGeolocationOperApGeoLocStats(ctx context.Context) (any, error)
}

GeolocationAPI defines the interface for geolocation operations.

type HyperlocationAPI

type HyperlocationAPI interface {
	GetHyperlocationOper(ctx context.Context) (any, error)
	GetHyperlocationProfiles(ctx context.Context) (any, error)
}

HyperlocationAPI defines the interface for hyperlocation operations.

type LISPApi

type LISPApi interface {
	GetLispAgentOper(ctx context.Context) (any, error)
	GetLispAgentMemoryStats(ctx context.Context) (any, error)
	GetLispWlcCapabilities(ctx context.Context) (any, error)
	GetLispApCapabilities(ctx context.Context) (any, error)
}

LISPApi defines the interface for LISP operations.

type LocationAPI

type LocationAPI interface {
	GetLocationCfg(ctx context.Context) (any, error)
	GetLocationNmspConfig(ctx context.Context) (any, error)
}

LocationAPI defines the interface for location configuration operations.

type MeshAPI

type MeshAPI interface {
	GetMeshCfg(ctx context.Context) (any, error)
	GetMesh(ctx context.Context) (any, error)
	GetMeshProfiles(ctx context.Context) (any, error)
}

MeshAPI defines the interface for mesh configuration operations.

type MobilityAPI

type MobilityAPI interface {
	GetMobilityOper(ctx context.Context) (any, error)
	GetMobilityMmIfGlobalStats(ctx context.Context) (any, error)
	GetMobilityMmIfGlobalMsgStats(ctx context.Context) (any, error)
	GetMobilityGlobalStats(ctx context.Context) (any, error)
	GetMobilityMmGlobalData(ctx context.Context) (any, error)
	GetMobilityGlobalMsgStats(ctx context.Context) (any, error)
	GetMobilityClientData(ctx context.Context) (any, error)
	GetMobilityApCache(ctx context.Context) (any, error)
	GetMobilityApPeerList(ctx context.Context) (any, error)
	GetMobilityClientStats(ctx context.Context) (any, error)
	GetMobilityWlanClientLimit(ctx context.Context) (any, error)
	GetMobilityGlobalDTLSStats(ctx context.Context) (any, error)
}

MobilityAPI defines the interface for mobility management operations.

type MultcastAPI

type MultcastAPI interface {
	GetMcastOper(ctx context.Context) (any, error)
	GetMcastFlexMediastreamClientSummary(ctx context.Context) (any, error)
	GetMcastVlanL2MgidOp(ctx context.Context) (any, error)
}

MultcastAPI defines the interface for multicast operations.

type NetworkManagementAPI

type NetworkManagementAPI interface {
	GetNmspOper(ctx context.Context) (any, error)
	GetNmspClientRegistration(ctx context.Context) (any, error)
	GetNmspCmxConnection(ctx context.Context) (any, error)
	GetNmspCmxCloudInfo(ctx context.Context) (any, error)
}

NetworkManagementAPI defines the interface for network management operations.

type RESTCONFURLBuilder

type RESTCONFURLBuilder struct {
	// contains filtered or unexported fields
}

RESTCONFURLBuilder provides utility functions for building WNC RESTCONF API URLs

func NewRESTCONFURLBuilder

func NewRESTCONFURLBuilder(protocol, controller string) *RESTCONFURLBuilder

NewRESTCONFURLBuilder creates a new RESTCONF URL builder for the specified controller

func (*RESTCONFURLBuilder) BuildBaseURL

func (u *RESTCONFURLBuilder) BuildBaseURL() string

BuildBaseURL constructs the base URL for the controller

func (*RESTCONFURLBuilder) BuildEndpointURL

func (u *RESTCONFURLBuilder) BuildEndpointURL(endpoint string) string

BuildEndpointURL is a convenience method that delegates to BuildRESTCONFURL

func (*RESTCONFURLBuilder) BuildRESTCONFURL

func (u *RESTCONFURLBuilder) BuildRESTCONFURL(endpointPath string) string

BuildRESTCONFURL constructs a RESTCONF data URL for the given endpoint path

func (*RESTCONFURLBuilder) BuildYANGLibraryURL

func (u *RESTCONFURLBuilder) BuildYANGLibraryURL() string

BuildYANGLibraryURL constructs the URL for querying YANG library modules

func (*RESTCONFURLBuilder) BuildYANGModuleURL

func (u *RESTCONFURLBuilder) BuildYANGModuleURL(yangModel, revision string) string

BuildYANGModuleURL constructs the URL for getting details of a specific YANG module

type RFIDAPI

type RFIDAPI interface {
	GetRfidCfg(ctx context.Context) (any, error)
}

RFIDAPI defines the interface for RFID configuration operations.

type RadioAPI

type RadioAPI interface {
	GetRadioCfg(ctx context.Context) (any, error)
	GetRadioProfiles(ctx context.Context) (any, error)
}

RadioAPI defines the interface for radio configuration operations.

type RadioResourceManagementAPI

type RadioResourceManagementAPI interface {
	// RRM Operational Data
	GetRrmOper(ctx context.Context) (any, error)
	GetApAutoRfDot11Data(ctx context.Context) (any, error)
	GetApDot11RadarData(ctx context.Context) (any, error)
	GetApDot11SpectrumData(ctx context.Context) (any, error)
	GetRrmMeasurement(ctx context.Context) (any, error)
	GetRadioSlot(ctx context.Context) (any, error)
	GetMainData(ctx context.Context) (any, error)
	GetSpectrumDeviceTable(ctx context.Context) (any, error)
	GetSpectrumAqTable(ctx context.Context) (any, error)
	GetRegDomainOper(ctx context.Context) (any, error)

	// RRM Configuration
	GetRrmCfg(ctx context.Context) (any, error)
	GetRrmRrms(ctx context.Context) (any, error)
	GetRrmMgrCfgEntries(ctx context.Context) (any, error)
}

RadioResourceManagementAPI defines the interface for RRM operations.

type RfAPI

type RfAPI interface {
	GetRfCfg(ctx context.Context) (any, error)
	GetRfMultiBssidProfiles(ctx context.Context) (any, error)
	GetRfAtfPolicies(ctx context.Context) (any, error)
	GetRfTags(ctx context.Context) (any, error)
	GetRfProfiles(ctx context.Context) (any, error)
	GetRfProfileDefaultEntries(ctx context.Context) (any, error)
}

RfAPI defines the interface for RF configuration operations.

type RogueAPI

type RogueAPI interface {
	GetRogueOper(ctx context.Context) (any, error)
	GetRogueStats(ctx context.Context) (any, error)
	GetRogueData(ctx context.Context) (any, error)
	GetRogueClientData(ctx context.Context) (any, error)
	GetRldpStats(ctx context.Context) (any, error)
}

RogueAPI defines the interface for rogue detection operations.

type SiteAPI

type SiteAPI interface {
	GetSiteCfg(ctx context.Context) (any, error)
	GetSiteApCfgProfiles(ctx context.Context) (any, error)
	GetSiteTagConfigs(ctx context.Context) (any, error)
}

SiteAPI defines the interface for site configuration operations.

type WNCClient

type WNCClient interface {
	CoreAPI
}

WNCClient defines the core interface for the Cisco Wireless Network Controller API client. Individual feature packages (ap, client, rrm, wlan, etc.) extend this client with specific functionality. This interface is kept for backward compatibility and basic operations.

type WirelessControllerAPI

WirelessControllerAPI defines the comprehensive interface for the Cisco Wireless Network Controller API client. It combines all feature-specific interfaces to provide a unified API for controller operations.

type WirelessLANAPI

type WirelessLANAPI interface {
	GetWlanCfg(ctx context.Context) (any, error)
	GetWlanCfgEntries(ctx context.Context) (any, error)
	GetWlanPolicies(ctx context.Context) (any, error)
	GetPolicyListEntries(ctx context.Context) (any, error)
	GetWirelessAaaPolicyConfigs(ctx context.Context) (any, error)
}

WirelessLANAPI defines the interface for WLAN configuration operations.

Directories

Path Synopsis
Package afc provides Automated Frequency Coordination cloud operational data functionality for the Cisco Wireless Network Controller API.
Package afc provides Automated Frequency Coordination cloud operational data functionality for the Cisco Wireless Network Controller API.
Package ap provides access point configuration management functionality for the Cisco Wireless Network Controller API.
Package ap provides access point configuration management functionality for the Cisco Wireless Network Controller API.
Package apf provides Access Point Filter configuration functionality for the Cisco Wireless Network Controller API.
Package apf provides Access Point Filter configuration functionality for the Cisco Wireless Network Controller API.
Package awips provides AWIPS (Advanced Weather Interactive Processing System) operational data functionality for the Cisco Wireless Network Controller API.
Package awips provides AWIPS (Advanced Weather Interactive Processing System) operational data functionality for the Cisco Wireless Network Controller API.
Package ble provides Bluetooth Low Energy operational data functionality for the Cisco Wireless Network Controller API.
Package ble provides Bluetooth Low Energy operational data functionality for the Cisco Wireless Network Controller API.
Package client provides client global operational data functionality for the Cisco Wireless Network Controller API.
Package client provides client global operational data functionality for the Cisco Wireless Network Controller API.
Package cts provides Cisco TrustSec configuration functionality for the Cisco Wireless Network Controller API.
Package cts provides Cisco TrustSec configuration functionality for the Cisco Wireless Network Controller API.
Package dot11 provides 802.11 configuration functionality for the Cisco Wireless Network Controller API.
Package dot11 provides 802.11 configuration functionality for the Cisco Wireless Network Controller API.
Package dot15 provides 802.15 configuration functionality for the Cisco Wireless Network Controller API.
Package dot15 provides 802.15 configuration functionality for the Cisco Wireless Network Controller API.
Package fabric provides SD-Access fabric configuration functionality for the Cisco Wireless Network Controller API.
Package fabric provides SD-Access fabric configuration functionality for the Cisco Wireless Network Controller API.
Package flex provides FlexConnect configuration functionality for the Cisco Wireless Network Controller API.
Package flex provides FlexConnect configuration functionality for the Cisco Wireless Network Controller API.
Package general provides general configuration functionality for the Cisco Wireless Network Controller API.
Package general provides general configuration functionality for the Cisco Wireless Network Controller API.
Package geolocation provides geolocation operational data functionality for the Cisco Wireless Network Controller API.
Package geolocation provides geolocation operational data functionality for the Cisco Wireless Network Controller API.
Package hyperlocation provides hyperlocation operational data functionality for the Cisco Wireless Network Controller API.
Package hyperlocation provides hyperlocation operational data functionality for the Cisco Wireless Network Controller API.
internal
testutil
Package testutil provides testing utilities and helper functions for the Cisco Wireless Network Controller API client.
Package testutil provides testing utilities and helper functions for the Cisco Wireless Network Controller API client.
Package lisp provides LISP (Locator/Identifier Separation Protocol) operational data functionality for the Cisco Wireless Network Controller API.
Package lisp provides LISP (Locator/Identifier Separation Protocol) operational data functionality for the Cisco Wireless Network Controller API.
Package location provides location configuration functionality for the Cisco Wireless Network Controller API.
Package location provides location configuration functionality for the Cisco Wireless Network Controller API.
Package mcast provides multicast operational data functionality for the Cisco Wireless Network Controller API.
Package mcast provides multicast operational data functionality for the Cisco Wireless Network Controller API.
Package mdns provides multicast DNS operational data functionality for the Cisco Wireless Network Controller API.
Package mdns provides multicast DNS operational data functionality for the Cisco Wireless Network Controller API.
Package mesh provides mesh networking configuration functionality for the Cisco Wireless Network Controller API.
Package mesh provides mesh networking configuration functionality for the Cisco Wireless Network Controller API.
Package mobility provides mobility operational data functionality for the Cisco Wireless Network Controller API.
Package mobility provides mobility operational data functionality for the Cisco Wireless Network Controller API.
Package nmsp provides Network Mobility Services Protocol operational data functionality for the Cisco Wireless Network Controller API.
Package nmsp provides Network Mobility Services Protocol operational data functionality for the Cisco Wireless Network Controller API.
Package radio provides radio configuration functionality for the Cisco Wireless Network Controller API.
Package radio provides radio configuration functionality for the Cisco Wireless Network Controller API.
Package rf provides RF (Radio Frequency) configuration functionality for the Cisco Wireless Network Controller API.
Package rf provides RF (Radio Frequency) configuration functionality for the Cisco Wireless Network Controller API.
Package rfid provides RFID configuration functionality for the Cisco Wireless Network Controller API.
Package rfid provides RFID configuration functionality for the Cisco Wireless Network Controller API.
Package rogue provides rogue access point detection operational data functionality for the Cisco Wireless Network Controller API.
Package rogue provides rogue access point detection operational data functionality for the Cisco Wireless Network Controller API.
Package rrm provides Radio Resource Management configuration functionality for the Cisco Wireless Network Controller API.
Package rrm provides Radio Resource Management configuration functionality for the Cisco Wireless Network Controller API.
Package site provides site configuration functionality for the Cisco Wireless Network Controller API.
Package site provides site configuration functionality for the Cisco Wireless Network Controller API.
Package wlan provides WLAN configuration functionality for the Cisco Wireless Network Controller API.
Package wlan provides WLAN configuration functionality for the Cisco Wireless Network Controller API.

Jump to

Keyboard shortcuts

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