Last active
July 12, 2021 15:33
-
-
Save premchalmeti/dc5323e58948c41f9bda8dfa349b3efc to your computer and use it in GitHub Desktop.
admin CLI network file for clish parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema | |
http://clish.sourceforge.net/XMLSchema/clish.xsd"> | |
<!--=======================================================--> | |
<PTYPE name="STRING" | |
pattern="[^\-]+" | |
help="String"/> | |
<PTYPE name="IP_ADDR" | |
pattern="(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))" | |
help="IP address AAA.BBB.CCC.DDD where each part is in the range 0-255"/> | |
<!--=======================================================--> | |
<COMMAND name="network show" | |
help="Show currently added devices"> | |
<ACTION>network show</ACTION> | |
</COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device" | |
help="Device related commands"></COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device add"> | |
<PARAM name="device_name" ptype="STRING" help="Name of the device"></PARAM> | |
<PARAM name="device_ip" ptype="IP_ADDR" help="IP of the device"></PARAM> | |
<ACTION>network device add ${device_name} ${ip_addr}</ACTION> | |
</COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device list"> | |
<ACTION>network device list</ACTION> | |
</COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device configure"> | |
</COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device configure rename"> | |
<PARAM name="old_name" ptype="STRING" help="Current name of the device"></PARAM> | |
<PARAM name="new_name" ptype="STRING" help="New name of the device"></PARAM> | |
<ACTION>network device rename ${old_name} ${new_name}</ACTION> | |
</COMMAND> | |
<!--=======================================================--> | |
<COMMAND name="network device configure ip"> | |
<PARAM name="device_name" ptype="STRING" help="Name of the device"></PARAM> | |
<PARAM name="device_ip" ptype="IP_ADDR" help="IP of the device"></PARAM> | |
<ACTION>network device configure ip ${device_name} ${ip_addr}</ACTION> | |
</COMMAND> | |
</CLISH_MODULE> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment