-
Notifications
You must be signed in to change notification settings - Fork 18
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
ipa role: adding sshpubkey parameter to users #131
Conversation
a770d46
to
7eb6ee8
Compare
I'm still getting comfortable working with multiple commits and amending changes to previous commits. I have an extra commit I was trying to squash. |
94f4d22
to
e3529a6
Compare
tests that use this enhancement SSSD/sssd#7608 |
2f880f1
to
5d2358f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Just a few small things to check on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sssd_test_framework/utils/tools.py
Outdated
self.user = user | ||
self.path = path | ||
self.file = file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work if you call keygen multiple times.
You can:
- return (pubkey, privatekey) pair instead of self
- or return a new object e.g.
SSHKey
that will hold the information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never intended it to be called keygen multiple times without changing the file name... like
https://github.com/SSSD/sssd/blob/99073123c4727a005d7f72b1a784c4474eb1231d/src/tests/system/tests/test_ipa.py#L193
I'm a little confused; I do have an object, SSHKeysUtils, that should be created each time, that contains the user, path and file. Get returns a tuple of the public and private keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But SSHKeysUtils is not create multiple times, it is created only once for each test.
If you want it to be created multiple times, then you should do it via @property
. It also should not inherit from MultihostUtility, but from object in this case.
@property
def keygen(...) -> SSHKeyUtils:
return SSHKeyUtils(...)
public_key, private_key = client.tools.keygen.generate()
Or we can leave it as is (single object) but then it should not set an internal state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the class inheritance and made keygen a property that calls SSHKeyUtils
3283c27
to
3860af3
Compare
11ce091
to
a3af139
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question about the class name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Dan, it looks good, thank you. See nitpicks inside.
a3af139
to
f93fec1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.