Hi Kavi,

all you have to do is to integrate either the vnm shell or webservice approach 
below into your setscript.
Of course, you need to adopt the commands/paths to your specific platform 
accordingly  (Windows/Linux/Solaris, Spectrum installation path, curl 
availability, ...).


Mit freundlichen Gruessen - Yours sincerely

Raphael Franck
Consultant 
Global Infrastructure Operations

Computacenter AG & Co oHG
Enabling Users

Europaring 34-40, 50170 Kerpen, Germany
E-Mail: raphael.fra...@computacenter.com
WWW: www.computacenter.de

Von: Kaviarasu Jayapal [mailto:kaviaras...@gmail.com] 
Gesendet: Mittwoch, 21. Januar 2015 13:52
An: Franck, Raphael
Betreff: Re: [spectrum] Fetch Model Names of Host Config

Hi Raphael,

Thanks for your information.

I use to get the model handles via the event message. Is it possible to get the 
model handles and query their model names by using set script. Please suggest 
on this.

Thanks,
Kavi

On Wed, Jan 21, 2015 at 5:26 PM, Franck, Raphael 
<raphael.fra...@computacenter.com> wrote:
Hi Kavi, list,

if you got the model handle(s), you could either query the vnm shell (1) or the 
OneClick tomcat restful webservice (2).


(1)
read Spectrum_Command_Line_User_ENU.pdf

[spectrum@server ~]$ . /opt/SPECTRUM/spectrum*.env; cd ${SPECROOT}/vnmsh; 
./connect
[spectrum@server vnmsh]$ ./show attributes attr=0x1006e mh=YOURMODELHANDLE
Id          Name                              Iid                  Value
0x1006e     Model_Name                                             YOURMODELNAME


(2)
read Spectrum_Web_Services_API_Ref_ENU.pdf

[spectrum@server ~]$ curl --user user:password 
http://localhost:8080/spectrum/restful/model/YOURMODELHANDLE?attr=0x1006e

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><model-response-list 
xmlns="http://www.ca.com/spectrum/restful/schema/response"; error="EndOfResults" 
throttle="1" total-models="1"><model-responses><model 
mh="YOURMODELHANDLE"><attribute 
id="0x1006e">YOURMODELNAME</attribute></model></model-responses></model-response-list>


Mit freundlichen Gruessen - Yours sincerely

Raphael Franck
Consultant
Global Infrastructure Operations

Computacenter AG & Co oHG
Enabling Users

Europaring 34-40, 50170 Kerpen, Germany
E-Mail: raphael.fra...@computacenter.com
WWW: www.computacenter.de


-----Ursprüngliche Nachricht-----
Von: kavi arasu [mailto:kaviaras...@gmail.com]
Gesendet: Mittwoch, 21. Januar 2015 11:08
An: spectrum
Betreff: [spectrum] Fetch Model Names of Host Config

Hi All,

I would like to fetch the model names of the host configuration. By the below 
event we are getting the model handle of the current config and previous config.

--------------------------------------------------------------------------------------------------------------------------------
 Jan 20, 2015 4:02:42 AM PST    HCLETALGFOMC18CLORAS001 Configuration Manager - 
A configuration change notification was received from device 
HCLETALGFOMC18CLORAS001 of type SwCat45xx on landscape TSSPVW101. Device 
trap(s) provided: Device User: Unknown From: Unknown On: Unknown The following 
information was provided by SPECTRUM: Device User: Unknown Spectrum User: N/A 
NCM Communication Mode: N/A Capture Succeeded: true Capture Error Message: 
Total Number of Line Changes: 1 Relevant Number of Line Changes: 1 Violated 
Policies: Compliant Policies: Changed Lines: a140 1 shutdown Model handle of 
current configuration model: 0x1148fc Model handle of previous configuration 
model: 0x1128cc     System  
--------------------------------------------------------------------------------------------------------------------------------

My requirement is to get the model name of the current config and previous 
config, and pass those information as arguments to one of the perl script.

Is it possible to achieve this via setscript. Please provide your valuable 
suggestions.


Thanks, Kavi
---
To unsubscribe from spectrum, send email to lists...@unc.edu with the body: 
unsubscribe spectrum raphael.fra...@computacenter.com

---
To unsubscribe from spectrum, send email to lists...@unc.edu with the body: 
unsubscribe spectrum kaviaras...@gmail.com


---
To unsubscribe from spectrum, send email to lists...@unc.edu with the body: 
unsubscribe spectrum arch...@mail-archive.com

Reply via email to