Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeDAO

Hierarchy

Index

Constructors

constructor

Properties

Protected http

http: IOnmsHTTP

the HTTP implementation to use

Methods

fetch

  • given a node, fetch all the sub-model objects for that node (ipInterfaces, snmpInterfaces, etc.)

    Parameters

    Returns Promise<OnmsNode>

find

  • search for nodes, given a filter

    Parameters

    Returns Promise<OnmsNode[]>

get

  • get(id: number, recurse?: boolean): Promise<OnmsNode>
  • get an node, given the node's ID

    Parameters

    • id: number

      the node's ID

    • Default value recurse: boolean = false

      optionally fetch all sub-model objects (ipInterface, etc.)

    Returns Promise<OnmsNode>

Protected getApiVersion

  • getApiVersion(): 1 | 2
  • retrieve the API version from the underlying server

    Returns 1 | 2

Protected getCount

  • getCount(data: any): number
  • extract the count or totalCount values from response data

    Parameters

    • data: any

    Returns number

Protected getFilterProcessor

  • getFilterProcessor(): any
  • retrieve filter processor for the current API version

    Returns any

Protected getOptions

ipInterfaces

  • given a node, get the IP interfaces for that node

    Parameters

    Returns Promise<OnmsIpInterface[]>

services

snmpInterfaces

  • given a node, get the SNMP interfaces for that node

    Parameters

    Returns Promise<OnmsSnmpInterface[]>

Protected toDate

  • toDate(from: any): any
  • convert the given value to a date, or undefined if it cannot be converted

    Parameters

    • from: any

    Returns any

Protected toNumber

  • toNumber(from: any): number
  • convert the given value to a number, or undefined if it cannot be converted

    Parameters

    • from: any

    Returns number

Generated using TypeDoc