How to create Spectrum Admin user model from the Command Line (CLI)
search cancel

How to create Spectrum Admin user model from the Command Line (CLI)

book

Article ID: 385268

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

On Spectrum systems, such as a docker instance being added to current DSS where the admin user is not the default "spectrum", there is a need to add the DSS admin user. However, the docker may not have X11 windowing accessible to run the Spectrum Control Panel (SCP). In this scenario, the only way to add the required admin account name, is via the command line (CLI).

Environment

DX NetOps Spectrum all currently supported releases

Resolution

From CLI;

cd $SPECROOT/vnmsh
./connect

Then create a user model as per:

TechDocs : DX NetOps Spectrum 24.3 : Create a User Model

However, when you create a model by CLI it will go into the Lost and Found, so you then have to create associations in order to place it somewhere

create association rel=relation lmh=left_model_handle rmh=right_model_handle
 
For example, check current admin user:
 

$ ./show models | grep spectrum

0x10000063  spectrum(Active)                  0x10004     User        

 
Then, see it's associations for spectrum user Model_Handle:

$ ./show associations mh=0x10000063

LMHandle    LMName                            Relation                         RMHandle    RMName

0x10000006  Repair                            Can_Assign                       0x10000063  spectrum                        

0x1000000a  NotInAnyGroup                     Has_Member                       0x10000063  spectrum                        

0x10000013  Service Manager                   UserRole                         0x10000063  spectrum                        

0x10000016  Administrator                     UserRole                         0x10000063  spectrum                        

0x10000017  Operator                          UserRole                         0x10000063  spectrum 

 

Then create associations for new user similar to the above. For example, to create the Administrator role association:

./create association rel=UserRole lmh=0x10000016 rmh=<Model_Handle_of_New_User_Model>

Then repeat it for the other user roles and relations.