Template

Object represents template. Extends NetObj.

Instance attributes

Inherited from NetObj
alarms ⇒ array

List of active Alarms for this object.

alarmStats ⇒ array

Integer array that consists of 5 numbers - each number represents number of alarms for this and child objects for each of severity.

alias: String

Object alias. For interfaces it is automatically collected on configuration poll (e.g. from SNMP ifAlias).

asset ⇒ Asset

Reference to asset class of asset linked to this object.

assetId: int

Id of linked asset object.

assetProperties ⇒ AssetProperties

Reference to asset properties class of asset linked to this object.

backupZoneProxy: Node

Currently selected backup zone proxy (null if zoning is disabled or backup proxy is not assigned)

backupZoneProxyId: int

ID of currently selected backup zone proxy (0 if zoning is disabled or backup proxy is not assigned)

category: String

Object’s category name

categoryId: int

Object’s category ID

children ⇒ array

List of child objects. Use classof to differentiate.

city: String

Postal address - city.

comments: String

Object comments.

country: String

Postal address - country.

creationTime: int64

Object creation time as UNIX timestamp

customAttributes ⇒ HashMap

Hash map of object custom attributes.

district: String

Postal address - district.

geolocation ⇒ GeoLocation

Object geographical location.

guid: String

Object GUID as string.

id: int

Unique object identifier.

ipAddr: String

Primary IP address. Deprecated and will be removed in a future version, use ipAddress instead.

ipAddress ⇒ InetAddress

Added in version 5.1

Primary IP address.

isInMaintenanceMode: bool

Maintenance mode indicator (true if object currently is in maintenace mode).

maintenanceInitiator: int

Maintenance initiator user id

mapImage: String

GUID of object image used for representation on the maps.

name: String

Object name.

nameOnMap: String

Object name displayed on map.

parents ⇒ array

List of direct parents for this object (most likely either Container or Cluster).

postcode: String

Postal address - postal code.

primaryZoneProxy: Node

currently selected primary zone proxy (null if zoning is disabled or primary proxy is not assigned)

primaryZoneProxyId: int

ID of currently selected primary zone proxy (0 if zoning is disabled or primary proxy is not assigned)

region: String

Postal address - region.

responsibleUsers: Array

Array with user objects that are added as responsible users for this object. Objects are User or UserGroup

state: int

Current object state. One of: Node State, Cluster State, Sensor State

status: int

Current object status.

streetAddress: String

Postal address - street.

type: int

Object type.

autoApplyScript: String

Source of the script for automatic binding.

isAutoApplyEnabled: bool

Indicate if automatic binding is enabled.

isAutoRemoveEnabled: bool

Indicate if automatic unbinding is enabled.

version: int

Template version

Instance methods

applyTo(object): void

Apply teplate on object

Table 1. Parameters

object

Object

Object this template to be applied on

removeFrom(object): void

emplate form object

Table 2. Parameters

object

Object

Object this template to be removed form

setAutoApplyMode(enableBind, enableUnbind): void

Set automatic bind mode for the container.

Table 3. Parameters

enableBind

Boolean

Script should be used for automatic binding.

enableUnbind

Boolean

Script should be used for automatic unbinding.

setAutoApplyScript(script): void

Update automatic binding script source.

Table 4. Parameters

script

String

Script content.