Created
May 20, 2020 16:46
-
-
Save h4ndzdatm0ld/16eddef5756733b513101a3cbcc48822 to your computer and use it in GitHub Desktop.
argparse example
This file contains 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
def get_arguments(): | |
parser = argparse.ArgumentParser(description='Command Line Driven Utility To Enable NETCONF\ | |
And MD-CLI on SROS Devices.') | |
parser.add_argument("-n", "--node", help="Target NODE IP", required=True) | |
parser.add_argument("-u", "--user", help="SSH Username", required=False, default='admin') | |
parser.add_argument("-p", "--port", help="NETCONF TCP Port", required=False, default='830') | |
args = parser.parse_args() | |
return args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment