Skip to content

@RangerRick RangerRick released this Sep 30, 2019 · 0 commits to 30b2a9a838bef0b63fde34c7db4fcc7852a8b3ce since this release

OpenNMS.js 2.0 adds a few new APIs, contains a ton of refactoring and build system updates, and has a number of breaking changes.

Notable Changes:

  • updated CLI libraries to fix/improve table output
  • better, faster build system to improve generated code
  • improved handling of authentication in HTTP implementations
  • support for HEAD requests has been added to the HTTP implementations
  • a number of metadata objects (notably OnmsServer) support .equals() for comparison now
  • property caching on v2 API calls is fixed when interacting with multiple servers/DAOs
  • filter API now supports orderBy and order (and the alarms CLI list command supports it)
  • HTTP parameters in OnmsHTTPOptions can now have multiple values -- for example a parameter with value [ 1, 2 ] will serialize to &foo=1&foo=2

Breaking Changes:

  • The api/Log module now only exports a single, simplified log object; typescript-logging was overly complicated and not really adding much in the way of value. Use .setDebug(), .setQuiet(), and .setSilent() to change the logging level instead.
  • A number of the TypeScript APIs have been clarified to be explicitly nullable (and/or undefined-able) to make strict null- and type-checking validation pass.
  • PropertiesCache and its associated interface, ISearchPropertyAccessor are gone. This only affects you if you have implemented custom DAOs, which is very unlikely. :)
  • The previously deprecated timeout property in AbstractHTTP (and sub-classes) has been removed. Access the AbstractHTTP.options.timeout property directly.
  • The Client no longer keeps a separate copy of the server object. Instead you should access the http.server sub-property directly.
  • A number of API objects are now immutable/read-only to reduce side-effects: OnmsAuthConfig, OnmsEnum, OnmsError, OnmsHTTPOptions, OnmsResult, OnmsServer, Operator, SearchPropertyType, ServerMetadata, TicketerConfig.
    The OnmsHTTPOptions and OnmsServer objects now have builders (use .newBuilder() to create) rather than constructors with a bunch of arguments.
  • The id property on OnmsServer is no longer generated, it is computed based on the contents of the server object and should be repeatably equal if the contents are equal.
Assets 2
You can’t perform that action at this time.