From 6c24cb20fff999a775ef665313e8682ea354b601 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Wed, 8 Jul 2020 14:49:11 -0400 Subject: [PATCH] Update jansa to markdown --- lib/miq.rb | 4 +- site/_data/menus/ref_menu_jansa.yml | 86 +++++++++++++++++++++------- site/_data/menus/ref_menu_latest.yml | 21 ------- test/lib/miq/ref_versions_test.rb | 16 +++++- 4 files changed, 83 insertions(+), 44 deletions(-) diff --git a/lib/miq.rb b/lib/miq.rb index bdc95c6de..3b46249bb 100644 --- a/lib/miq.rb +++ b/lib/miq.rb @@ -83,11 +83,11 @@ def self.blog_month_template end def self.doc_branches - ENV.fetch('MIQ_REF_BRANCHES', 'master').split(',') + ENV.fetch('MIQ_REF_BRANCHES', 'master,jansa').split(',') end def self.legacy_doc_branches - ENV.fetch('MIQ_REF_BRANCHES', 'jansa,ivanchuk,hammer,gaprindashvili,fine,euwe').split(',') + ENV.fetch('MIQ_REF_BRANCHES', 'ivanchuk,hammer,gaprindashvili,fine,euwe').split(',') end def self.all_doc_branches diff --git a/site/_data/menus/ref_menu_jansa.yml b/site/_data/menus/ref_menu_jansa.yml index 94594b402..7f2c4edc6 100644 --- a/site/_data/menus/ref_menu_jansa.yml +++ b/site/_data/menus/ref_menu_jansa.yml @@ -3,44 +3,86 @@ installation: title: Installation children: - - title: Google Compute Engine - path: "/docs/reference/jansa/doc-Installing_on_Google_Compute_Engine/miq/index.html" - desc: "How to install and configure the ManageIQ Management Engine appliance on a Google Compute Engine environment" + - title: Amazon Web Services (AWS) + path: "/docs/reference/jansa/installing_on_aws/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_AWS/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Amazon Web Services (AWS)" - title: Microsoft Azure - path: "/docs/reference/jansa/doc-Installing_on_Microsoft_Azure/miq/index.html" - desc: "How to install and configure the ManageIQ Management Engine appliance on a Microsoft Azure cloud environment" - - title: Red Hat Enterprise Linux OpenStack Platform - path: "/docs/reference/jansa/doc-Installing_on_Red_Hat_Enterprise_Linux_OpenStack_Platform/miq/index.html" - desc: "How to install and configure the ManageIQ Management Engine appliance on a Red Hat OpenStack Platform environment" + path: "/docs/reference/jansa/installing_on_microsoft_azure/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_Microsoft_Azure/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Microsoft Azure" + - title: Google Compute Engine + path: "/docs/reference/jansa/installing_on_google_compute_engine/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_Google_Compute_Engine/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Google Compute Engine" + - title: VMware vSphere + path: "/docs/reference/jansa/installing_on_vmware_vsphere/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_VMware_vSphere/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on VMware vSphere" + - title: Red Hat Enterprise OpenStack Platform + path: "/docs/reference/jansa/installing_on_red_hat_enterprise_linux_openstack_platform/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_Red_Hat_Enterprise_Linux_OpenStack_Platform/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Red Hat OpenStack Platform" - title: Red Hat Enterprise Virtualization - path: "/docs/reference/jansa/doc-Installing_on_Red_Hat_Virtualization/miq/index.html" - desc: "How to install and configure the ManageIQ Management Engine appliance on a Red Hat Enterprise Virtualization environment" + path: "/docs/reference/jansa/installing_on_red_hat_virtualization/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_Red_Hat_Virtualization/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Red Hat Enterprise Virtualization" + - title: Microsoft System Center Virtual Machine Manager (SCVMM) + path: "/docs/reference/jansa/installing_on_scvmm/index.html" + prior: "/docs/reference/ivanchuk/doc-Installing_on_SCVMM/miq/index.html" + desc: "How to install and configure the ManageIQ Management Engine appliance on Microsoft System Center Virtual Machine Manager (SCVMM)" + +configuration: + title: Configuration + children: + - title: Deployment Planning Guide + path: "/docs/reference/jansa/deployment_planning_guide/index.html" + prior: "/docs/reference/ivanchuk/doc-Deployment_Planning_Guide/miq/index.html" + desc: "ManageIQ Deployment Planning Guide" + - title: General Configuration + path: "/docs/reference/jansa/general_configuration/index.html" + prior: "/docs/reference/ivanchuk/doc-General_Configuration/miq/index.html" + desc: "ManageIQ General Configuration" + - title: High Availability Guide + path: "/docs/reference/jansa/high_availability_guide/index.html" + prior: "/docs/reference/ivanchuk/doc-High_Availability_Guide/miq/index.html" + desc: "ManageIQ High Availability Guide" + - title: Appliance Hardening Guide + path: "/docs/reference/jansa/appliance_hardening_guide/index.html" + prior: "/docs/reference/ivanchuk/doc-Appliance_Hardening_Guide/miq/index.html" + desc: "ManageIQ Appliance Hardening Guide" administration: title: Administration children: - title: Monitoring, Alerts, and Reporting - path: "/docs/reference/jansa/doc-Monitoring_Alerts_and_Reporting/miq/index.html" + path: "/docs/reference/jansa/monitoring_alerts_and_reporting/index.html" + prior: "/docs/reference/ivanchuk/doc-Monitoring_Alerts_and_Reporting/miq/index.html" desc: "Information on the Cloud Intelligence area of ManageIQ: reporting, RSS, usage, timelines, and chargeback" - title: Policies and Profiles Guide - path: "/docs/reference/jansa/doc-Policies_and_Profiles_Guide/miq/index.html" + path: "/docs/reference/jansa/policies_and_profiles_guide/index.html" + prior: "/docs/reference/ivanchuk/doc-Policies_and_Profiles_Guide/miq/index.html" desc: Policy-based enforcement, compliance, events, and policy profiles for ManageIQ - title: Managing Infrastructure and Inventory - path: "/docs/reference/jansa/doc-Managing_Infrastructure_and_Inventory/miq/index.html" + path: "/docs/reference/jansa/managing_infrastructure_and_inventory/index.html" + prior: "/docs/reference/ivanchuk/doc-Managing_Infrastructure_and_Inventory/miq/index.html" desc: "Viewing and collecting information from your clusters, hosts, virtual machines, and other resources" - title: Managing Providers - path: "/docs/reference/jansa/doc-Managing_Providers/miq/index.html" + path: "/docs/reference/jansa/managing_providers/index.html" + prior: "/docs/reference/ivanchuk/doc-Managing_Providers/miq/index.html" desc: "Managing your infrastructure, cloud, and containers providers and datastores" - title: Provisioning Virtual Machines and Hosts - path: "/docs/reference/jansa/doc-Provisioning_Virtual_Machines_and_Hosts/miq/index.html" + path: "/docs/reference/jansa/provisioning_virtual_machines_and_hosts/index.html" + prior: "/docs/reference/ivanchuk/doc-Provisioning_Virtual_Machines_and_Hosts/miq/index.html" desc: "Provisioning, workload management, and orchestration in ManageIQ" - title: Scripting Actions in ManageIQ - path: "/docs/reference/jansa/doc-Scripting_Actions/miq/index.html" + path: "/docs/reference/jansa/scripting_actions/index.html" + prior: "/docs/reference/ivanchuk/doc-Scripting_Actions/miq/index.html" desc: "Real-time, bi-directional process integration for ManageIQ Management Engine" authentication: @@ -69,20 +111,24 @@ integration: title: Integration children: - title: AWS CloudFormation and OpenStack Heat - path: "/docs/reference/jansa/doc-Integration_with_AWS_CloudFormation_and_OpenStack_Heat/miq/index.html" + path: "/docs/reference/jansa/integration_with_aws_cloudformation_and_openstack_heat/index.html" + prior: "/docs/reference/ivanchuk/doc-Integration_with_AWS_CloudFormation_and_OpenStack_Heat/miq/index.html" desc: "How to install and configure Amazon CloudFormation and OpenStack Heat in a Red Hat ManageIQ environment" - title: ServiceNow - path: "/docs/reference/jansa/doc-Integration_with_ServiceNow/miq/index.html" + path: "/docs/reference/jansa/integration_with_servicenow/index.html" + prior: "/docs/reference/ivanchuk/doc-Integration_with_ServiceNow/miq/index.html" desc: A short guide to managing ManageIQ ServiceNow CMDB integration reference: title: Reference children: - title: ManageIQ REST API - path: "/docs/reference/jansa/doc-REST_API/miq/index.html" + path: "/docs/reference/jansa/rest_api/index.html" + prior: "/docs/reference/ivanchuk/doc-REST_API/miq/index.html" desc: Systems management - title: Methods Available for Automation - path: "/docs/reference/jansa/doc-Methods_Available_for_Automation/miq/index.html" + path: "/docs/reference/jansa/methods_available_for_automation/index.html" + prior: "/docs/reference/ivanchuk/doc-Methods_Available_for_Automation/miq/index.html" desc: Advanced automation methods for ManageIQ Management Engine diff --git a/site/_data/menus/ref_menu_latest.yml b/site/_data/menus/ref_menu_latest.yml index 3b1422563..0de426947 100644 --- a/site/_data/menus/ref_menu_latest.yml +++ b/site/_data/menus/ref_menu_latest.yml @@ -5,31 +5,24 @@ installation: children: - title: Amazon Web Services (AWS) path: "/docs/reference/latest/installing_on_aws/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_AWS/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Amazon Web Services (AWS)" - title: Microsoft Azure path: "/docs/reference/latest/installing_on_microsoft_azure/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_Microsoft_Azure/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Microsoft Azure" - title: Google Compute Engine path: "/docs/reference/latest/installing_on_google_compute_engine/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_Google_Compute_Engine/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Google Compute Engine" - title: VMware vSphere path: "/docs/reference/latest/installing_on_vmware_vsphere/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_VMware_vSphere/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on VMware vSphere" - title: Red Hat Enterprise OpenStack Platform path: "/docs/reference/latest/installing_on_red_hat_enterprise_linux_openstack_platform/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_Red_Hat_Enterprise_Linux_OpenStack_Platform/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Red Hat OpenStack Platform" - title: Red Hat Enterprise Virtualization path: "/docs/reference/latest/installing_on_red_hat_virtualization/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_Red_Hat_Virtualization/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Red Hat Enterprise Virtualization" - title: Microsoft System Center Virtual Machine Manager (SCVMM) path: "/docs/reference/latest/installing_on_scvmm/index.html" - prior: "/docs/reference/jansa/doc-Installing_on_SCVMM/miq/index.html" desc: "How to install and configure the ManageIQ Management Engine appliance on Microsoft System Center Virtual Machine Manager (SCVMM)" configuration: @@ -37,19 +30,15 @@ configuration: children: - title: Deployment Planning Guide path: "/docs/reference/latest/deployment_planning_guide/index.html" - prior: "/docs/reference/jansa/doc-Deployment_Planning_Guide/miq/index.html" desc: "ManageIQ Deployment Planning Guide" - title: General Configuration path: "/docs/reference/latest/general_configuration/index.html" - prior: "/docs/reference/jansa/doc-General_Configuration/miq/index.html" desc: "ManageIQ General Configuration" - title: High Availability Guide path: "/docs/reference/latest/high_availability_guide/index.html" - prior: "/docs/reference/jansa/doc-High_Availability_Guide/miq/index.html" desc: "ManageIQ High Availability Guide" - title: Appliance Hardening Guide path: "/docs/reference/latest/appliance_hardening_guide/index.html" - prior: "/docs/reference/jansa/doc-Appliance_Hardening_Guide/miq/index.html" desc: "ManageIQ Appliance Hardening Guide" administration: @@ -57,32 +46,26 @@ administration: children: - title: Monitoring, Alerts, and Reporting path: "/docs/reference/latest/monitoring_alerts_and_reporting/index.html" - prior: "/docs/reference/jansa/doc-Monitoring_Alerts_and_Reporting/miq/index.html" desc: "Information on the Cloud Intelligence area of ManageIQ: reporting, RSS, usage, timelines, and chargeback" - title: Policies and Profiles Guide path: "/docs/reference/latest/policies_and_profiles_guide/index.html" - prior: "/docs/reference/jansa/doc-Policies_and_Profiles_Guide/miq/index.html" desc: Policy-based enforcement, compliance, events, and policy profiles for ManageIQ - title: Managing Infrastructure and Inventory path: "/docs/reference/latest/managing_infrastructure_and_inventory/index.html" - prior: "/docs/reference/jansa/doc-Managing_Infrastructure_and_Inventory/miq/index.html" desc: "Viewing and collecting information from your clusters, hosts, virtual machines, and other resources" - title: Managing Providers path: "/docs/reference/latest/managing_providers/index.html" - prior: "/docs/reference/jansa/doc-Managing_Providers/miq/index.html" desc: "Managing your infrastructure, cloud, and containers providers and datastores" - title: Provisioning Virtual Machines and Hosts path: "/docs/reference/latest/provisioning_virtual_machines_and_hosts/index.html" - prior: "/docs/reference/jansa/doc-Provisioning_Virtual_Machines_and_Hosts/miq/index.html" desc: "Provisioning, workload management, and orchestration in ManageIQ" - title: Scripting Actions in ManageIQ path: "/docs/reference/latest/scripting_actions/index.html" - prior: "/docs/reference/jansa/doc-Scripting_Actions/miq/index.html" desc: "Real-time, bi-directional process integration for ManageIQ Management Engine" authentication: @@ -112,12 +95,10 @@ integration: children: - title: AWS CloudFormation and OpenStack Heat path: "/docs/reference/latest/integration_with_aws_cloudformation_and_openstack_heat/index.html" - prior: "/docs/reference/jansa/doc-Integration_with_AWS_CloudFormation_and_OpenStack_Heat/miq/index.html" desc: "How to install and configure Amazon CloudFormation and OpenStack Heat in a Red Hat ManageIQ environment" - title: ServiceNow path: "/docs/reference/latest/integration_with_servicenow/index.html" - prior: "/docs/reference/jansa/doc-Integration_with_ServiceNow/miq/index.html" desc: A short guide to managing ManageIQ ServiceNow CMDB integration reference: @@ -125,10 +106,8 @@ reference: children: - title: ManageIQ REST API path: "/docs/reference/latest/rest_api/index.html" - prior: "/docs/reference/jansa/doc-REST_API/miq/index.html" desc: Systems management - title: Methods Available for Automation path: "/docs/reference/latest/methods_available_for_automation/index.html" - prior: "/docs/reference/jansa/doc-Methods_Available_for_Automation/miq/index.html" desc: Advanced automation methods for ManageIQ Management Engine diff --git a/test/lib/miq/ref_versions_test.rb b/test/lib/miq/ref_versions_test.rb index c0cd8f10f..edd77710e 100644 --- a/test/lib/miq/ref_versions_test.rb +++ b/test/lib/miq/ref_versions_test.rb @@ -1,10 +1,24 @@ require "test_helper" class RefVersionsTest < Minitest::Test - def test_paths_for_with_ref_doc + def test_paths_for_with_legacy_doc paths = Miq::RefVersions.instance.paths_for("/docs/reference/euwe/doc-Installing_on_Google_Compute_Engine/miq/index.html") assert_equal "/docs/reference/latest/installing_on_google_compute_engine/index.html", paths["latest"] + assert_equal "/docs/reference/jansa/installing_on_google_compute_engine/index.html", paths["jansa"] + assert_equal "/docs/reference/ivanchuk/doc-Installing_on_Google_Compute_Engine/miq/index.html", paths["ivanchuk"] + assert_equal "/docs/reference/euwe/doc-Installing_on_Google_Compute_Engine/miq/index.html", paths["euwe"] + + # Check that the list is sorted in reverse chronological order + assert_equal "latest", paths.keys.first + assert_equal "euwe", paths.keys.last + end + + def test_paths_for_with_ref_doc + paths = Miq::RefVersions.instance.paths_for("/docs/reference/jansa/installing_on_google_compute_engine/index.html") + + assert_equal "/docs/reference/latest/installing_on_google_compute_engine/index.html", paths["latest"] + assert_equal "/docs/reference/jansa/installing_on_google_compute_engine/index.html", paths["jansa"] assert_equal "/docs/reference/ivanchuk/doc-Installing_on_Google_Compute_Engine/miq/index.html", paths["ivanchuk"] assert_equal "/docs/reference/euwe/doc-Installing_on_Google_Compute_Engine/miq/index.html", paths["euwe"]