Skip to content

Conversation

karmoham
Copy link
Contributor

No description provided.

@karmoham karmoham requested review from jeaubin and simingy November 14, 2017 21:59
Copy link
Contributor

@simingy simingy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep this as metaparser_schema.py

and add one for cli/rest, and showcase the power of metaparser

parsing contexts. It provides a unified structure that will be followed
by different device connections (Ex: 'cli', 'yang', 'xml).

It addresses the common automation problems as:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It addresses common automation problems such as:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

def cli(self):

# Initialize dictionary
PYTHON_DICT = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name this result

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


class Parser(ParserSchema):

STRING = '''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe leave this as docstring header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to have it as a running example, I can't have it as a docstring.

# }
# }
# }
# } No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if name = 'main':
# give an example of running it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@simingy simingy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you committed a .pyc file

@simingy simingy merged commit a56c553 into master Nov 15, 2017
@simingy simingy deleted the Metaparser_example branch November 15, 2017 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants