Example #1
0
def _generate_ansible_docs(args, api_spec, template_ctx):
    generator.ModelDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.OperationDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.ModuleDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, DEFAULT_MODULE_DIR) \
        .generate_doc_files(args.dist)
    generator.StaticDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, STATIC_TEMPLATE_DIR) \
        .generate_doc_files(args.dist)
Example #2
0
def _generate_ftd_api_docs(args, api_spec, template_ctx, errors_codes):
    generator.ResourceDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.ModelDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.ApiIntroductionDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx) \
        .generate_doc_files(args.dist)
    if errors_codes:
        generator.ErrorDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx) \
            .generate_doc_files(args.dist, errors_codes)
Example #3
0
def _generate_ftd_api_docs(args, api_spec, template_ctx, errors_codes):
    if template_ctx['ftd_version'] == '7.0.0':
        # SSLGroupType has incorrect representation in 7.0.0 API spec, as it doesn't contain possible enum values.
        # We need to add these enum values here to generate docs and represent possible values.
        api_spec['models']['SSLGroupType']['enum'] = [
            "GROUP_14", "GROUP_15", "GROUP_19", "GROUP_20", "GROUP_21"
        ]

    generator.ResourceDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.ModelDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, api_spec) \
        .generate_doc_files(args.dist, args.models)
    generator.ApiIntroductionDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx) \
        .generate_doc_files(args.dist)
    if errors_codes:
        generator.ErrorDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx) \
            .generate_doc_files(args.dist, errors_codes)
    generator.StaticDocGenerator(DEFAULT_TEMPLATE_DIR, template_ctx, FTD_API_STATIC_TEMPLATE_DIR) \
        .generate_doc_files(args.dist)