Add Trusted Platform Module (TPM) support#185
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.
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.
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.
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.
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. |
|
Anything else required for this to be merged ? |
Add Trusted Platform Module (TPM) support
Signed-off-by: Jerone Young jyoung@redhat.com