Skip to content

Instantly share code, notes, and snippets.

@itsmemattchung
Created July 2, 2014 23:26
Show Gist options
  • Save itsmemattchung/e321ebf57e589f88382c to your computer and use it in GitHub Desktop.
Save itsmemattchung/e321ebf57e589f88382c to your computer and use it in GitHub Desktop.
def main(args):
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
parser_add_device = subparsers.add_parser(
'add-device', help="Add host sub-command")
parser_add_device.add_argument(
'--host', action='store', dest='host',
help="Hostname of Zenoss Server")
parser_add_device.add_argument(
'--username', action='store', dest='username')
parser_add_device.add_argument(
'--password', action='store', dest='password')
parser_add_device.add_argument(
'--device-name', action='store', dest='device-name')
parser_add_device.add_argument(
'--device-class', action='store', dest='device-class')
cli_args = parser.parse_args()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment