Skip to content

Commit

Permalink
Initial OPI changes
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Ballard <[email protected]>
  • Loading branch information
ballle98 committed Jan 11, 2023
1 parent 5b10d68 commit 768c8ad
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 737 deletions.
37 changes: 9 additions & 28 deletions smbios_validation
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
#!/usr/bin/env python3
#
# Lint as: python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2019 Google LLC
# Copyright (c) 2023 Dell Inc, or its subsidiaries.
"""Main function to run SMBIOS validation."""

from absl import app
Expand All @@ -32,19 +22,10 @@ flags.DEFINE_string('file', '', 'dmidecode dump file path')
def print_source_code_header():
"""Print header when running the binary."""
print('*********************************************************************')
print('SMBIOS LESS Compliance Validation Tool\n')
print('Copyright 2019 Google LLC')
print('Licensed under the Apache License, Version 2.0 (the "License")')
print('you may not use this file except in compliance with the License.')
print('You may obtain a copy of the License at\n')
print('https://www.apache.org/licenses/LICENSE-2.0\n')
print('Unless required by applicable law or agreed to in writing, software')
print('distributed under the License is distributed on an "AS IS" BASIS,')
print(
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'
)
print('See the License for the specific language governing permissions and')
print('limitations under the License.')
print('SMBIOS OPI Compliance Validation Tool\n')
print('Copyright (c) 2019 Google LLC')
print('Copyright (c) 2023 Dell Inc, or its subsidiaries.')
print('SPDX-License-Identifier: Apache-2.0')
print(
'*********************************************************************\n')

Expand Down Expand Up @@ -82,13 +63,13 @@ def main(argv):
if is_less_compliant:
print(
termcolor.colored(
'**The SMBIOS implementation in this host is LESS compliant.**\n',
'**The SMBIOS implementation is OPI compliant.**\n',
color='green',
attrs=['bold']))
else:
print(
termcolor.colored(
'**The SMBIOS implementation in this host lacks LESS compliance.**\n',
'**The SMBIOS implementation lacks OPI compliance.**\n',
color='red',
attrs=['bold']))

Expand Down
Loading

0 comments on commit 768c8ad

Please sign in to comment.