cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

Get Device Family - CRS

375
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Cassio Luis Reis Gomes on 15-03-2011 03:17:45 PM
Hello Team,
I'm trying to get CRS Family using GetDeviceFamiliy.xml in AWB, but I can not see CRS family in the list.
Is there any other macro to support CRS Family?
 
Thanks
Cassio Gomes
 

Subject: RE: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstrac
Replied by: Suresh Kalenahalli on 16-03-2011 04:03:10 PM
Heloo Cassio Gomes,



Could you please try the below BQL command on your setup and send me the result. Replace ¿YOURANADEVICENAME¿ with the name of CRS device that you are having issue.



<?xml version="1.0" encoding="UTF-8"?>

<command name="Get">

    <param name="oid">

        <value>{[ManagedElement(Key=YOURANADEVICENAME)]}</value>

    </param>

    <param name="rs">

               <value>

          <key name="imo-view-controller">

            <entry name="depth">100</entry>

            <entry name="register">false</entry>

            <entry name="cachedResultAcceptable">false</entry>

            <key name="requiredProperties">

              <key name="com.sheer.imo.IManagedElement">

                <entry name="SysLocation" />

                <entry name="InvestigationStateEnum" />

                <entry name="ElementType" />

                <entry name="DeviceName" />

                <entry name="SoftwareVersion" />

                <entry name="ElementCategoryEnum" />

                <entry name="VendorEnum" />

                <entry name="CommunicationStateEnum" />

                <entry name="SysName" />

                <entry name="ElementTypeKey" />

                <entry name="IP" />

                <entry name="SysUpTime" />

              </key>

            </key>

                                             </key>

                                             </value>

    </param>

</command>



Just to give you an idea. GetDeviceFamily macro is just combination of bql command above and result filtered using xpath.  On your result try to apply the xpath below and see what you get.

If you don¿t see any result that you are expecting then you need to modify the xpath  or bql query.



<XpathEntries type="IMObjects_Array">

    <IGenericImo>

      <ID type="Oid">{[GenericImo(Id=1)]}</ID>

      <StringValue type="String">descendant-or-self::ElementType/text()</StringValue>

    </IGenericImo>

        <IGenericImo>

      <ID type="Oid">{[GenericImo(Id=2)]}</ID>

      <StringValue type="String">

        concat(concat(substring(translate(../text(), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", "0123456789"),1,string-length(translate(../text(), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", "0123456789"))-2),

                      translate(substring(translate(../text(), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", "0123456789"),string-length(translate(../text(), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", "0123456789"))-2,2),"0123456789","0000000000")),

               translate(substring(../text(),string-length(../text())-2), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", ""))

       </StringValue>

    </IGenericImo>

  </XpathEntries>



Let me know how it goes



Thanks

Suresh





From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Tuesday, March 15, 2011 12:18 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstraction - ANA Customization: Get Device Family - CRS



Cassio Luis Reis Gomes has created a new message in the forum "ANA Customization":

--------------------------------------------------------------
Hello Team,
I'm trying to get CRS Family using GetDeviceFamiliy.xml in AWB, but I can not see CRS family in the list.
Is there any other macro to support CRS Family?

Thanks
Cassio Gomes

--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ana/forums/-/message_boards/view_message/3171767>

or simply reply to this email.

Subject: RE: Get Device Family - CRS
Replied by: Cassio Luis Reis Gomes on 17-03-2011 02:43:32 AM
Hello Suresh,
The current xml file is already in this format that you sent to me, and it is not working properly to CRS Family.
do you have any other idea?

Thanks
Cassio

Subject: RE: Get Device Family - CRS
Replied by: Cassio Luis Reis Gomes on 17-03-2011 02:06:17 PM
Hello
I created a BQL and run it, please take a look in the output:

Recieved the result:
<?xml version="1.0" encoding="UTF-8"?>
<IManagedElement type="IManagedElement" instance_id="0">
  <ID type="Oid">{[ManagedElement(Key=CRS8-4-091)]}</ID>
  <CommunicationStateEnum type="Integer">3</CommunicationStateEnum>
  <DeviceName type="String">CRS8-4-091</DeviceName>
  <ElementCategoryEnum type="Integer">4</ElementCategoryEnum>
  <ElementType type="String">Cisco CRS8S</ElementType>
  <ElementTypeKey type="String">CISCO_CRS8S</ElementTypeKey>
  <IP type="com.sheer.types.IPAddress">172.17.9.1</IP>
  <InvestigationStateEnum type="Integer">11</InvestigationStateEnum>
  <SoftwareVersion type="String">3.9.2[00]</SoftwareVersion>
  <SysLocation type="String" />
  <SysName type="String">CRS8-4-091.embratel.net.br</SysName>
  <SysUpTime type="java.util.Date">Thu Jan 13 05:00:41 IST 2011</SysUpTime>
  <VendorEnum type="Integer">3</VendorEnum>
</IManagedElement>

Where should I apply the Xpath?
Thanks
Cassio Gomes

Subject: RE: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstrac
Replied by: Suresh Kalenahalli on 17-03-2011 12:38:24 PM
Did you mean the BQL Command I asked you to run does not return anything?

Please let me know



Thanks

Suresh



From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Wednesday, March 16, 2011 11:44 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstraction - ANA Customization: RE: Get Device Family - CRS



Cassio Luis Reis Gomes has created a new message in the forum "ANA Customization":

--------------------------------------------------------------
Hello Suresh,
The current xml file is already in this format that you sent to me, and it is not working properly to CRS Family.
do you have any other idea?

Thanks
Cassio
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ana/forums/-/message_boards/view_message/3186838>

or simply reply to this email.

Subject: RE: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstrac
Replied by: Sagaya Raj Vanathaian on 18-03-2011 03:52:44 AM
Hi Casio,
 
Can you try using the following XPATH Entries where replace the XPATH Entries related to CRS instead of the "ME-3400" Series mentioned below. This is snippet taken from "GetDeviceFamily3400_3750_4500" added as a attachment here.
Also if possible can you mentioned the actual Device String quite similar to ME 3400. So it can be replaced here.
 
<XpathEntries type="IMObjects_Array">
    <IGenericImo>
      <ID type="Oid">{[GenericImo(Id=1)]}</ID>
      <StringValue type="String">descendant-or-self::ElementType/text()</StringValue>
    </IGenericImo>
        <IGenericImo>
      <ID type="Oid">{[GenericImo(Id=2)]}</ID>
      <StringValue type="String">
        concat(concat(substring(../text(), string-length("Cisco Catalyst ") + 1, 2),
                      substring-before(substring-after(../text(), " ME-"),"00")),
               concat("00", translate(substring-after(../text(), " ME-3400"),"E0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ", "E")))
       </StringValue>
    </IGenericImo>
  </XpathEntries>
 
 
 

Hi Cassio,

I don¿t think NSA supports Cisco CRS8S device. Which service you are planning to use? Are you trying to customize to support CSR8S devices?



Basically the macro is implemented to return just numbers. For example, if the device ElementType is Cisco 7600 then macro returns 7600. In your case the device ElementType is Cisco CRS8S. My guess is that in this case macro is returning only 8. If you are planning customization to support any of the NSA services to support CRS8S then you need to customize the macro as well. Try the attached macro. It should return Cisco CRS8S as device family.



Note attached file is just an example to help you customize the macro. Save the copy of original file before changing it on the server. Please follow the NSA customization documentation to customize the macro.



Let me know



Thanks

Suresh



From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, March 17, 2011 11:06 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstraction - ANA Customization: RE: Get Device Family - CRS



Cassio Luis Reis Gomes has created a new message in the forum "ANA Customization":

--------------------------------------------------------------
Hello
I created a BQL and run it, please take a look in the output:

Recieved the result:
<?xml version="1.0" encoding="UTF-8"?>
<IManagedElement type="IManagedElement" instance_id="0">
<ID type="Oid">{[ManagedElement(Key=CRS8-4-091)]}</ID>
<CommunicationStateEnum type="Integer">3</CommunicationStateEnum>
<DeviceName type="String">CRS8-4-091</DeviceName>
<ElementCategoryEnum type="Integer">4</ElementCategoryEnum>
<ElementType type="String">Cisco CRS8S</ElementType>
<ElementTypeKey type="String">CISCO_CRS8S</ElementTypeKey>
<IP type="com.sheer.types.IPAddress">172.17.9.1</IP>
<InvestigationStateEnum type="Integer">11</InvestigationStateEnum>
<SoftwareVersion type="String">3.9.2[00]</SoftwareVersion>
<SysLocation type="String" />
<SysName type="String">CRS8-4-091.embratel.net.br</SysName>
<SysUpTime type="java.util.Date">Thu Jan 13 05:00:41 IST 2011</SysUpTime>
<VendorEnum type="Integer">3</VendorEnum>
</IManagedElement>

Where should I apply the Xpath?
Thanks
Cassio Gomes
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ana/forums/-/message_boards/view_message/3187857>

or simply reply to this email.

Subject: RE: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstrac
Replied by: Suresh Kalenahalli on 18-03-2011 12:27:24 AM
Hi Cassio,

I don¿t think NSA supports Cisco CRS8S device.  Which service you are planning to use? Are you trying to customize to support CSR8S devices?



Basically the macro is implemented to return just numbers. For example, if the device ElementType is Cisco 7600  then macro returns 7600. In your case the device ElementType is Cisco CRS8S.  My guess is that in this case macro is returning only 8.  If you are planning  customization to support any of the NSA services to support CRS8S then you need to customize the macro as well. Try the attached macro. It should return Cisco CRS8S as device family.



Note attached file is just an example to help you customize the macro. Save the copy of original file before changing it on the server. Please follow the NSA customization documentation to customize the macro.



Let me know



Thanks

Suresh



From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, March 17, 2011 11:06 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Cassio Luis Reis Gomes in Cisco Active Network Abstraction - ANA Customization: RE: Get Device Family - CRS



Cassio Luis Reis Gomes has created a new message in the forum "ANA Customization":

--------------------------------------------------------------
Hello
I created a BQL and run it, please take a look in the output:

Recieved the result:
<?xml version="1.0" encoding="UTF-8"?>
<IManagedElement type="IManagedElement" instance_id="0">
<ID type="Oid">{[ManagedElement(Key=CRS8-4-091)]}</ID>
<CommunicationStateEnum type="Integer">3</CommunicationStateEnum>
<DeviceName type="String">CRS8-4-091</DeviceName>
<ElementCategoryEnum type="Integer">4</ElementCategoryEnum>
<ElementType type="String">Cisco CRS8S</ElementType>
<ElementTypeKey type="String">CISCO_CRS8S</ElementTypeKey>
<IP type="com.sheer.types.IPAddress">172.17.9.1</IP>
<InvestigationStateEnum type="Integer">11</InvestigationStateEnum>
<SoftwareVersion type="String">3.9.2[00]</SoftwareVersion>
<SysLocation type="String" />
<SysName type="String">CRS8-4-091.embratel.net.br</SysName>
<SysUpTime type="java.util.Date">Thu Jan 13 05:00:41 IST 2011</SysUpTime>
<VendorEnum type="Integer">3</VendorEnum>
</IManagedElement>

Where should I apply the Xpath?
Thanks
Cassio Gomes
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/ana/forums/-/message_boards/view_message/3187857>

or simply reply to this email.
Content for Community-Ad
FusionCharts will render here
This widget could not be displayed.