-
Notifications
You must be signed in to change notification settings - Fork 43
Add Trusted Platform Module (TPM) support #185
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jerone Young jyoung@redhat.com
There was an unneeded space in the conditional. Signed-off-by: Jerone Young <jyoung@redhat.com>
Fix designation of ARM architecture and add ppc64le. Signed-off-by: Jerone Young <jyoung@redhat.com
Add s390x support Signed-off-by: Jerone Young <jyoung@redhat.com>
ekohl
left a comment
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.
These are just my first impressions. Haven't done actual testing on it.
| # | ||
| VERSIONS = ['1.2', '2.0'].freeze | ||
|
|
||
| def initialize(attributes = {}, arch = "") |
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'd normally keep the options at the end and even consider the following
| def initialize(attributes = {}, arch = "") | |
| def initialize(arch, **attributes) |
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.
Can definitely move the order. But using **attributes breaks with the convention used in network.rb. Also Trying to change to ** attributes breaks the code.
Fix conditional & change argument order when creating new TPM object Signed-off-by: Jerone Young <jyoung@redhat.com>
Fix argument initialization order and fix error calls Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com> Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
By default change ppc64 to tpm0. As tpmrm0 is to be used by spapr-tpm-proxy and not spapr in case of using passthrough option. Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
Signed-off-by: Jerone Young <jyoung@redhat.com>
|
Created code for Foreman: |
ekohl
left a comment
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.
Code looks good to me. A quick test in tests/libvirt/models/compute/server_tests.rb tells me it works. I used this test:
test("with tpm set to true") do
server = Fog::Libvirt::Compute::Server.new(
{
:tpm => true,
:nics => [],
:volumes => []
}
)
xml = server.to_xml
xml.include?('<tpm model="tpm-crb">') && xml.include?('<backend type="emulator" version="2.0"/>')
endThen get the following XML:
<tpm model="tpm-crb">
<backend type="emulator" version="2.0"/>
</tpm>Is this what you'd expect?
|
Yeap for x86_64 that is the expected result. |
Add Trusted Platform Module (TPM) support
Signed-off-by: Jerone Young jyoung@redhat.com