Using CSV command sets

There are several different ways to apply a command set. You can select a command set and apply it to one or more network resources, or you can select one or more network resources and then apply a command set. You can also apply multiple command sets to multiple network resources. In addition, you can apply one or more command sets to a realm.

Before you begin

When applying a command set, the system verifies that the running and stored (candidate) configurations on each impacted resource are the same. If not the same, you will see a mismatch error. After a successful configuration change, the system writes the running configuration to the stored/candidate configuration on each resource, ensuring that all three configurations (current, running, stored) are in sync.
The main purpose of a CSV applied command set is to apply a large number of command sets to multiple devices. The CSV utility allows for the specifications of a set of parameters for a command set, or native command set using a CSV file rather than manual entry. This extends the functionality of performing bulk import operations.
Note: CSV command sets with large numbers of parameters are not viewable in the GUI. You must define the correct values in a CSV command set before importing it into Netcool Configuration Manager.

About this task

This task describes how to create a CSV file, apply a CSV command set, and open a CSV text editor, for example, Microsoft Excel.

Procedure

  1. To create the CSV file, invoke a CSV text editor, for example, Microsoft Excel.
  2. Create the following column headings: work-type, work-name, work-realm, work-device, device-realm, parameter
  3. Using the following table as a reference, enter values for the fields in the column headings as appropriate.
    Table 1. CSV column headings
    CSV column heading Description
    work-type Enter either CommandSet or NativeCommandSet.
    work-name Name given to the command set.
    work-realm Path to command set. Use / to indicate folder hierarchy.
    work-device Name given to network resource.
    device-realm Path to network resource. Use / to indicate folder hierarchy.
    parameter (option 1...n) Optional. You may have multiple parameters as required, but only if defined within the command set.
    The first five of the above headings are mandatory. Specify the optional parameter heading by creating a heading of parametername. For example, if CommandSet1 has a parameter named set_timezone, then a column with the heading set_timezone is required in the CSV file. If a parameter has been declared within a command set, and it is not represented in the CSV file, an error will be displayed to the user.
  4. Enter the sample data as shown in the following example:
    CommandSet,ModelledTest,ROOT,10.216.1.44,ROOT,
  5. When the data has been entered, save the file as a CSV file. This means that it can be imported into the editor.
  6. In order to apply a command set, there are a number of stages which need to be completed. To assist in the process a wizard is used to collect information. Select Resource Browser from the navigation tree.
  7. Navigate to the resource to which you want to apply a command set.
  8. Select Tools > Apply from CSV File > Apply from CSV File > (Native) Command Set.
  9. The Csv - Apply Command Sets wizard is displayed. You are required to select a file to import. Select Browse to search for the Import file location.
  10. An Open dialog will be displayed. Browse to the location of the CSV file you want to import, and select Open. If there are any errors with the format of your CSV file, an error will be displayed. Errors must be corrected before proceeding with the file import. Erroneous CSV files cannot be imported. Once the error has been corrected, the user must browse and re-select the amended CSV file.
  11. The file you select to import will be populated into the wizard. Click Next.
  12. At the next stage of the wizard, you will be requested to Configure Execution Options. Using the following table as a guide, please configure the dialog according to your needs. Click Next.
    Table 2. Configure Execution Options dialog
    Element Definition
    Execution Mode
    Execute Mode Applies command set to selected network resources.
    Report Only Mode Does not change resources, but produces a report detailing the changes that would be made to those resources if in Execute Mode.
    Apply Device at a time Applies all command sets to one individual device at a time.
    Apply Command Set at a time Applies one command set at a time to a resource.
    Failure Options
    Ignore All Errors Indicates that the UOW will continue processing, regardless of any failures that occur. If each command set is to be applied to each resource regardless of any errors, select the Override flag as well.
    Fail After X Total Errors User has the ability to select how many errors can occur before total failure of the process.
    Fail After X Percent Errors User has the ability to select the maximum percentage of failures that can occur before the UOW stops processing.
    Pre-Emptive Compliance Options These options are only available for modelled command sets and if the user is a member of a group with Pre-Emptive compliance activities.
    Enable Pre-Emptive Compliance Checks When in Execute mode all Pre-Emptive modes are available. However if the user has selected Report Only execution mode, then report only Pre-emptive mode is automatically selected. If the user has ‘Manage Work' rights they will be able to disable Pre-Emptive Compliance checks by deselecting the check box. Users who do not have 'Manage Work' rights will not be able to modify Pre-Emptive settings.
    Block Configuration Change if projected configuration contains compliance failures Policy is run against the current and projected configuration to determine if a violation is present. If a violation is found, the configuration change is blocked.
    Block Configuration Change if projected configuration contains new compliance failures only Policy is run against the projected configuration to determine if a violation is present. If a violation is found, the configuration change is blocked.
    Report Compliance Failure(s) only (Configuration change will not be blocked) Produces a report providing information on violations in both the current and projected configuration. Pre-Emptive failures are ignored and the command set continues to execute.
    Command Sets This lists the command sets that will be rolled back.
  13. Rollback Options in the event of a command set failure are requested. Using the following table as a guide, please configure the dialog according to your needs. Click Next.
    Table 3. Rollback Options dialog
    Field Definition
    How should Rollbacks on Command Set failures be handled?
    No Rollback Select this to turn off the rollback option.
    Use Modeled Rollback This option will enable a rollback to a modeled configuration.
    Use JUNOS based Rollback This option rolls back XML commands.
    Reload the configuration and reboot the device This option will load the original configuration and reboot the device.
    Check here to have Rollbacks verified Select this checkbox to enable rollback verification.
    How should Rollbacks be done for each Network Resource?
    Rollback only the failed Command Set on the failed Network Resource This option rolls back only that command set that failed.
    Rollback all Command Sets on the failed Network Resources This option rolls back all command sets on the failed resource.
  14. The Password Override window will be displayed. This is an optional step, which means that Netcool Configuration Manager Authentication may be overridden if required. Using the following table as a guide, please configure this optional dialog according to your needs. Click Next.
    Table 4. Password Override dialog
    Field Definition
    Override ITNCM Authentication Select this check box to override the default ITNCM authentication information.
    Login Name Provide the login name for the device you are accessing.
    Password Provide the password for the device you are accessing.
    Enable Password Provide the device enable password for the device you are accessing.
    Only Use This Authentication Select this check box if you will always use this authentication for your resource.
  15. The Execution Priority window is displayed. The precedence of the task must be considered for this option. Select the appropriate priority required. Click Next.
  16. The next window to be displayed is the Schedule Work window. You will need to select the scheduling preference. If Immediate is selected, the wizard skips forward to the Describe Work window. However, if you select Scheduled or recurring Schedule, the information in the following table should be used as a guide to complete the selections required. These are dependent on your needs.
    Table 5. Execution Priority options
    Option Definition
    Scheduled The job will run at a specific time, based on the values entered for Scheduled Start and Scheduled End.
    Hourly The job will run daily, based on the values entered for Next Execution, Window Size, Every n days, or Every Weekday.
    Daily The job will run daily, based on the values entered for Next Execution, Window Size, Every n days, or Every Weekday.
    Weekly The job will run weekly, based on the values entered for Next Execution, Window Size, and Recur every n weeks on day of the week.
    Monthly The job will run monthly, based on the values entered for Next Execution, Window Size, Day n of every n months, or The specific day of every month.
    Yearly The job will run yearly, based on the values entered for Next Execution, Window Size, Every month and day, or The specific date.
    Scheduled Start Enter the scheduled start time and date.
    Scheduled End Enter the scheduled end time and date.
    Next Execution Enter the time and date for the next execution.
    Window Size Use the drop-down lists to indicate the window size.
    Every n hours after Scheduled Start Choose the number of hours from the drop-down list.
    Every n days Choose the number of days from the drop-down list.
    Every Weekday The job will run every weekday.
    Recur every n weeks Choose the number of weeks from the drop-down list and select the appropriate day.
    Day n of every n months Choose the number of days and months from the drop-down lists.
    The specific day of every n month Choose the specific day and month from the drop-down lists.
    Every specific date Choose the month and day from the drop-down lists.
    The specific day of every n month Choose the specific day and month from the drop-down lists.
  17. The Resources per UOW window is displayed only if it meets a specific condition. It will be displayed, only if the user has described in the CSV file that all network resources will apply the exact same group of command sets and associated parameter values. Using the following table as a guide, configure the options according to your needs. Click Next.
    Table 6. Resources per UOW options
    Element Definition
    Slider Bar Move the slider bar to set the number of resources for each UOW.
    Resources per UOW selection window Type or click the arrows to select the resources per UOW.
    Number of UOWs Type or click the arrows to select the number of UOWs
  18. The Describe Work window is displayed. This gives you an opportunity to enter a description for the UOW. Click Finish.

Results

The command set will run when scheduled, based on your approvals. The number of approvals required for the UOW depends on your group's policy.