Neutron Plugin Arguments unified to meet the neutron API

Now the following arguments are also available:

   --os-auth-url
   --os-username
   --os-password
   --os-tenant-name
   --os-enpdoint-type
   --http-timeout

Change-Id: I28a1e4f4289be79440f2d4b972f31ed506dc4b3c
This commit is contained in:
Juan Badia Payno 2016-07-29 13:16:54 +02:00 committed by Robert Putt
parent 4d455249de
commit e44aa3df1b
1 changed files with 42 additions and 12 deletions

View File

@ -197,41 +197,71 @@ def fip_type(string):
def _check_neutron_floating_ip():
parser = argparse.ArgumentParser(
description="""Check an Floating ip creation. Note that it is """
"""able to delete *all* floating ips from a account, """
"""so ensure that nothing important is running on """
"""the specified account.""")
parser.add_argument('--auth_url', metavar='URL', type=str,
default=os.getenv('OS_AUTH_URL'),
help='Keystone URL')
description='Check an Floating ip creation. Note that it is able '
+ 'to delete *all* floating ips from a account, so '
+ 'ensure that nothing important is running on the '
+ 'specified account.',
conflict_handler='resolve')
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'),
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'),
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'),
help='tenant name to use for authentication')
parser.add_argument('--endpoint_url', metavar='endpoint_url', type=str,
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",
help="""Endpoint type in the catalog request. """
"""Public by default.""")
parser.add_argument('--force_delete', action='store_true',
help="""If matching floating ip are found, delete """
"""them and add a notification in the message"""
""" instead of getting out in critical """
"""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,
help="""Max number of second to create/delete a """
"""floating ip (120 by default).""")