How do I manage MDM model definitions?

Purpose

The following steps describe how to manage the YANG model definitions and NE model definitions in an NSP cluster.

Note: The yang-files.bash script prompts for NSP administrative user credentials. To suppress the prompt, you can include the credentials in the script command line; for example:

# ./yang-files.bash --list --user user --pass password

where user and password are the NSP administrative user credentials

For simplicity, the credentials and prompt are not shown in the procedure steps.

Note: The NSP system must be fully operational when you perform the procedure.

Note: If you are adding model definitions:

  • The new model-definition 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.

Note: If you are adding an NE model, the required files are in a compressed archive file; contact Nokia for access to the file.

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
 

Log in as the root or NSP admin user on the NSP deployer host in the standalone or primary NSP cluster.


Open a console window.


Enter the following:

cd /opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/tools/mdm/bin ↵


Manage YANG models
 

To list the names of all installed module sets, enter the following:

# ./yang-files.bash --list ↵

The module sets are listed.


To list the names of the YANG models in a module set, enter the following:

# ./yang-files.bash --modulesetname module_set --list ↵

where module_set is the module set name

The YANG model names are listed in the following format:

model_name -> (namespace,revision)


To save all YANG models in a module set as files, enter the following:

# ./yang-files.bash --modulesetname module_set --save path

where

module_set is the module set name

path is an existing directory on the local file system

The model files are created in the specified directory.


To save specific YANG models in a module set as files, enter the following:

# ./yang-files.bash --modulesetname module_set --model model_1 model_2 . . . model_n --save path

where

module_set is the module set name

model_1 model_2 . . . model_n is a list of the YANG models to save

path is an existing directory on the local file system

The model files are created in the specified directory.


To add one or more YANG model definitions, enter the following:

Note: Because of the heavy processing load associated with importing model definitions, it is strongly recommended that you do not attempt to install all YANG files in a bundle at once.

If you need to install a large number of YANG files, the recommended method is to install only the immediately required files, in small batches, and install any additional YANG files later, as required.

If the following message is displayed after you try to install YANG files, you may need to install fewer files at a time; you can use the command option in the message to verify that the current operation installed all specified files:

WARN: Timeout uploading yang files. Please verify with --list --modulesetname module_set

# ./yang-files.bash --modulesetname module_set --add path

where

module_set is the module set name

path is the path to a YANG definition file, or to a directory that contains definition files


To remove one or more YANG model definitions, enter the following:

# ./yang-files.bash --modulesetname module_set --remove definition_1 definition_2 . . . definition_n

where

module_set is the module set name

definition_1 definition_2 . . . definition_n is a list of model definitions in the following format:

modelname,namespace,revision


Add NE model definitions
 
10 

To add one or more NE model definitions, enter the following:

# ./ne-model.bash --install definition_file

where definition_file is the path and name of an NE model zip file


11 

Close the open console windows.

End of steps