Merge "Neutron Plugin Arguments unified to meet the neutron API"

This commit is contained in:
Jenkins 2016-11-05 01:13:00 +00:00 committed by Gerrit Code Review
commit 3a69560ef3
1 changed files with 42 additions and 12 deletions

View File

@ -197,41 +197,71 @@ def fip_type(string):
def _check_neutron_floating_ip(): def _check_neutron_floating_ip():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="""Check an Floating ip creation. Note that it is """ description='Check an Floating ip creation. Note that it is able '
"""able to delete *all* floating ips from a account, """ + 'to delete *all* floating ips from a account, so '
"""so ensure that nothing important is running on """ + 'ensure that nothing important is running on the '
"""the specified account.""") + 'specified account.',
parser.add_argument('--auth_url', metavar='URL', type=str, conflict_handler='resolve')
default=os.getenv('OS_AUTH_URL'),
help='Keystone URL')
parser.add_argument('--username', metavar='username', type=str, parser.add_argument('--auth_url','--os-auth-url', metavar='URL', type=str,
default=os.getenv('OS_AUTH_URL'),
help='url to use for authetication (Deprecated)')
parser.add_argument('--os-auth-url', dest='auth_url', type=str,
default=os.getenv('OS_AUTH_URL'),
help='url to use for authetication')
parser.add_argument('--username','--os-username', metavar='username', type=str,
default=os.getenv('OS_USERNAME'),
help='username to use for authentication (Deprecated)')
parser.add_argument('--os-username',dest='username' ,type=str,
default=os.getenv('OS_USERNAME'), default=os.getenv('OS_USERNAME'),
help='username to use for authentication') help='username to use for authentication')
parser.add_argument('--password', metavar='password', type=str, parser.add_argument('--password','--os-password', metavar='password', type=str,
default=os.getenv('OS_PASSWORD'),
help='password to use for authentication (Deprecated)')
parser.add_argument('--os-password', dest='password', type=str,
default=os.getenv('OS_PASSWORD'), default=os.getenv('OS_PASSWORD'),
help='password to use for authentication') help='password to use for authentication')
parser.add_argument('--tenant', metavar='tenant', type=str, parser.add_argument('--tenant','--os-tenant-name', metavar='tenant', type=str,
default=os.getenv('OS_TENANT_NAME'),
help='tenant name to use for authentication (Deprecated)')
parser.add_argument('--os-tenant-name', dest='tenant', type=str,
default=os.getenv('OS_TENANT_NAME'), default=os.getenv('OS_TENANT_NAME'),
help='tenant name to use for authentication') help='tenant name to use for authentication')
parser.add_argument('--endpoint_url', metavar='endpoint_url', type=str, parser.add_argument('--endpoint_url', metavar='endpoint_url', type=str,
help='Override the catalog endpoint.') help='Override the catalog endpoint.')
parser.add_argument('--endpoint_type', metavar='endpoint_type', type=str, parser.add_argument('--endpoint_type','--os-endpoint-type', metavar='endpoint_type', type=str,
default="publicURL",
help='Endpoint type in the catalog request. '
+ 'Public by default. (Deprecated)')
parser.add_argument('--os-enpdoint-type', dest='endpoint_type', type=str,
default="publicURL", default="publicURL",
help="""Endpoint type in the catalog request. """ help="""Endpoint type in the catalog request. """
"""Public by default.""") """Public by default.""")
parser.add_argument('--force_delete', action='store_true', parser.add_argument('--force_delete', action='store_true',
help="""If matching floating ip are found, delete """ help="""If matching floating ip are found, delete """
"""them and add a notification in the message""" """them and add a notification in the message"""
""" instead of getting out in critical """ """ instead of getting out in critical """
"""state.""") """state.""")
parser.add_argument('--timeout', metavar='timeout', type=int, parser.add_argument('--timeout','--http-timeout', metavar='timeout', type=int,
default=120,
help='Max number of second to create/delete a '
+ 'floating ip (120 by default). (Deprecated)')
parser.add_argument('--http-timeout', dest='timeout', type=int,
default=120, default=120,
help="""Max number of second to create/delete a """ help="""Max number of second to create/delete a """
"""floating ip (120 by default).""") """floating ip (120 by default).""")