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

RMS_MGMT #499

Merged
merged 26 commits into from
Sep 28, 2023
Merged

RMS_MGMT #499

merged 26 commits into from
Sep 28, 2023

Conversation

yes1n
Copy link
Contributor

@yes1n yes1n commented Sep 25, 2023

#495 I did a pull request for now because it works but needs improvement. Added rms.t and rms.reg for the test.

Copy link
Member

@g-bougard g-bougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yes1n
thank you for your PR, anyway I expected to still updated it following the few suggestions I made in the #495 discussion.

lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
t/tasks/inventory/generic/remote_mgmt/rms.t Outdated Show resolved Hide resolved
t/tasks/inventory/generic/remote_mgmt/rms.t Outdated Show resolved Hide resolved
t/tasks/inventory/generic/remote_mgmt/rms.t Outdated Show resolved Hide resolved
lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
@yes1n
Copy link
Contributor Author

yes1n commented Sep 26, 2023

I'm checking RMS.pm. Doesn't work yet, don't merge yet

glpi-project#499 It works in this combination. Please check the code for correctness. The registry path is the same on both Win32 and Win64
@yes1n yes1n requested a review from g-bougard September 26, 2023 11:42
@g-bougard
Copy link
Member

Hi @yes1n
there's still not resolved comments. Can you check them ?

  1. to fix logger not used when calling getRegistryValue()
  2. your registry file needs to be renamed

@yes1n
Copy link
Contributor Author

yes1n commented Sep 27, 2023

Hi, @g-bougard

  1. Regarding the logger, please suggest a change, I will make it. I don't know how to do it
  2. Registry file renamed in 7d6759a

@g-bougard
Copy link
Member

Hi, @g-bougard

1. Regarding the logger, please suggest a change, I will make it. I don't know how to do it

2. Registry file renamed in [7d6759a](https://github.com/glpi-project/glpi-agent/pull/499/commits/7d6759ac4c91c2b3300f01338380d91ef1b767ca)

Please read my pending comments from yesterday where you have the suggestion (%params support in _getID()) and an explanation on why the registry filename is still not the right.

Copy link
Member

@g-bougard g-bougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yes1n

my apologies, it seems I missed to validate the comment I was talking about.

Anyway, I found also another little issue in isEnabled() function.

Can you can know my requests ?

lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
@yes1n
Copy link
Contributor Author

yes1n commented Sep 28, 2023

@g-bougard, many thanks for your help. Applied your changes and renamed the file to rms-7.0.0.1-Parameters.reg

Copy link
Member

@g-bougard g-bougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yes1n

there's a last critical problem with the test as it fails.
Investigating, I found you just have to remove the 3 following lines from your registry file as they are not expected by the mocking API:

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris]

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host]

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host\Host]

So the beginning of the file must look like:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host\Host\Parameters]

There also a not critical mistake (my fault) in the test file, check my comment.

t/tasks/inventory/generic/remote_mgmt/rms.t Outdated Show resolved Hide resolved
@yes1n
Copy link
Contributor Author

yes1n commented Sep 28, 2023

Hi @yes1n

there's a last critical problem with the test as it fails. Investigating, I found you just have to remove the 3 following lines from your registry file as they are not expected by the mocking API:

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris]

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host]

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host\Host]

So the beginning of the file must look like:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Usoris\Remote Utilities Host\Host\Parameters]

ok, I'll do it in a couple of hours

Copy link
Member

@g-bougard g-bougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yes1n
sorry, the AUTHOR tests failed again. This time on remaining spaces on a line that should remain empty.
After that, your PR should be fine for merging.

lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm Outdated Show resolved Hide resolved
@yes1n
Copy link
Contributor Author

yes1n commented Sep 28, 2023

@g-bougard Thank you for approving the idea and helping me write food. I would even say that you did almost everything. I even thought about learning Perl.

@g-bougard g-bougard merged commit fb10e0c into glpi-project:develop Sep 28, 2023
16 checks passed
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

Successfully merging this pull request may close these issues.

2 participants