Diff
The config diff
feature provides the ability to compare the current running configuration of a device with a previously exported configuration template generated with ogcli export
.
The config diff
tool functions by performing an export of the current configuration of the system, and comparing it with a previous exported file, showing only the changes in a streamlined diff output containing the functional changes only.
Note: The config diff
tool performs the diff functionality in the same way as ogcli diff
, and can be used interchangeably using export files in either format. See config diff in the Opengear CLI Guide.
Diff tool behavior
-
Diff shows additions, removals and changes clearly in the a streamlined format with only functional differences between the input and running configurations.
-
If any section, list item or sub-property is out of order between the input configuration and the running configuration, it is not shown in the diff unless the values have actually changed.
-
If the input configuration file is missing properties or sections of configuration, it shows the differences between running configuration and the default values for those properties.
-
If any property or configuration section is missing from input configuration, and the running configuration is identical to the system defaults, it is omitted from the diff output.
-
If diff function detects no differences between the current configuration and configuration template files match, a return code of 0 and no output is shown.
Syntax |
---|
diff <proposed_configuration_file>
|
Usage Examples |
---|
1. Active configuration matches input file: 2. Configuration differs from template: 3. Configuration differs from template with defaults: 4. Configuration matches template with defaults: |
Positional Arguments |
---|
<input_file> Diff active configuration against <input_file>. |
Options | |
---|---|
-h, --help
|
Show this help message and exit. If more detailed help is required, use |
--secrets
|
The --secrets flag can be used to control how sensitive fields are displayed in the diff output. By default, sensitive fields are obfuscated. If the proposed config file was exported with If the input file contains a different |