DX NetOps

  • 1.  vnmsh

    Posted Oct 26, 2016 05:06 PM

    Hi Folks

     

    I am using vnmsh to query the database. What I would like is an AND function for multiple attribute value pairs

     ./seek -s attr=0x1000a,val=5 | ./seek -s attr=0x10e40,val=1
      ./seek -s attr=0x1000a,val=5 attr=0x10e40,val=1
      ./seek -s attr=0x1000a,val=5,attr=0x10e40,val=1

     

    I tried several combinations of the above but no luck........

     

    is this even doable. I'm looking for a Condition of suppressed (5) with the ifOperStatus of up (1)

    this is for all the devices in the DB



  • 2.  Re: vnmsh

    Posted Oct 26, 2016 07:21 PM

    Unfortunately you can only seek on attribute at a time. You should be able to script it to seek each attribute, save the results to individual files and then parse the files for duplicate model handles or names.

     

    Joe



  • 3.  Re: vnmsh
    Best Answer

    Broadcom Employee
    Posted Oct 26, 2016 09:12 PM

    Hi John,

     

    Another alternative is to use Web Services API, see here. You will have more flexibility to search models using that. You can create your own search XML file and submit the search request via Web Services API.

    You may want to utilize curl as command utility to submit the Web Services call.

     

    Regards,

    Widjaja



  • 4.  Re: vnmsh

    Posted Oct 28, 2016 12:48 PM

    good info

     

    is there any intro information on the rest api and how to use it?

    I have not tried it and any basic info would be helpful

     

    thanks



  • 5.  Re: vnmsh

    Broadcom Employee
    Posted Oct 30, 2016 07:20 PM


  • 6.  Re: vnmsh

    Posted Nov 01, 2016 10:23 AM

    Hi again

     

    great info, I am using it to get good info from Spectrum

    is there a way to get all attributes from a model? IE ?attr=* or the like

    I want the model to return all attributes



  • 7.  Re: vnmsh

    Posted Nov 01, 2016 10:26 AM

    ./show attributes mh=<MH> will display all the attributes for a single model.

     

    Joe



  • 8.  Re: vnmsh

    Posted Nov 01, 2016 12:30 PM

    oops

     

    I should have specified I want to do this via the web api not vnmsh.

    We are looking to use this interface.