netutils icon indicating copy to clipboard operation
netutils copied to clipboard

Command Mapper Functionality

Open jeffkala opened this issue 3 years ago • 1 comments

Environment

  • netutils version: Future

Proposed Functionality

Take a theoretical "check" on a service/configuration dataset and get back the command(s) reference based on the platform.

Use Case

As a network ops engineer or automation engineer its not always easy to take a theoretical "check" on a service/configuration dataset and get back the command reference based on the platform. It would be nice to be able to query a python function with a "model type" for example "vlan" or "l2_vlan" + a platform and return the command for that platform.

jeffkala avatar Dec 14 '22 18:12 jeffkala

Some chicken scratch from slack

>>> class BaseCommandClass:
...   model = None
...   os = None
...   command = None
...
>>> class IosVlan(BaseCommandClass):
...   model = "Vlan"
...   os = "cisco_ios"
...   command = "show vlan"
...
>>>

Additionally, can look into entry-points for this

itdependsnetworks avatar Dec 14 '22 19:12 itdependsnetworks