How do I manage MDM device mappings?
Purpose
The following steps describe how to manage the device mappings for MDM in an NSP cluster.
Note: The NSP system must be fully operational when you perform the procedure.
Note: In order to add device mappings:
-
The new device-mapping files must be in a directory accessible to the NSP deployer host.
-
If a zipped collection of files is being installed, all files in the collection must be of the same type, for example, telemetry device mappings.
Note: release-ID in a file path has the following format:
R.r.p-rel.version
where
R.r.p is the NSP release, in the form MAJOR.minor.patch
version is a numeric value
Steps
1 |
Log in as the root user on the NSP deployer host in the standalone or primary NSP cluster. |
2 |
Open a console window. |
3 |
Enter the following: # cd /opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/tools/mdm/bin ↵ |
4 |
To list the current device mappings, which are in JSON format, enter the following: Note: The --ne option applies only to resync mappings, and is optional. Note: The --class option applies only to nfmp-resync mappings, and is optional. Note: If the --ne and --class options are omitted, all mappings of the specified type are listed. Note: The --save option saves the list to a file, and is valid only for telemetry mappings. # ./json-files.bash --list --mapping mapping_type --ne device_def --class class_path --save path --user user --pass password ↵ where mapping_type is one of the following mapping types: telemetry, resync, or nfmp-resync device_def is a device type definition, for example, SR-7750,21.10.R1 class_path is the NFM-P class path of the device type, in XPath format path is an existing local directory in which to save the mapping list user and password are the credentials of an NSP administrative user |
5 |
To add one or more JSON mapping files, enter the following: # ./json-files.bash --add path --user user --pass password ↵ where path is the path to a JSON mapping file, or to a directory that contains mapping files user and password are the credentials of an NSP administrative user |
6 |
Enter the following to remove one or more device mappings: Note: The --filename option is required only for telemetry mappings. Note: The --ne option applies only to resync mappings, and is optional. Note: The --class option applies only to nfmp-resync mappings, and is optional. Note: If the --ne and --class options are omitted, all mappings of the specified type are removed. # ./json-files.bash --remove --mapping mapping_type --filename mapping_1 mapping_2 ...mapping_n --ne device_type --class class_path --user user --pass password ↵ where mapping_type is one of the following mapping types: telemetry, resync, or nfmp-resync mapping_1 mapping_2 ...mapping_n is a list of telemetry mapping files to remove device_type is a device type definition, for example, SR-7750,21.10.R1; a value has the following format: neType,neVersion—for example, SR-7750,21.10.R1 class_path is the NFM-P class path of the device type, in XPath format user and password are the credentials of an NSP administrative user |
7 |
Close the console window. End of steps |