def get_parser(self, prog_name):
     parser = super(MatchProfiles, self).get_parser(prog_name)
     parser.add_argument(
         '--dry-run',
         action='store_true',
         default=False,
         help=_('Only run validations, but do not apply any changes.'))
     utils.add_deployment_plan_arguments(parser)
     return parser
 def get_parser(self, prog_name):
     parser = super(MatchProfiles, self).get_parser(prog_name)
     parser.add_argument(
         '--dry-run',
         action='store_true',
         default=False,
         help=_('Only run validations, but do not apply any changes.')
     )
     utils.add_deployment_plan_arguments(parser)
     return parser
 def get_parser(self, prog_name):
     parser = super(ListProfiles, self).get_parser(prog_name)
     parser.add_argument(
         '--all',
         action='store_true',
         default=False,
         help=_('List all nodes, even those not available to Nova.')
     )
     utils.add_deployment_plan_arguments(parser)
     return parser
    def get_parser(self, prog_name):
        # add_help doesn't work properly, set it to False:
        parser = argparse.ArgumentParser(description=self.get_description(),
                                         prog=prog_name,
                                         add_help=False)
        parser.add_argument(
            '--templates',
            nargs='?',
            const=constants.TRIPLEO_HEAT_TEMPLATES,
            help=_("The directory containing the Heat templates to deploy"),
        )
        parser.add_argument('--stack',
                            help=_("Stack name to create or update"),
                            default='overcloud')
        parser.add_argument('-t',
                            '--timeout',
                            metavar='<TIMEOUT>',
                            type=int,
                            default=240,
                            help=_('Deployment timeout in minutes.'))
        utils.add_deployment_plan_arguments(parser)
        parser.add_argument('--neutron-flat-networks',
                            help=_('Comma separated list of physical_network '
                                   'names with which flat networks can be '
                                   'created. Use * to allow flat networks '
                                   'with arbitrary physical_network names. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-physical-bridge', help=_('Deprecated.'))
        parser.add_argument('--neutron-bridge-mappings',
                            help=_('Comma separated list of bridge mappings. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-public-interface',
                            help=_('Deprecated.'))
        parser.add_argument('--neutron-network-type',
                            help=_('The network type for tenant networks. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-tunnel-types',
                            help=_('Network types supported by the agent '
                                   '(gre and/or vxlan). '
                                   '(DEPRECATED)'))
        parser.add_argument(
            '--neutron-tunnel-id-ranges',
            help=_("Ranges of GRE tunnel IDs to make "
                   "available for tenant network allocation "
                   "(DEPRECATED)"),
        )
        parser.add_argument(
            '--neutron-vni-ranges',
            help=_("Ranges of VXLAN VNI IDs to make "
                   "available for tenant network allocation "
                   "(DEPRECATED)"),
        )
        parser.add_argument('--neutron-disable-tunneling',
                            dest='neutron_disable_tunneling',
                            action="store_const",
                            const=True,
                            help=_('Disables tunneling. (DEPRECATED)')),
        parser.add_argument('--neutron-network-vlan-ranges',
                            help=_('Comma separated list of '
                                   '<physical_network>:<vlan_min>:<vlan_max> '
                                   'or <physical_network> specifying '
                                   'physical_network names usable for VLAN '
                                   'provider and tenant networks, as well as '
                                   'ranges of VLAN tags on each available for '
                                   'allocation to tenant networks. '
                                   '(ex: datacentre:1:1000) (DEPRECATED)'))
        parser.add_argument('--neutron-mechanism-drivers',
                            help=_('An ordered list of extension driver '
                                   'entrypoints to be loaded from the '
                                   'neutron.ml2.extension_drivers namespace. '
                                   '(DEPRECATED)'))
        parser.add_argument('--libvirt-type',
                            choices=['kvm', 'qemu'],
                            help=_('Libvirt domain type.'))
        parser.add_argument('--ntp-server',
                            help=_('The NTP for overcloud nodes. '))
        parser.add_argument(
            '--no-proxy',
            default=os.environ.get('no_proxy', ''),
            help=_('A comma separated list of hosts that should not be '
                   'proxied.'))
        parser.add_argument('--overcloud-ssh-user',
                            default='heat-admin',
                            help=_('User for ssh access to overcloud nodes'))
        parser.add_argument(
            '-e',
            '--environment-file',
            metavar='<HEAT ENVIRONMENT FILE>',
            action='append',
            dest='environment_files',
            help=_('Environment files to be passed to the heat stack-create '
                   'or heat stack-update command. (Can be specified more than '
                   'once.)'))
        parser.add_argument(
            '--environment-directory',
            metavar='<HEAT ENVIRONMENT DIRECTORY>',
            action='append',
            dest='environment_directories',
            default=[
                os.path.join(os.environ.get('HOME', ''), '.tripleo',
                             'environments')
            ],
            help=_('Environment file directories that are automatically '
                   ' added to the heat stack-create or heat stack-update'
                   ' commands. Can be specified more than once. Files in'
                   ' directories are loaded in ascending sort order.'))
        parser.add_argument(
            '--validation-errors-fatal',
            action='store_true',
            default=False,
            help=_('Exit if there are errors from the configuration '
                   'pre-checks. Ignoring these errors will likely cause your '
                   'deploy to fail.'))
        parser.add_argument(
            '--validation-warnings-fatal',
            action='store_true',
            default=False,
            help=_('Exit if there are warnings from the configuration '
                   'pre-checks.'))
        parser.add_argument(
            '--dry-run',
            action='store_true',
            default=False,
            help=_('Only run validations, but do not apply any changes.'))
        reg_group = parser.add_argument_group('Registration Parameters')
        reg_group.add_argument(
            '--rhel-reg',
            action='store_true',
            help=_('Register overcloud nodes to the customer portal or a '
                   'satellite.'))
        reg_group.add_argument(
            '--reg-method',
            choices=['satellite', 'portal'],
            default='satellite',
            help=_('RHEL registration method to use for the overcloud nodes.'))
        reg_group.add_argument(
            '--reg-org',
            default='',
            help=_('Organization key to use for registration.'))
        reg_group.add_argument(
            '--reg-force',
            action='store_true',
            help=_('Register the system even if it is already registered.'))
        reg_group.add_argument(
            '--reg-sat-url',
            default='',
            help=_('Satellite server to register overcloud nodes.'))
        reg_group.add_argument(
            '--reg-activation-key',
            default='',
            help=_('Activation key to use for registration.'))
        parser.add_argument(
            '--answers-file',
            help=_('Path to a YAML file with arguments and parameters.'))

        return parser
 def get_parser(self, prog_name):
     # add_help doesn't work properly, set it to False:
     parser = argparse.ArgumentParser(description=self.get_description(),
                                      prog=prog_name,
                                      add_help=False)
     parser.add_argument(
         '--templates',
         nargs='?',
         const=constants.TRIPLEO_HEAT_TEMPLATES,
         help=_("The directory containing the Heat templates to deploy"),
     )
     parser.add_argument('--stack',
                         help=_("Stack name to create or update"),
                         default='overcloud')
     parser.add_argument('--timeout',
                         '-t',
                         metavar='<TIMEOUT>',
                         type=int,
                         default=240,
                         help=_('Deployment timeout in minutes.'))
     utils.add_deployment_plan_arguments(parser, mark_as_depr=True)
     parser.add_argument('--libvirt-type',
                         choices=['kvm', 'qemu'],
                         help=_('Libvirt domain type.'))
     parser.add_argument('--ntp-server',
                         help=_('The NTP for overcloud nodes. '))
     parser.add_argument(
         '--no-proxy',
         default=os.environ.get('no_proxy', ''),
         help=_('A comma separated list of hosts that should not be '
                'proxied.'))
     parser.add_argument('--overcloud-ssh-user',
                         default='heat-admin',
                         help=_('User for ssh access to overcloud nodes'))
     parser.add_argument(
         '--overcloud-ssh-key',
         help=_('Key path for ssh access to overcloud nodes.'))
     parser.add_argument(
         '--environment-file',
         '-e',
         metavar='<HEAT ENVIRONMENT FILE>',
         action='append',
         dest='environment_files',
         help=_('Environment files to be passed to the heat stack-create '
                'or heat stack-update command. (Can be specified more than '
                'once.)'))
     parser.add_argument(
         '--environment-directory',
         metavar='<HEAT ENVIRONMENT DIRECTORY>',
         action='append',
         dest='environment_directories',
         default=[os.path.expanduser(constants.DEFAULT_ENV_DIRECTORY)],
         help=_('Environment file directories that are automatically '
                ' added to the heat stack-create or heat stack-update'
                ' commands. Can be specified more than once. Files in'
                ' directories are loaded in ascending sort order.'))
     parser.add_argument(
         '--roles-file',
         '-r',
         dest='roles_file',
         help=_('Roles file, overrides the default %s in the --templates '
                'directory') % constants.OVERCLOUD_ROLES_FILE)
     parser.add_argument(
         '--networks-file',
         '-n',
         dest='networks_file',
         help=_('Networks file, overrides the default %s in the '
                '--templates directory') %
         constants.OVERCLOUD_NETWORKS_FILE)
     parser.add_argument(
         '--plan-environment-file',
         '-p',
         help=_('Plan Environment file, overrides the default %s in the '
                '--templates directory') % constants.PLAN_ENVIRONMENT)
     parser.add_argument(
         '--no-cleanup',
         action='store_true',
         help=_('Don\'t cleanup temporary files, just log their location'))
     parser.add_argument(
         '--update-plan-only',
         action='store_true',
         help=_('Only update the plan. Do not perform the actual '
                'deployment. NOTE: Will move to a discrete command  in a '
                'future release.'))
     parser.add_argument(
         '--validation-errors-nonfatal',
         dest='validation_errors_fatal',
         action='store_false',
         default=True,
         help=_('Allow the deployment to continue in spite of validation '
                'errors. Note that attempting deployment while errors '
                'exist is likely to fail.'))
     parser.add_argument(
         '--validation-warnings-fatal',
         action='store_true',
         default=False,
         help=_('Exit if there are warnings from the configuration '
                'pre-checks.'))
     parser.add_argument(
         '--disable-validations',
         action='store_true',
         default=False,
         help=_('Disable the pre-deployment validations entirely. These '
                'validations are the built-in pre-deployment validations. '
                'To enable external validations from tripleo-validations, '
                'use the --run-validations flag.'))
     parser.add_argument(
         '--dry-run',
         action='store_true',
         default=False,
         help=_('Only run validations, but do not apply any changes.'))
     parser.add_argument(
         '--run-validations',
         action='store_true',
         default=False,
         help=_('Run external validations from the tripleo-validations '
                'project.'))
     parser.add_argument(
         '--skip-postconfig',
         action='store_true',
         default=False,
         help=_('Skip the overcloud post-deployment configuration.'))
     parser.add_argument(
         '--force-postconfig',
         action='store_true',
         default=False,
         help=_('Force the overcloud post-deployment configuration.'))
     parser.add_argument(
         '--skip-deploy-identifier',
         action='store_true',
         default=False,
         help=_('Skip generation of a unique identifier for the '
                'DeployIdentifier parameter. The software configuration '
                'deployment steps will only be triggered if there is an '
                'actual change to the configuration. This option should '
                'be used with Caution, and only if there is confidence '
                'that the software configuration does not need to be '
                'run, such as when scaling out certain roles.'))
     reg_group = parser.add_argument_group('Registration Parameters')
     reg_group.add_argument(
         '--rhel-reg',
         action='store_true',
         help=_('Register overcloud nodes to the customer portal or a '
                'satellite.'))
     reg_group.add_argument(
         '--reg-method',
         choices=['satellite', 'portal'],
         default='satellite',
         help=_('RHEL registration method to use for the overcloud nodes.'))
     reg_group.add_argument(
         '--reg-org',
         default='',
         help=_('Organization key to use for registration.'))
     reg_group.add_argument(
         '--reg-force',
         action='store_true',
         help=_('Register the system even if it is already registered.'))
     reg_group.add_argument(
         '--reg-sat-url',
         default='',
         help=_('Satellite server to register overcloud nodes.'))
     reg_group.add_argument(
         '--reg-activation-key',
         default='',
         help=_('Activation key to use for registration.'))
     parser.add_argument(
         '--answers-file',
         help=_('Path to a YAML file with arguments and parameters.'))
     parser.add_argument('--disable-password-generation',
                         action='store_true',
                         default=False,
                         help=_('Disable password generation.'))
     parser.add_argument(
         '--deployed-server',
         action='store_true',
         default=False,
         help=_('Use pre-provisioned overcloud nodes. Removes baremetal,'
                'compute and image services requirements from the'
                'undercloud node. Must only be used with the'
                '--disable-validations.'))
     parser.add_argument(
         '--config-download',
         action='store_true',
         default=False,
         help=_('Run deployment via config-download mechanism'))
     parser.add_argument(
         '--output-dir',
         action='store',
         default=None,
         help=_('Directory to use for saved output when using '
                '--config-download. The directory must be '
                'writeable by the mistral user. When not '
                'specified, the default server side value '
                'will be used (/var/lib/mistral/<execution id>.'))
     return parser
 def get_parser(self, prog_name):
     # add_help doesn't work properly, set it to False:
     parser = argparse.ArgumentParser(
         description=self.get_description(),
         prog=prog_name,
         add_help=False
     )
     parser.add_argument(
         '--templates', nargs='?', const=constants.TRIPLEO_HEAT_TEMPLATES,
         help=_("The directory containing the Heat templates to deploy"),
     )
     parser.add_argument('--stack',
                         help=_("Stack name to create or update"),
                         default='overcloud')
     parser.add_argument('--timeout', '-t', metavar='<TIMEOUT>',
                         type=int, default=240,
                         help=_('Deployment timeout in minutes.'))
     utils.add_deployment_plan_arguments(parser, mark_as_depr=True)
     parser.add_argument('--libvirt-type',
                         choices=['kvm', 'qemu'],
                         help=_('Libvirt domain type.'))
     parser.add_argument('--ntp-server',
                         help=_('The NTP for overcloud nodes. '))
     parser.add_argument(
         '--no-proxy',
         default=os.environ.get('no_proxy', ''),
         help=_('A comma separated list of hosts that should not be '
                'proxied.')
     )
     parser.add_argument(
         '--overcloud-ssh-user',
         default='heat-admin',
         help=_('User for ssh access to overcloud nodes')
     )
     parser.add_argument(
         '--overcloud-ssh-key',
         default=None,
         help=_('Key path for ssh access to overcloud nodes. When'
                'undefined the key will be autodetected.')
     )
     parser.add_argument(
         '--overcloud-ssh-network',
         help=_('Network name to use for ssh access to overcloud nodes.'),
         default='ctlplane'
     )
     parser.add_argument(
         '--overcloud-ssh-enable-timeout',
         help=_('This option no longer has any effect.'),
         type=int,
         default=constants.ENABLE_SSH_ADMIN_TIMEOUT
     )
     parser.add_argument(
         '--overcloud-ssh-port-timeout',
         help=_('Timeout for the ssh port to become active.'),
         type=int,
         default=constants.ENABLE_SSH_ADMIN_SSH_PORT_TIMEOUT
     )
     parser.add_argument(
         '--environment-file', '-e', metavar='<HEAT ENVIRONMENT FILE>',
         action='append', dest='environment_files',
         help=_('Environment files to be passed to the heat stack-create '
                'or heat stack-update command. (Can be specified more than '
                'once.)')
     )
     parser.add_argument(
         '--environment-directory', metavar='<HEAT ENVIRONMENT DIRECTORY>',
         action='append', dest='environment_directories',
         default=[os.path.expanduser(constants.DEFAULT_ENV_DIRECTORY)],
         help=_('Environment file directories that are automatically '
                ' added to the heat stack-create or heat stack-update'
                ' commands. Can be specified more than once. Files in'
                ' directories are loaded in ascending sort order.')
     )
     parser.add_argument(
         '--roles-file', '-r', dest='roles_file',
         help=_('Roles file, overrides the default %s in the --templates '
                'directory. May be an absolute path or the path relative '
                ' to --templates') % constants.OVERCLOUD_ROLES_FILE
     )
     parser.add_argument(
         '--networks-file', '-n', dest='networks_file',
         help=_('Networks file, overrides the default %s in the '
                '--templates directory') % constants.OVERCLOUD_NETWORKS_FILE
     )
     parser.add_argument(
         '--plan-environment-file', '-p',
         help=_('Plan Environment file, overrides the default %s in the '
                '--templates directory') % constants.PLAN_ENVIRONMENT
     )
     parser.add_argument(
         '--no-cleanup', action='store_true',
         help=_('Don\'t cleanup temporary files, just log their location')
     )
     parser.add_argument(
         '--update-plan-only',
         action='store_true',
         help=_('Only update the plan. Do not perform the actual '
                'deployment. NOTE: Will move to a discrete command  in a '
                'future release.')
     )
     parser.add_argument(
         '--validation-errors-nonfatal',
         dest='validation_errors_fatal',
         action='store_false',
         default=True,
         help=_('Allow the deployment to continue in spite of validation '
                'errors. Note that attempting deployment while errors '
                'exist is likely to fail.')
     )
     parser.add_argument(
         '--validation-warnings-fatal',
         action='store_true',
         default=False,
         help=_('Exit if there are warnings from the configuration '
                'pre-checks.')
     )
     parser.add_argument(
         '--disable-validations',
         action='store_true',
         default=False,
         help=_('DEPRECATED. Disable the pre-deployment validations '
                'entirely. These validations are the built-in '
                'pre-deployment validations. To enable external '
                'validations from tripleo-validations, '
                'use the --run-validations flag. These validations are '
                'now run via the external validations in '
                'tripleo-validations.'))
     parser.add_argument(
         '--inflight-validations',
         action='store_true',
         default=False,
         dest='inflight',
         help=_('Activate in-flight validations during the deploy. '
                'In-flight validations provide a robust way to ensure '
                'deployed services are running right after their '
                'activation. Defaults to False.')
     )
     parser.add_argument(
         '--dry-run',
         action='store_true',
         default=False,
         help=_('Only run validations, but do not apply any changes.')
     )
     parser.add_argument(
         '--run-validations',
         action='store_true',
         default=False,
         help=_('Run external validations from the tripleo-validations '
                'project.'))
     parser.add_argument(
         '--skip-postconfig',
         action='store_true',
         default=False,
         help=_('Skip the overcloud post-deployment configuration.')
     )
     parser.add_argument(
         '--force-postconfig',
         action='store_true',
         default=False,
         help=_('Force the overcloud post-deployment configuration.')
     )
     parser.add_argument(
         '--skip-deploy-identifier',
         action='store_true',
         default=False,
         help=_('Skip generation of a unique identifier for the '
                'DeployIdentifier parameter. The software configuration '
                'deployment steps will only be triggered if there is an '
                'actual change to the configuration. This option should '
                'be used with Caution, and only if there is confidence '
                'that the software configuration does not need to be '
                'run, such as when scaling out certain roles.')
     )
     parser.add_argument(
         '--answers-file',
         help=_('Path to a YAML file with arguments and parameters.')
     )
     parser.add_argument(
         '--disable-password-generation',
         action='store_true',
         default=False,
         help=_('Disable password generation.')
     )
     parser.add_argument(
         '--deployed-server',
         action='store_true',
         default=False,
         help=_('Use pre-provisioned overcloud nodes. Removes baremetal,'
                'compute and image services requirements from the'
                'undercloud node. Must only be used with the'
                '--disable-validations.')
     )
     parser.add_argument(
         '--config-download',
         action='store_true',
         default=True,
         help=_('Run deployment via config-download mechanism. This is '
                'now the default, and this CLI options may be removed in '
                'the future.')
     )
     parser.add_argument(
         '--no-config-download',
         '--stack-only',
         action='store_false',
         default=False,
         dest='config_download',
         help=_('Disable the config-download workflow and only create '
                'the stack and associated OpenStack resources. No '
                'software configuration will be applied.')
     )
     parser.add_argument(
         '--config-download-only',
         action='store_true',
         default=False,
         help=_('Disable the stack create/update, and only run the '
                'config-download workflow to apply the software '
                'configuration.')
     )
     parser.add_argument(
         '--output-dir',
         action='store',
         default=None,
         help=_('Directory to use for saved output when using '
                '--config-download. When not '
                'specified, $HOME/config-download will be used.')
     )
     parser.add_argument(
         '--override-ansible-cfg',
         action='store',
         default=None,
         help=_('Path to ansible configuration file. The configuration '
                'in the file will override any configuration used by '
                'config-download by default.')
     )
     parser.add_argument(
         '--config-download-timeout',
         action='store',
         type=int,
         default=None,
         help=_('Timeout (in minutes) to use for config-download steps. If '
                'unset, will default to however much time is leftover '
                'from the --timeout parameter after the stack operation.')
     )
     parser.add_argument('--deployment-python-interpreter', default=None,
                         help=_('The path to python interpreter to use for '
                                'the deployment actions. This may need to '
                                'be used if deploying on a python2 host '
                                'from a python3 system or vice versa.'))
     parser.add_argument('-b', '--baremetal-deployment',
                         metavar='<baremetal_deployment.yaml>',
                         help=_('Configuration file describing the '
                                'baremetal deployment'))
     parser.add_argument(
         '--limit',
         action='store',
         default=None,
         help=_("A string that identifies a single node or comma-separated"
                "list of nodes the config-download Ansible playbook "
                "execution will be limited to. For example: --limit"
                " \"compute-0,compute-1,compute-5\".")
     )
     parser.add_argument(
         '--tags',
         action='store',
         default=None,
         help=_('A list of tags to use when running the the config-download'
                ' ansible-playbook command.')
     )
     parser.add_argument(
         '--skip-tags',
         action='store',
         default=None,
         help=_('A list of tags to skip when running the the'
                ' config-download ansible-playbook command.')
     )
     return parser
    def get_parser(self, prog_name):
        # add_help doesn't work properly, set it to False:
        parser = argparse.ArgumentParser(
            description=self.get_description(),
            prog=prog_name,
            add_help=False
        )
        parser.add_argument(
            '--templates', nargs='?', const=constants.TRIPLEO_HEAT_TEMPLATES,
            help=_("The directory containing the Heat templates to deploy"),
        )
        parser.add_argument('--stack',
                            help=_("Stack name to create or update"),
                            default='overcloud')
        parser.add_argument('--timeout', '-t', metavar='<TIMEOUT>',
                            type=int, default=240,
                            help=_('Deployment timeout in minutes.'))
        utils.add_deployment_plan_arguments(parser, mark_as_depr=True)
        parser.add_argument('--libvirt-type',
                            choices=['kvm', 'qemu'],
                            help=_('Libvirt domain type.'))
        parser.add_argument('--ntp-server',
                            help=_('The NTP for overcloud nodes. '))
        parser.add_argument(
            '--no-proxy',
            default=os.environ.get('no_proxy', ''),
            help=_('A comma separated list of hosts that should not be '
                   'proxied.')
        )
        parser.add_argument(
            '--overcloud-ssh-user',
            default='heat-admin',
            help=_('User for ssh access to overcloud nodes')
        )
        parser.add_argument(
            '--environment-file', '-e', metavar='<HEAT ENVIRONMENT FILE>',
            action='append', dest='environment_files',
            help=_('Environment files to be passed to the heat stack-create '
                   'or heat stack-update command. (Can be specified more than '
                   'once.)')
        )
        parser.add_argument(
            '--environment-directory', metavar='<HEAT ENVIRONMENT DIRECTORY>',
            action='append', dest='environment_directories',
            default=[os.path.join(os.environ.get('HOME', ''), '.tripleo',
                     'environments')],
            help=_('Environment file directories that are automatically '
                   ' added to the heat stack-create or heat stack-update'
                   ' commands. Can be specified more than once. Files in'
                   ' directories are loaded in ascending sort order.')
        )
        parser.add_argument(
            '--roles-file', '-r', dest='roles_file',
            help=_('Roles file, overrides the default %s in the --templates '
                   'directory') % constants.OVERCLOUD_ROLES_FILE
        )
        parser.add_argument(
            '--no-cleanup', action='store_true',
            help=_('Don\'t cleanup temporary files, just log their location')
        )
        parser.add_argument(
            '--update-plan-only',
            action='store_true',
            help=_('Only update the plan. Do not perform the actual '
                   'deployment. NOTE: Will move to a discrete command  in a '
                   'future release.')
        )
        parser.add_argument(
            '--validation-errors-nonfatal',
            dest='validation_errors_fatal',
            action='store_false',
            default=True,
            help=_('Allow the deployment to continue in spite of validation '
                   'errors. Note that attempting deployment while errors '
                   'exist is likely to fail.')
        )
        parser.add_argument(
            '--validation-warnings-fatal',
            action='store_true',
            default=False,
            help=_('Exit if there are warnings from the configuration '
                   'pre-checks.')
        )
        parser.add_argument(
            '--dry-run',
            action='store_true',
            default=False,
            help=_('Only run validations, but do not apply any changes.')
        )
        parser.add_argument(
            '--skip-postconfig',
            action='store_true',
            default=False,
            help=_('Skip the overcloud post-deployment configuration.')
        )
        parser.add_argument(
            '--force-postconfig',
            action='store_true',
            default=False,
            help=_('Force the overcloud post-deployment configuration.')
        )
        reg_group = parser.add_argument_group('Registration Parameters')
        reg_group.add_argument(
            '--rhel-reg',
            action='store_true',
            help=_('Register overcloud nodes to the customer portal or a '
                   'satellite.')
        )
        reg_group.add_argument(
            '--reg-method',
            choices=['satellite', 'portal'],
            default='satellite',
            help=_('RHEL registration method to use for the overcloud nodes.')
        )
        reg_group.add_argument(
            '--reg-org',
            default='',
            help=_('Organization key to use for registration.')
        )
        reg_group.add_argument(
            '--reg-force',
            action='store_true',
            help=_('Register the system even if it is already registered.')
        )
        reg_group.add_argument(
            '--reg-sat-url',
            default='',
            help=_('Satellite server to register overcloud nodes.')
        )
        reg_group.add_argument(
            '--reg-activation-key',
            default='',
            help=_('Activation key to use for registration.')
        )
        parser.add_argument(
            '--answers-file',
            help=_('Path to a YAML file with arguments and parameters.')
        )

        return parser
    def get_parser(self, prog_name):
        # add_help doesn't work properly, set it to False:
        parser = argparse.ArgumentParser(
            description=self.get_description(),
            prog=prog_name,
            add_help=False
        )
        parser.add_argument(
            '--templates', nargs='?', const=constants.TRIPLEO_HEAT_TEMPLATES,
            help=_("The directory containing the Heat templates to deploy"),
            required=True
        )
        parser.add_argument('--stack',
                            help=_("Stack name to create or update"),
                            default='overcloud')
        parser.add_argument('-t', '--timeout', metavar='<TIMEOUT>',
                            type=int, default=240,
                            help=_('Deployment timeout in minutes.'))
        utils.add_deployment_plan_arguments(parser)
        parser.add_argument('--neutron-flat-networks',
                            help=_('Comma separated list of physical_network '
                                   'names with which flat networks can be '
                                   'created. Use * to allow flat networks '
                                   'with arbitrary physical_network names. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-physical-bridge',
                            help=_('Deprecated.'))
        parser.add_argument('--neutron-bridge-mappings',
                            help=_('Comma separated list of bridge mappings. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-public-interface',
                            help=_('Deprecated.'))
        parser.add_argument('--neutron-network-type',
                            help=_('The network type for tenant networks. '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-tunnel-types',
                            help=_('Network types supported by the agent '
                                   '(gre and/or vxlan). '
                                   '(DEPRECATED)'))
        parser.add_argument('--neutron-tunnel-id-ranges',
                            help=_("Ranges of GRE tunnel IDs to make "
                                   "available for tenant network allocation "
                                   "(DEPRECATED)"),)
        parser.add_argument('--neutron-vni-ranges',
                            help=_("Ranges of VXLAN VNI IDs to make "
                                   "available for tenant network allocation "
                                   "(DEPRECATED)"),)
        parser.add_argument('--neutron-disable-tunneling',
                            dest='neutron_disable_tunneling',
                            action="store_const", const=True,
                            help=_('Disables tunneling. (DEPRECATED)')),
        parser.add_argument('--neutron-network-vlan-ranges',
                            help=_('Comma separated list of '
                                   '<physical_network>:<vlan_min>:<vlan_max> '
                                   'or <physical_network> specifying '
                                   'physical_network names usable for VLAN '
                                   'provider and tenant networks, as well as '
                                   'ranges of VLAN tags on each available for '
                                   'allocation to tenant networks. '
                                   '(ex: datacentre:1:1000) (DEPRECATED)'))
        parser.add_argument('--neutron-mechanism-drivers',
                            help=_('An ordered list of extension driver '
                                   'entrypoints to be loaded from the '
                                   'neutron.ml2.extension_drivers namespace. '
                                   '(DEPRECATED)'))
        parser.add_argument('--libvirt-type',
                            choices=['kvm', 'qemu'],
                            help=_('Libvirt domain type.'))
        parser.add_argument('--ntp-server',
                            help=_('The NTP for overcloud nodes. '))
        parser.add_argument(
            '--no-proxy',
            default=os.environ.get('no_proxy', ''),
            help=_('A comma separated list of hosts that should not be '
                   'proxied.')
        )
        parser.add_argument(
            '--overcloud-ssh-user',
            default='heat-admin',
            help=_('User for ssh access to overcloud nodes')
        )
        parser.add_argument(
            '-e', '--environment-file', metavar='<HEAT ENVIRONMENT FILE>',
            action='append', dest='environment_files',
            help=_('Environment files to be passed to the heat stack-create '
                   'or heat stack-update command. (Can be specified more than '
                   'once.)')
        )
        parser.add_argument(
            '--validation-errors-fatal',
            action='store_true',
            default=False,
            help=_('Exit if there are errors from the configuration '
                   'pre-checks. Ignoring these errors will likely cause your '
                   'deploy to fail.')
        )
        parser.add_argument(
            '--validation-warnings-fatal',
            action='store_true',
            default=False,
            help=_('Exit if there are warnings from the configuration '
                   'pre-checks.')
        )
        parser.add_argument(
            '--dry-run',
            action='store_true',
            default=False,
            help=_('Only run validations, but do not apply any changes.')
        )
        reg_group = parser.add_argument_group('Registration Parameters')
        reg_group.add_argument(
            '--rhel-reg',
            action='store_true',
            help=_('Register overcloud nodes to the customer portal or a '
                   'satellite.')
        )
        reg_group.add_argument(
            '--reg-method',
            choices=['satellite', 'portal'],
            default='satellite',
            help=_('RHEL registration method to use for the overcloud nodes.')
        )
        reg_group.add_argument(
            '--reg-org',
            default='',
            help=_('Organization key to use for registration.')
        )
        reg_group.add_argument(
            '--reg-force',
            action='store_true',
            help=_('Register the system even if it is already registered.')
        )
        reg_group.add_argument(
            '--reg-sat-url',
            default='',
            help=_('Satellite server to register overcloud nodes.')
        )
        reg_group.add_argument(
            '--reg-activation-key',
            default='',
            help=_('Activation key to use for registration.')
        )

        return parser