def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument(
        '--mark-usable',
        default=None,
        action='store_true',
        help="Mark all added templates as usable",
    )
    parser.add_argument(
        '--provider-key',
        default=None,
        dest='selected_provider',
        nargs='*',
        help='A specific provider key to sync for',
    )
    parser.add_argument(
        '--outfile',
        dest='outfile',
        default=log_path.join('sync_template_tracker_report.log').strpath,
        help='Output file for tabulated reports on ProviderTemplate actions')
    parser.add_argument('--verbose',
                        default=False,
                        action='store_true',
                        help='Log to stdout')
    args = parser.parse_args()
    return dict(args._get_kwargs())
def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument(
        '--mark-usable',
        default=None,
        action='store_true',
        help="Mark all added templates as usable",
    )
    parser.add_argument(
        '--provider-key',
        default=None,
        dest='selected_provider',
        nargs='*',
        help='A specific provider key to sync for',
    )
    parser.add_argument(
        '--outfile',
        dest='outfile',
        default=log_path.join('sync_template_tracker_report.log').strpath,
        help='Output file for tabulated reports on ProviderTemplate actions'
    )
    parser.add_argument(
        '--verbose',
        default=False,
        action='store_true',
        help='Log to stdout'
    )
    args = parser.parse_args()
    return dict(args._get_kwargs())
def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument('--mark-usable', default=None, action='store_true',
        help="Mark all added templates as usable")
    parser.add_argument('--provider-key', default=None, help='A specific provider key to sync for',
                        dest='selected_provider', nargs='*')
    args = parser.parse_args()
    return dict(args._get_kwargs())
def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument('--mark-usable',
                        default=None,
                        action='store_true',
                        help="Mark all added templates as usable")
    args = parser.parse_args()
    return dict(args._get_kwargs())
Exemple #5
0
def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument('--mark-usable',
                        default=None,
                        action='store_true',
                        help="Mark all added templates as usable")
    parser.add_argument('--provider-key',
                        default=None,
                        help='A specific provider key to sync for',
                        dest='selected_provider',
                        nargs='*')
    args = parser.parse_args()
    return dict(args._get_kwargs())
#             from utils.appliance import IPAppliance
#             ipa = IPAppliance()
#             diagnosis = ipa.diagnose_evm_failure()
#             if diagnosis:
#                 logger.error('Appliance failed: {}'.format(diagnosis.split(os.linesep)[0]))

    trackerbot.mark_provider_template(api, provider_key, template, tested=True, usable=usable,
        diagnosis=diagnosis, build_number=build_number)


def retest(api, provider_key, template):
    trackerbot.mark_provider_template(api, provider_key, template, tested=False)


if __name__ == '__main__':
    parser = trackerbot.cmdline_parser()
    subs = parser.add_subparsers(title='commands', dest='command')

    parse_get = subs.add_parser('get', help='get a template to test')
    parse_get.set_defaults(func=get)
    parse_get.add_argument('--request_type', dest='request_type',
                           help='get a teamplate based on provider type')

    parse_latest = subs.add_parser('latest', help='get the latest usable template for a provider')
    parse_latest.set_defaults(func=latest)
    parse_latest.add_argument('stream', help='template stream (e.g. upstream, downstream-52z')
    parse_latest.add_argument('provider_key', nargs='?', default=None)

    parse_mark = subs.add_parser('mark', help='mark a tested template')
    parse_mark.set_defaults(func=mark)
    parse_mark.add_argument('provider_key')
Exemple #7
0
                                      template,
                                      tested=True,
                                      usable=usable,
                                      diagnosis=diagnosis,
                                      build_number=build_number)


def retest(api, provider_key, template):
    trackerbot.mark_provider_template(api,
                                      provider_key,
                                      template,
                                      tested=False)


if __name__ == '__main__':
    parser = trackerbot.cmdline_parser()
    subs = parser.add_subparsers(title='commands', dest='command')

    parse_get = subs.add_parser('get', help='get a template to test')
    parse_get.set_defaults(func=get)
    parse_get.add_argument('--request_type',
                           dest='request_type',
                           help='get a teamplate based on provider type')

    parse_latest = subs.add_parser(
        'latest', help='get the latest usable template for a provider')
    parse_latest.set_defaults(func=latest)
    parse_latest.add_argument(
        'stream', help='template stream (e.g. upstream, downstream-52z')
    parse_latest.add_argument('provider_key', nargs='?', default=None)
def parse_cmdline():
    parser = trackerbot.cmdline_parser()
    parser.add_argument('--mark-usable', default=None, action='store_true',
        help="Mark all added templates as usable")
    args = parser.parse_args()
    return dict(args._get_kwargs())