Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OnmsServer

Represents a remote OpenNMS server.

Hierarchy

  • OnmsServer

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Construct a new OnmsServer object representing a remote server.

    example

    provide a pre-existing OnmsAuthConfig for auth

    const server = new OnmsServer('Test', 'https://myserver/opennms/', auth);
    
    example

    provide a username and password for auth

    const server = new OnmsServer('Test', 'https://myserver/opennms/', 'admin', 'admin');
    
    constructor

    Parameters

    • Optional name: string

      A name for the server suitable for display.

    • Optional url: string

      The URL to the server.

    • Optional auth: OnmsAuthConfig | string

      An OnmsAuthConfig, or the username to authorize as.

    • Optional password: string

      The password to authorize with if a username was supplied to the auth parameter.

    Returns OnmsServer

Properties

auth

The authorization configuration associated with the server.

id

id: string

A unique identifier for this server.

metadata

metadata: ServerMetadata

The capabilities of the server

Optional name

name: string

An optional name associated with this server.

url

url: string

The base URL to the server.

Accessors

host

  • get host(): any
  • Get the hostname portion of the URL associated with this server.

    Returns any

Methods

clone

resolveURL

  • resolveURL(forFragment?: string, withQuery?: any): any
  • Given a relative URL fragment, construct a URL for that fragment on the server.

    parm

    withQuery - Query parameters to be appended to the URL.

    Parameters

    • Optional forFragment: string

      The URL fragment to append to the server URL.

    • Optional withQuery: any

    Returns any

    A complete URL.

toString

  • toString(): string
  • A string representation of this server suitable for display.

    Returns string

Generated using TypeDoc