Skip to content

Commit

Permalink
Fixed broken/redirected links; Added linkcheck to test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed Nov 22, 2024
1 parent c57b836 commit 879b393
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ jobs:
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
run: |
make bandit
- name: Run linkcheck
env:
PACKAGE_LEVEL: ${{ matrix.package_level }}
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
run: |
make linkcheck
test_finish:
needs: test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ docs: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(doc_bui

.PHONY: linkcheck
linkcheck: _check_version $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(doc_rst_files)
-sphinx-build -b linkcheck $(sphinx_opts) $(doc_source_dir) $(doc_linkcheck_dir)
sphinx-build -b linkcheck $(sphinx_opts) $(doc_source_dir) $(doc_linkcheck_dir)
@echo '$@ done.'

.PHONY: test
Expand Down
25 changes: 16 additions & 9 deletions docs/source/bibliography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,37 @@ Resources
The Web Services API of the z Systems Hardware Management Console, described in the following books:

HMC API 2.11.1
`IBM SC27-2616, System z Hardware Management Console Web Services API (Version 2.11.1) <https://www.ibm.com/support/pages/node/6017542>`_
IBM SC27-2616, System z Hardware Management Console Web Services API (Version 2.11.1) (no longer available for download)

HMC API 2.12.0
`IBM SC27-2617, System z Hardware Management Console Web Services API (Version 2.12.0) <https://www.ibm.com/support/pages/node/6019030>`_
IBM SC27-2617, System z Hardware Management Console Web Services API (Version 2.12.0) (no longer available for download)

HMC API 2.12.1
`IBM SC27-2626, System z Hardware Management Console Web Services API (Version 2.12.1) <https://www.ibm.com/support/pages/node/6017614>`_
IBM SC27-2626, System z Hardware Management Console Web Services API (Version 2.12.1) (no longer available for download)

HMC API 2.13.0
`IBM SC27-2627, z Systems Hardware Management Console Web Services API (Version 2.13.0) <https://www.ibm.com/support/pages/node/6018628>`_
`IBM SC27-2627-00a, z Systems Hardware Management Console Web Services API (Version 2.13.0) <https://www.ibm.com/docs/en/module_1707928542006/pdf/SC27-2627-00a.pdf>`_

HMC API 2.13.1
`IBM SC27-2634, z Systems Hardware Management Console Web Services API (Version 2.13.1) <https://www.ibm.com/support/pages/node/6019732>`_
`IBM SC27-2634-03a, z Systems Hardware Management Console Web Services API (Version 2.13.1) <https://www.ibm.com/docs/en/module_1707928542006/pdf/SC27-2634-03a.pdf>`_

HMC API 2.14.0
`IBM SC27-2636, IBM Z Hardware Management Console Web Services API (Version 2.14.0) <https://www.ibm.com/support/pages/node/6020008>`_
`IBM SC27-2636-04a, IBM Z Hardware Management Console Web Services API (Version 2.14.0) <https://www.ibm.com/docs/en/module_1687361734185/pdf/SC27-2636-04a.pdf>`_

HMC API 2.14.1
`IBM SC27-2637, IBM Z Hardware Management Console Web Services API (Version 2.14.1) <https://www.ibm.com/support/pages/node/6019768>`_
`IBM SC27-2637-01a, IBM Z Hardware Management Console Web Services API (Version 2.14.1) <https://www.ibm.com/docs/en/module_1687361734185/pdf/SC27-2637-01a.pdf>`_

HMC API 2.15.0
`IBM SC27-2638, IBM Z Hardware Management Console Web Services API (Version 2.15.0) <https://www.ibm.com/support/pages/node/6019720>`_
`IBM SC27-2638-04c, IBM Z Hardware Management Console Web Services API (Version 2.15.0) <https://www.ibm.com/docs/en/module_1687296212988/pdf/SC27-2638-04c.pdf>`_
(covers both GA1 and GA2)

HMC API 2.16.0
`IBM SC27-2642-02, IBM Z Hardware Management Console Web Services API (Version 2.16.0) <https://www.ibm.com/docs/en/module_1675371155154/pdf/SC27-2642-02.pdf>`_
(covers both GA1 and GA2)

HMC Security
`IBM SC28-6987-01, Hardware Management Console Security <https://www.ibm.com/docs/en/module_1687361734185/pdf/SC28-6987-01.pdf>`_

.. _`Java regular expressions`:

Java regular expressions
Expand All @@ -59,4 +66,4 @@ Resources
.. _`CoD Users Guide`:

Capacity on Demand User's Guide
`IBM SC28-6985, IBM Z Capacity on Demand User's Guide <https://www.ibm.com/support/pages/node/6018790>`_
`IBM SC28-6985, IBM Z Capacity on Demand User's Guide <https://www.ibm.com/support/pages/sites/default/files/inline-files/SC28-6985-04.pdf>`_
29 changes: 29 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,32 @@ def get_docs_branches():
# documents. The default order is whatever git prints when
# running "git ls-remote --tags ./."
scv_invert = True


##############################################################################
# linkcheck #
##############################################################################

linkcheck_request_headers = {
r'https://.*/': {
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) '
'Gecko/20100101 Firefox/24.0',
},
}

# All HTTP redirections from a matching source URI to the matching target URI
# will be treated as "working".
linkcheck_allowed_redirects = {
r'https://virtualenv.pypa.io/': r'https://virtualenv.pypa.io/en/latest/',
r'https://ibm-systems-z.slack.com/archives/.*': r'https://ibm.enterprise.slack.com/.*',
r'https://ibm.ent.box.com/folder/.*': r'https://ibm.account.box.com/login.*',
}

linkcheck_ignore = [

# Page exists, but linkchedck gets HTTP 404 "Not Found"
r'https://github.com/zhmcclient/zhmc-ansible-modules/security/dependabot',

# Page exists, but linkchedck gets HTTP 403 "Forbidden"
r'https://opensource.org/license/apache-2-0',
]
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ please open an issue in the `issue tracker`_.
.. _`issue tracker`:
https://github.com/zhmcclient/zhmc-ansible-modules/issues
.. _Apache 2.0 License:
https://opensource.org/licenses/Apache-2.0
https://opensource.org/license/apache-2-0
.. _ibm.ibm_zhmc collection on Ansible Galaxy:
https://galaxy.ansible.com/ibm/ibm_zhmc/
.. _ibm.ibm_zhmc collection on Ansible AutomationHub:
Expand All @@ -134,6 +134,6 @@ please open an issue in the `issue tracker`_.
.. _Ansible:
https://www.ansible.com/
.. _IBM Z:
https://www.ibm.com/it-infrastructure/z
https://www.ibm.com/z
.. _LinuxONE:
https://www.ibm.com/it-infrastructure/linuxone/
https://www.ibm.com/linuxone
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Standard installation with system Python
All commands shown are to be executed in a terminal or command prompt on the
control system. The instructions are written for a bash shell.

.. _`Installing Ansible on specific operating systems`: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-specific-operating-systems
.. _`Installing Ansible on specific operating systems`: https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html

1. Install Ansible as an operating system package on the control system.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/playbooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The **IBM Z HMC collection** provides sample playbooks in the
The starting point for reading about them is `IBM Z HMC Sample Playbooks`_.

.. _Ansible playbook:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#playbooks-intro
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html
.. _IBM Z Ansible Collection Samples:
https://github.com/IBM/z_ansible_collections_samples/
.. _IBM Z HMC Sample Playbooks:
https://github.com/IBM/z_ansible_collections_samples/tree/master/z_systems_administration/zhmc
https://github.com/IBM/z_ansible_collections_samples/tree/main/z_systems_administration/zhmc
3 changes: 3 additions & 0 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ Availability: `AutomationHub`_, `Galaxy`_, `GitHub`_
the input params before passing them on to the zhmcclient
'User.update_properties()' method. (issue #1081)

* Docs: Fixed broken links to IBM documentation and updated permanently
redirected links.

**Enhancements:**

* Support for ansible-core 2.18, by adding an ignore file for the sanity tests.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For more details on these approaches, see the description and sample playbooks
in `IBM Z HMC Sample Playbooks`_.

.. _IBM Z HMC Sample Playbooks:
https://github.com/IBM/z_ansible_collections_samples/tree/master/z_systems_administration/zhmc
https://github.com/IBM/z_ansible_collections_samples/tree/main/z_systems_administration/zhmc

Control node
============
Expand Down

0 comments on commit 879b393

Please sign in to comment.