Git Product home page Git Product logo

textfsm's People

Contributors

harro avatar

textfsm's Issues

Template file handed to the TextFSM should have their file pointer put to the top of the file.

What steps will reproduce the problem?
Take any pointer to a template file and reuse it with subsequent TextFSM() 
calls.

What is the expected output? What do you see instead?
Expected output would be nothing, instead get:
Missing state 'Start'.

Basically, you want to have one reference to a template as a module level 
constant:

# Read in textfsm template and have it parse the output.
TMP = open(os.path.join(PATH, 'some_template'))

If you were to do:
 re_table = textfsm.TextFSM(TMP)
 parse_results = re_table.ParseText(output_text)
 re_table = textfsm.TextFSM(TMP)
 parse_results = re_table.ParseText(output_text)

The second one would fail.  The reason being is that textfsm is not putting the 
file pointer back to the top of the file.  This means I need to move the file 
pointer back to the top each time.  This should be done inside textfsm.

Original issue reported on code.google.com by [email protected] on 8 Apr 2011 at 9:21

Transition to "End" state does not terminate processing of input lines

What steps will reproduce the problem?
Using the attached example files:
 textfsm.py exampletemplate exampleinput

What is the expected output?
FSM Table:
['IsOK', 'LineNo']
['OK', '1']
['OK', '2']

What do you see instead?
FSM Table:
['IsOK', 'LineNo']
['OK', '1']
['OK', '2']
['OK', '4']
['OK', '5']

What version of the product are you using? On what operating system?
textfsm 0.2.0, Ubuntu 10.04.4 LTS, x86_64, Python 2.6.5


TextFSMHowto mentions that "The End state is reserved and terminates processing
of input lines and does not execute the EOF state."
This doesn't seem to work. The exampletemplate file also contains my current
workaround, i.e. transition to a state "Foo" which has no rules, but while
faster it's not a real solution.

Original issue reported on code.google.com by [email protected] on 25 Apr 2012 at 1:20

Attachments:

No pypi entry; easy_install textfsm fails

What steps will reproduce the problem?
1.  Ensure you have the setuptools module installed
2.  On linux (either with sudo, or as root) type the following (remove 
quotes)... 'easy_install -U textfsm'
3.

Q: What is the expected output? What do you see instead?

A: Expected output should look something like this...

[mpenning@Bucksnort ~]$ sudo easy_install -U textfsm
Searching for textfsm
Reading http://pypi.python.org/simple/textfsm/
Reading http://code.google.com/p/textfsm/
Best match: textfsm 0.1.0
Downloading http://textfsm.googlecode.com/files/textfsm-0.1.0.tar.gz
Processing textfsm-0.1.0.tar.gz
Running textfsm-0.1.0/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-tfrQ7o/textfsm-0.1.0/egg-dist-tmp-cYw9dH
zip_safe flag not set; analyzing archive contents...
Adding textfsm 0.1.0 to easy-install.pth file

Installed /usr/lib/python2.5/site-packages/textfsm-0.1.0-2.5.egg
Processing dependencies for textfsm
Finished processing dependencies for textfsm
[mpenning@Bucksnort ~]$

However, the install will fail, because easy_install does not know where to 
find the tarball for the installer

Q: What version of the product are you using? On what operating system?

A: I hope to use 0.1.0 on linux... proceeding with a manual installation next.

Q: Please provide any additional information below.
A: Feel free to contact me via gmail if you would like more information.  User: 
penningtonthing

Original issue reported on code.google.com by [email protected] on 21 Mar 2011 at 10:40

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.