How to schedule maintenance of a device model using the Spectrum Command Line Interface (CLI)
search cancel

How to schedule maintenance of a device model using the Spectrum Command Line Interface (CLI)

book

Article ID: 42493

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction


How to schedule maintenance of a device model using the Spectrum Command Line Interface (CLI)

Environment

Release: Any version of Spectrum
Component:

Resolution

Setting up schedule maintenance of a device model is a matter to create MAINT_SCHEDULE association from the device model to schedule model. Here are the basic 3 steps.

  1. Create schedule model
  2. Find/identify the device model you want to schedule
  3. Create MAINT_SCHEDULE association from the device model to the schedule model.

To create schedule model you can use the following command

./create model mth=0x10456 attr=<attrid>,val=<val> attr=<attrid>,val=<value> ...

Notes:
  0x10456 is "schedule" model's model type handle
  

To create the association you can use the following command

./create association rel=MAINT_SCHEDULE lmh=<device model's model handle> rmh=<schedule model's model handle>



The below example shows how to create schedule maintenance for a device at 12th May 2016 from 7 pm to 8 pm (1 hour duration).

  1. Create the schedule model. E.g. schedule model's description is "My Schedule, once at 7 - 8 PM (1 hour) on 12th May".

> ./create model mth=0x10456 attr=0x12bbc,val="My Schedule, once at 7 - 8 PM (1 hour) on 12th May" attr=0x1298f,val=19 attr=0x12993,val=3600 attr=0x129e4,val=12 attr=0x12992,val=4 attr=0x129e3,val=122 attr=0x12994,val=6
created model handle = 0x1400521

The CLI results schedule model with model handle = 0x1400521. Here are the attributes being used above.

0x12bbc Description : "My Schedule, once at 7 - 8 PM (1 hour) on 12th May"
0x1298f SCHED_Start_Hour : 19 ==> 7 pm
0x12993 SCHED_Duration : 3600 ==> 3600 sec = 1 hour, so from 7pm to 8pm
0x129e4 SCHED_Start_Day : 12
0x12992 SCHED_Start_Month : 4 ==> May
0x129e3 SCHED_Start_Year : 122 ==> 2022 (123 means 2023, 124 means 2024 etc.)
0x12994 SCHED_Recurrence : 6 ==> Once (2 means daily, 3 means weekly, 4 means monthly, 5 means yearly)

  2. Find/identify the device model you want to schedule. E.g. my device model name is test.broadcom.com.

> ./seek attr=0x1006e,val=test.broadcom.com
MHandle MName MTypeHnd MTypeName
0x1400078 test.ca.com 0x21000c Rtr_Cisco

So my device model's model handle is 0x1400078


  3. Create MAINT_SCHEDULE association from the device model to the schedule model

> ./create association rel=MAINT_SCHEDULE lmh=0x1400078 rmh=0x1400521
create association: successful 

 

Additional Information

Reference the link below for a complete list of the schedule models attributes.

Schedule documentation topic