- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Help with response map!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2010 07:51 PM
Hi,
I have the attached response map that I am trying to create. I have the following problem when i create the blokc response map.
- why i saw the error message in the Samples page.
- How can i get the multiple token in block responce map, for example, get the interface name from "via xe-11/1/0"
Manyt thanks for your help.
Solved! Go to Solution.
Re: Help with response map!
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2010 08:28 PM - last edited on 07-07-2010 08:29 PM
One of the problems is that your neighbor block appears multiple times, but for the block properties, you did not check "This block may appear multiple times"
You need to check it.
The next problem is that on the last line of your neighbor block, you're expecting "Secondary Tables: alex_", but the second time that this block appears in your response, that line became "Secondary Tables: Robin" . You need to make that word in your block to allow any content. But after trying that, I am seeing more errors, because there are other subtle things that differ between the first block and the second block in your response. This can get real tricky if you're trying to use one block to map to repeated blocks in your response.
You might be better off with pattern mapping if you only care about one specific token in the response.
Re: Help with response map!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2010 11:29 PM
Hi YujieL,
Thanks for your clarification, because of the same format appear many times, so i choosed the block mapping.
And i want to get the route distinguisher , route target, as paht and nexthop interface from the attached response. But they all had been split by some characters. Is there a way to set the "xe-11/0/0.16" to one token in the block mapping?
Re: Help with response map!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-08-2010 06:44 AM
You can define a custom parser that will match tokens of that form and they will then show up as one token instead of being split up.
To do this, switch to the custom parsers tab, define a new one with a regular expression that will match this type of token. Then switch back to your block maps, and click on the reparse blocks button to have iTest reparse your blocks with the new parsers.
Re: Help with response map!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-08-2010 03:52 PM
Another trick to make that as one token is to use "wild card token". what you can do is to replace the string:
xe-11/0/0/16 in your block with interface
Now you can select the "interface" as a token and set the property "wildcard" and give it a name. This technique does not need a custom parser to be built.
