1.26. Release Notes 1.0.1

NetSpyGlass v1.0.1

1.26.1. Important changes Change in the user-defined report scripts

  • Python class defined in the report script should inherit base class BaseReport defined in the module base_report.py. For example:

    import sys
    import time
    import base_report
    from nw2functions import *
    class MyReport(base_report.BaseReport):
        this class is used to generate reports.
        :param log: Java logger object, can be used to write to the same log file
                    used by the UI server (logs/info.log or logs/error.log, depending on the level).
        def __init__(self, log):
            super(MyReport, self).__init__(log)
        def execute(self, config, template_context):
            Generate some useful reports.
            :param config:  a dictionary with subset of the configuration information.
                            Currently it includes the following items:
                            "home"               : NSG "home" directory
                            "pollingIntervalSec" : polling interval, sec
                            "network.name"       : the name of the network
                            "devices"            : list of instances of Python class Device. This is
                                                   the same object used to pass to the Python hook
                                                   that matches devices to views
            :param template_context:  Velocity template context
            self.log.debug('===  Reports')
            self.config = config
            self.context = template_context

1.26.2. Improvements in the Server

  • We have introduced simple RBAC (Role Based Access Control) in this version. User roles are defined in the configuration block ui.authentication.roles. Currently this are two roles, admin and other. To make a user an admin, add corresponding user name to the list ui.authentication.roles.admin:

    ui {
       authentication {
           roles {
             admin: [ user@company.com, another_user ]

    User name should be added exactly as they appear in the etc/users.properties file (if internal authentication is used). To check what you should add to the configuration statement, look at the user name that appears in the upper right corner of the UI pages where it says “Logged in: ”. This works with internal and reverse proxy based authentication methods. If authentication is turned off, then all users are given admin level access.

    Currently there is only one function that requires admin level access, it is ability to start network discovery by clicking “Discover” button in the UI. If logged in user is an admin, the UI control is clickable and starts discovery. If logged in user is not an admin, the control looks differently and is not clickable. If authentication is turned off, the control is always enabled.

  • We have changed the structure of the launch configuration files and startup scripts. If you install from the tar archive, make a copy of the file launch.conf.prototype and edit it to point to the server’s home directory, configuration file and log directories. Use scripts start.sh and stop.sh to start and stop the system.

    If you install from rpm/deb package, launch parameters are in the same file as before - /etc/default/netspyglass. The set of variables in this file has changed however. Now all parameters should be confgiured as part of the variables SERVER_CLI and MONITOR_CLI. See Installation and Configuration using rpm or deb package for more details.

1.26.3. Other Changes

  • prototype configuration file nw2.conf.prototype has been removed from the distribution packages. File doc/default_config/netspyglass.conf can be used as a reference instead.