Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

This function returns a mapping of roster names to a list of usernames contained in the roster.

Panel
titleClient Permission Restrictions

This scripting function has no Client Permission or Perspective Session restrictions.

Panel
titleSyntax

system.alarm.getRosters()

  • Parameters

None

  • Returns

PyDict - A dictionary that maps roster names to a List of usernames in the roster. The List of usernames may be empty if no users have been added to the roster.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Examples
Code Block
languagepy
titleCode In Action - Listing All the Users in a Roster
# This script will get all the rosters and list the users in them.
rosters = system.alarm.getRosters()
for key, values in rosters.iteritems():
	# key is the roster name, values is a dict of usernames
	print 'Roster', key, 'contains these users:'
	for value in values:
		print '  ', value
Code Block
languagepy
titleCode In Action - Listing All the Users in a Roster from a Perspective Session
# This script will get all the rosters and list the users in them.
rosters = system.alarm.getRosters()
for key, values in rosters.iteritems():
	# key is the roster name, values is a dict of usernames
	system.perspective.print('Roster ' + key + ' contains these users:')
	for value in values:
		system.perspective.print('  ' + value)
Panel
Code Block
languagetext
titleOutput
Roster Admins contains these users:
   admin
Roster Supervisors contains these users:
   asmith
   jdoe


Panel
titleKeywords

system alarm getRosters, alarm.getRosters