-
Notifications
You must be signed in to change notification settings - Fork 19
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
vmsdk (python): refine get_quote output format #22
Conversation
7bc033b
to
7980bbd
Compare
print(f'{indent}{type(self).__name__}:') | ||
if fmt == Quote.QUOTE_OUT_FORMAT_HUMAN: | ||
i = indent + " " | ||
print(f'{i}Header Version: {self.ver}') |
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.
Please use LOG instead of print
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.
Changed. Please review the updated version. Thanks!
|
||
class Quote(ABC): | ||
""" | ||
Quote abstract class (interface) | ||
""" | ||
|
||
QUOTE_OUT_FORMAT_RAW = "raw" | ||
QUOTE_OUT_FORMAT_HUMAN = "human" | ||
|
||
@abstractmethod | ||
def get_header(self) -> QuoteHeader: |
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.
Is this applicable for TPM quote?
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.
Sorry for the confusing. Please let me clarify:
They are not defined by TPM. These format are used for dump() that is defined in our code.
I think the definition can be shared by TPM Quote dump and TDX Qute dump.
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.
As discussion, I have removed these literal definitions from this top-level base class to avoid confusion.
Please review the updated version. Thanks!
b21d5fb
to
560e38e
Compare
Signed-off-by: zhongjie <[email protected]>
560e38e
to
901e713
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
return True | ||
return False | ||
|
||
|
||
class Tpm2Quote(Quote): |
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.
Let move Tpm2Quote to a new directory
No description provided.