Managing Scripts

IMPORTANT: Your system might restrict script editing based on your license with Adtran. If your license restricts editing scripts, you cannot add new scripts or edit the source of existing scripts. You can change a script’s name field and the Usable With option field.

 

Scripts are implemented using a customized JavaScript-based environment that runs on the ACS. This environment supports complete manipulation of the CPE via TR-069, as well as access to data models stored locally on the ACS, such as the subscriber’s.

Use the Scripts window on the Customer Support tab to manage scripts on your system. You can add new scripts, edit existing scripts, or delete custom scripts. When a device checks into the system, scripts are executed on the device in the order in which they were put into the queue.

Device Manager contains two types of scripts:

  • Bundled scripts—Scripts that are bundled with Device Manager.
  • Custom scripts—Scripts that you set up and apply to your own network.

All script names must be unique. When writing custom scripts, write them with the idea that the script will run against one device at a time. Scripts that run on a device that is associated with a subscriber have access to the subscriber’s information. For more information on building scripts, contact your Adtran Sales Engineer regarding a Professional Engagement.

Scripts Window

The Scripts window comprises the following:

  • Script List—This list displays all existing scripts. The Name column displays the action name. The Labels column displays any labels applied to the script. From here, you can:
    Select to refresh the Script List.
    Select to add a new script.
    Select a script from the list to edit it in the Script Editor.
    Select to delete a script. (Only available for custom scripts.)
  • Script Editor—The Script Editor allows you to write new scripts or edit existing ones. From here:
    Select to expand the Script Editor to full size.
    When in full-size mode, select to restore the window to its original size.
    Select to close the editor and discard your changes.
  • Script Labels—Apply labels to the script currently selected. From here, select to save your changes.

Adding a New Script

  1. In the Administration tab, select Scripts from the left navigation bar.
  2. Select . The system displays the Script Editor window.
  3. In the Name field, enter the name of the script.
  4. In the Code field, enter a unique identifier for this script.
  5. Select where you want the script to execute. You can select more than one of the following locations:
    • Users—Script executes on user accounts.
    • Events—Script executes upon specific events.
    • Bulk Operations—Script executes during bulk operations.
    • Services—Script executes on services.
  6. Select Add New Parameter and specify a type, name, and description. select Add Another Parameter to add additional parameters.
  7. In the JavaScript Source text box, enter the code for the script.
  8. Select a script label, if appropriate to the action.
  9. Select .

Edit a Script

  1. In the Administration tab, select Scripts from the left navigation bar.
  2. In the Script List, select the name of the script to edit. The system displays the Script Editor window.
  3. Make changes to any of the fields.
  4. Select .

Deleting a Script

Only custom scripts can be deleted from the system.

To delete a script:

  1. In the Script List, locate the script you want to delete.
  2. Select to delete your custom script from the system. The system refreshes the page, listing the remaining scripts.

 

IMPORTANT: Your system might restrict script editing based on your license with Adtran. If your license restricts editing scripts, you cannot add new scripts or edit the source of existing scripts. You can change a script’s name field and the Usable With option field.

 

RELATED ARTICLES:

Working With Scripts

Scripting Guide