User Creation and Deletion in SAM via XML
search cancel

User Creation and Deletion in SAM via XML

book

Article ID: 449063

calendar_today

Updated On:

Products

VMware Smart Assurance Network Observability

Issue/Introduction

Support agents or administrators need to manage user accounts across multiple Service Assurance Manager (SAM) domains (e.g., Presentation SAM, Notification SAMs, Topology SAM). Manual creation and association with user profiles via the GUI is time-consuming and prone to error.

Environment

  • Product: All Supported Smarts releases
  • Component: Service Assurance Manager (SAM)

Resolution

User administration can be automated using the sm_config utility to export, modify, and import configuration files in XML format.

Prerequisites

  • Access to the SAM domain command-line interface.
  • Appropriate permissions to run sm_config.

Step-by-Step Guidelines on User Creation and Profile Mapping

1. Export Existing Configurations

Before making changes, export the current Users and UserProfiles to serve as templates:

<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> export -c User User.xml
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> export -c UserProfile UserProfile.xml

 

2. Modify XML Files

Edit the exported XML files to add or remove users.

  • To Add a User: Insert a new <user> entry into User.xml.
  • To Map a User to a Profile: Edit UserProfile.xml to add the user to the desired profile (e.g., admin-profile).

Example XML Structure (Creating User under User.xml):

<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<ics_config version="2">
  <userconfig enable="TRUE" name="maint" timestamp="1770228259"/>
  <userconfig enable="TRUE" name="admin" timestamp="1770228259"/>
  <userconfig enable="TRUE" name="default" timestamp="1770228259"/>
  <userconfig enable="TRUE" name="oper" timestamp="1770228259"/>
  <userconfig enable="TRUE" name="test-user" timestamp="0"/>                        <!-- Custom User Entry Added Here -->
...........
...........

Example XML Structure (Mapping User to Profile under UserProfile.xml):

#Locate the desired user profile#
.......
.......
  <userprofileconfig enable="TRUE" name="admin-profile" timestamp="1770228416">
    <nl>Default</nl>
    <multiselect multiselect_value="TRUE"/>
    <user>admin</user>
    <user>test-user</user>                                  <!-- Customer User created is mapped to admin-profile configuration here -->
    <consoleoperation>MapTypeLogicalConnectivityILAG</consoleoperation>
    <consoleoperation>DeleteView</consoleoperation>
    <consoleoperation>Acknowledge</consoleoperation>
    <consoleoperation>StatusTable</consoleoperation>
    <consoleoperation>SaveConsoleRemote</consoleoperation> ...etc

Update the profile to desired one accordingly.

3. Import Updated Configurations

Use the --force flag to apply the new XML configurations to the SAM domain:

<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> import --force User.xml
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> import --force UserProfile.xml

 

4. Deleting Users

To delete users, remove their respective entries from the XML files and re-import them. The domain will sync and remove the users accordingly.

Additional Information

Additional Information

  • Scripting: While Support provides these manual steps, these commands can be wrapped in custom shell or Python scripts to automate bulk updates across multiple domains. However, customizations and do not fall under the purview of Broadcom Support. Please engage with your Accounts team for engagement of Professional Solutions Services team for any assistance with the same.
  • 3rd Party Authentication: If using LDAP or other external authentication providers, ensure the user profiles and environmental requirements are adjusted accordingly.