Skip to content

Commit

Permalink
[Mellanox] [ECMP calculator] Add script usage and more information to…
Browse files Browse the repository at this point in the history
… script description in help option (#13493)

Add script usage and more information to script description being printed in help option.

- Why I did it
Missing information in script description in help option.

- How I did it
Expand script description and add script usage.

- How to verify it
Run the script with -h option.
  • Loading branch information
liorghub authored Jan 25, 2023
1 parent d84deaf commit 9a49aec
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,12 @@ def validate_packet_json(self, packet_json):
def main():
rc = 0
try:
parser = argparse.ArgumentParser(description="ECMP calculator")
parser.add_argument("-i", "--interface", required=True, help="Ingress interface")
parser.add_argument("-p", "--packet", required=True, help="Packet description")
parser = argparse.ArgumentParser(description="Calculate egress interface for the given packet being routed over ECMP",
usage="/usr/bin/ecmp_calc.py -i <ingress interface> -p <path to json>")
parser.add_argument("-i", "--interface", required=True, help="ingress interface")
parser.add_argument("-p", "--packet", required=True, help="json file describing a packet")
parser.add_argument("-v", "--vrf", help="VRF name")
parser.add_argument("-d", "--debug", default=False, action="store_true", help="Flag for debug")
parser.add_argument("-d", "--debug", default=False, action="store_true", help="when used, debug messages will be printed to stdout")
args = parser.parse_args()

ecmp_calc = EcmpCalc()
Expand Down

0 comments on commit 9a49aec

Please sign in to comment.