Enable scaffolding of cliconf and terminal plugin files#16
Enable scaffolding of cliconf and terminal plugin files#16GomathiselviS wants to merge 2 commits into
Conversation
Signed-off-by: GomathiselviS <gomathiselvi@gmail.com>
|
cc @NilashishC |
| @@ -0,0 +1,206 @@ | |||
| # -*- coding: utf-8 -*- | |||
There was a problem hiding this comment.
A lot of the code in this template is platform specific. IMO, we should only be adding methods that are marked as "abstractmethods" in CliconfBase and possibly keep a docstring and an empty definition to allow end users to understand what that method is meant to be and how they should implement it.
|
|
||
| def on_open_shell(self): | ||
| try: | ||
| for cmd in (b"terminal length 0", b"terminal width 512"): |
There was a problem hiding this comment.
The length and width values are not same across all platforms. Maybe we can specify what this method does in the method docstring and let the collection maintainers add the correct values.
| def __init__(self, *args, **kwargs): | ||
| super(Cliconf, self).__init__(*args, **kwargs) | ||
|
|
||
| @enable_mode |
There was a problem hiding this comment.
The enable privilege escalation is not valid across all platforms. Maybe we can skip this?
| import time | ||
| import re | ||
|
|
||
| from ansible.errors import AnsibleConnectionFailure |
There was a problem hiding this comment.
The CliconfBase has multiple abstractmethods defined. An subclass needs to implement all that else the cliconf object is not created. Can we add stubs for all those methods here?
Signed-off-by: GomathiselviS gomathiselvi@gmail.com
Fixes #11
This PR enables the scaffolding of cliconf and terminal plugin files via cli_rm_builder.