Modifying Configuration Files
Junos Space Network Management Platform allows you to modify device configuration files from the Configuration Files workspace. The Modify Configuration File action in the Configuration Files workspace enables advanced users to modify device configuration files stored in the Junos Space database.
When you edit a configuration file in the Configuration Files workspace, the configuration is not validated and a sanity check is not performed. For more information on validating device configuration, see Reviewing and Deploying the Device Configuration. To ensure that the configuration is validated and a sanity check is performed, use the Devices workspace to modify device configuration. For more information, see Modifying the Configuration on the Device.
When you edit a configuration file, an audit log entry is automatically generated (see Viewing Audit Logs); however, unlike configuration files edited in the Devices workspace, files edited in the Configuration Files workspace are not saved as change requests; instead, they are saved as versions. The audit log entry records the name of the configuration file that was modified.
To edit a configuration file in the Configuration Files workspace:
- On the Junos Space Platform UI, select Configuration
Files > Config Files Management.
The Config Files Management page appears.
- On the Config Files Management page, select the device
whose configuration you want to edit.
If no configuration files are displayed on the page, first back up the device configuration file. For more information about backing up device configuration, see Backing Up Configuration Files. You can then select the configuration file from the Config Files Management page.
- Click the Modify Configuration File icon at
the top of the Config Files Management page.
The Edit Config File page appears. It displays the name of the device whose configuration you want to edit, the time at which the file was created, the version of the file with the timestamp (that is, when the configuration snapshot was created), and the contents of the file.
- From the Version list, select a version to
use as a baseline. By default, the latest version of the file is displayed.
The timestamp is displayed adjacent to the version number. It indicates the time at which this version of the configuration was backed up.
A version can be either a configuration backup file or an edited copy of the initial backup file. For more information about versioning, see Backing Up Configuration Files.
The selected version appears in the text editor. The vertical and horizontal scroll bars help you view the configuration file. A configuration file usually has multiple pages. The status bar at the bottom displays the page that you are on and the total number of pages. It also contains paging controls and a Refresh icon. Use the Show items list to manage the number of lines of configuration that is displayed on a single page. By default, 50 lines are displayed. You can choose to display 200, 800, 3200, or 10,000 lines.
- (Optional) To find a specific parameter, go through the file page by page. The browser’s Search function does not work in the text editor.
- Enter your changes.
Do not click Modify until you have finished editing. Clicking Modify will create a new version of the configuration file.
- (Optional) List the changes you have made (or any other information that you want to add) in the Comments field. You cannot add a comment unless you have made changes to the configuration. It is advisable to enter text in this field to distinguish the current version from a backup taken from the device itself.
- After you have made all changes, click Modify.
The Config Files Management page reappears, displaying the edited configuration file that is still selected.
Junos Space does not create a new version of the configuration file if you have not made any changes to the device configuration. That is, if you click Modify without making any changes to the device configuration, then Junos Space displays the following message:
Config file contents are same as the current version. To save as a latest version, please change the contents or select a previous version to be saved as the latest.
Verify your changes by double-clicking the configuration file on the Config Files Management page.
The Config File Details dialog box appears, displaying the file in noneditable format. You can select the version from the Version list. By default, the latest edited version appears.
The pagination, Comments area, and controls are the same as they are in the text editor you used to make your changes.
If you want to view the differences between the recently modified version and a previous version, you can compare versions of the file. For more information about comparing device configuration files, see Comparing Configuration Files.
To deploy the edited configuration file on to a device, you must use the Restore Configuration File action. See Restoring Configuration Files for more information.