Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsr_role2collection.py does not convert the legacy role path if the role is not the one to be converted. #65

Closed
nhosoi opened this issue Apr 20, 2021 · 2 comments

Comments

@nhosoi
Copy link
Contributor

nhosoi commented Apr 20, 2021

This is an example of README of sap-hana-preconfigure, in which some roles are referred.

./README.md:- 'linux-system-roles.timesync'
./README.md:- 'linux-system-roles.sap-base-settings' (for RHEL 7.x until RHEL 7.5)
./README.md:- 'linux-system-roles.sap-preconfigure' (for RHEL 7.6 and later and RHEL 8.x)
./README.md:        - { role: linux-system-roles.sap-base-settings }
./README.md:        - { role: linux-system-roles.sap-hana-preconfigure }

The corresponding converted result:

./roles/sap-hana-preconfigure/README.md:- 'linux-system-roles.timesync'
./roles/sap-hana-preconfigure/README.md:- 'linux-system-roles.sap-base-settings' (for RHEL 7.x until RHEL 7.5)
./roles/sap-hana-preconfigure/README.md:- 'linux-system-roles.sap-preconfigure' (for RHEL 7.6 and later and RHEL 8.x)
./roles/sap-hana-preconfigure/README.md:        - { role: linux-system-roles.sap-base-settings }
./roles/sap-hana-preconfigure/README.md:        - { role: sap.rhel.sap-hana-preconfigure }

All the roles must be converted to the collection format, but it'd be hard to automate it. The FQCNs need to be provided since, e.g., in this example, linux-system-roles.timesync could be either fedora.linux_system_roles.timesync or redhat.rhel_system_roles.timesync, and the others would be sap.rhel.sap-{base-settings,preconfigure}.

nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
The option takes comma separated extra roles to convert to collection.
This pr fixes the extra roles belonging to the same namespace.collection
as the role to be converted.

Example:
python  lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure"

linux-system-roles#65
nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
Comma separated extra mapping - PRE:POST - to replace in the documentation

The option takes comma separated extra string mapping (format PRE:POST)
applied to the documentations. This option could be useful when a
role is referred and the role does not belong to the same collection
as the role to be converted.

Example:
This command line replaces "linux-system-roles.timesync" with
"fedora.linux_system_roles.timesync" in the collection converted
documentation.
python lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure" \
  --namespace sap --collection collection_name \
  --extra-mapping "linux-system-roles.timesync:fedora.linux_system_roles.timesync"

linux-system-roles#65
nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
The option takes comma separated extra roles to convert to collection.
This pr fixes the extra roles belonging to the same namespace.collection
as the role to be converted.

Example:
python  lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure"

linux-system-roles#65
nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
Comma separated extra mapping - PRE:POST - to replace in the documentation

The option takes comma separated extra string mapping (format PRE:POST)
applied to the documentations. This option could be useful when a
role is referred and the role does not belong to the same collection
as the role to be converted.

Example:
This command line replaces "linux-system-roles.timesync" with
"fedora.linux_system_roles.timesync" in the collection converted
documentation.
python lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure" \
  --namespace sap --collection collection_name \
  --extra-mapping "linux-system-roles.timesync:fedora.linux_system_roles.timesync"

linux-system-roles#65
nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
The option takes comma separated extra roles to convert to collection.
This pr fixes the extra roles belonging to the same namespace.collection
as the role to be converted.

Example:
python  lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure"

linux-system-roles#65
nhosoi added a commit to nhosoi/auto-maintenance that referenced this issue Apr 22, 2021
Comma separated extra mapping - PRE:POST - to replace in the documentation

The option takes comma separated extra string mapping (format PRE:POST)
applied to the documentations. This option could be useful when a
role is referred and the role does not belong to the same collection
as the role to be converted.

Example:
This command line replaces "linux-system-roles.timesync" with
"fedora.linux_system_roles.timesync" in the collection converted
documentation.
python lsr_role2collection.py --role sap-hana-preconfigure \
  --extra-roles "sap-base-settings,sap-preconfigure" \
  --namespace sap --collection collection_name \
  --extra-mapping "linux-system-roles.timesync:fedora.linux_system_roles.timesync"

linux-system-roles#65
@nhosoi nhosoi mentioned this issue Apr 22, 2021
@spetrosi
Copy link
Contributor

@nhosoi was this issue resolved by #68?

@nhosoi
Copy link
Contributor Author

nhosoi commented May 17, 2021

@nhosoi was this issue resolved by #68?

Yep, thanks for the reminder, @spetrosi. Closing this issue.

@nhosoi nhosoi closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants