예제 #1
0
def add_systems_command_options(subparsers):
    systems_parser = subparsers.add_parser('systems',
                                           help='Fetch a list of systems.')

    systems_parser.add_argument('-u',
                                '--uuid',
                                help='The UUID of the system.',
                                default=None,
                                required=False,
                                action='store')

    systems_parser.add_argument(
        "--include",
        help="Get details for a system specified by UUID.",
        default=None,
        required=False,
        choices=['facts', 'entitlements', 'installedProducts'],
        action='store')

    systems_parser.add_argument(
        '-l',
        '--limit',
        help=('The default and max number of result in a '
              'response are 100.'),
        default=100,
        required=False,
        action='store')
    systems_parser.add_argument('-f',
                                '--format',
                                help='The format to output data as.',
                                choices=OutputFormat.as_args(),
                                default=OUTPUT_FORMAT_DEFAULT)
예제 #2
0
def add_packages_command_options(subparsers):
    packages_parser = subparsers.add_parser(
        'packages', help='Generate packages CSV report.')
    packages_parser.add_argument('-f',
                                 '--format',
                                 help='The format to output data as.',
                                 choices=OutputFormat.as_args(),
                                 default=OUTPUT_FORMAT_DEFAULT)