Skip to content

Commit

Permalink
bumps version to 1.7.3 and fixes types
Browse files Browse the repository at this point in the history
  • Loading branch information
bb-Ricardo committed Jun 21, 2024
1 parent be0179a commit 89a8d98
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ It will also create a inventory of all components of a system.
R.I.P. IPMI
Version: 1.7.2 (2024-02-28)
Version: 1.7.3 (2024-06-21)
mandatory arguments:
-H HOST, --host HOST define the host to request. To change the port just
Expand Down Expand Up @@ -358,7 +358,7 @@ In case you need more information or want to debug the data you can add the verb
option. This will also add the `source_data` attribute for each inventory item.

### Inventory attributes
You can find a list of attributes for each item [here](cr_module/classes/inventory.py#L182)
You can find a list of attributes for each item [here](cr_module/classes/inventory.py#L183)

### Inventory file
It is also possible to use the cli option `--inventory_file` to write the inventory data to a file.
Expand Down
6 changes: 3 additions & 3 deletions check_redfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
R.I.P. IPMI
"""

__version__ = "1.7.2"
__version_date__ = "2024-02-28"
__version__ = "1.7.3"
__version_date__ = "2024-06-21"
__author__ = "Ricardo Bartels <[email protected]>"
__description__ = "Check Redfish Plugin"
__license__ = "MIT"
Expand Down Expand Up @@ -138,7 +138,7 @@ def parse_command_line():
parser.error("You need to specify at least one query command.")

# need to check this our self otherwise it's not
# possible to put the help command into a arguments group
# possible to put the help command into an arguments group
if result.host is None:
parser.error("No remote host defined")

Expand Down
5 changes: 2 additions & 3 deletions cr_module/classes/redfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_credentials(self):
self.password = self.cli_args.password
return

# 2. a authentication file is defined, lets try to parse it
# 2. an authentication file is defined, lets try to parse it
if self.cli_args.authfile is not None:

try:
Expand Down Expand Up @@ -235,8 +235,7 @@ def save_session_to_file(self):
if self.connection is None:
raise Exception("session not initialized")

# unset root attribute
# root attribute is an RisObject which can't be pickled
# unset root attribute as it's a RisObject which can't be pickled
root_data = self.connection.root
self.connection.root = None

Expand Down
2 changes: 1 addition & 1 deletion cr_module/classes/vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class VendorDellData(VendorGeneric):
system_event_log_location = "managers"

# ATTENTION: for Dell we only provide the "base" path.
# the Entries path will be discovered in the the according function
# the Entries path will be discovered in the according function
manager_event_log_entries_path = ["{system_manager_id}/LogServices/Lclog"]
system_event_log_entries_path = ["{system_manager_id}/LogServices/Sel"]

Expand Down
4 changes: 2 additions & 2 deletions cr_module/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def grab(structure=None, path=None, separator="."):
"""
get data from a complex object/json structure with a
"." separated path information. If a part of a path
is not not present then this function returns "None".
is not present then this function returns "None".
example structure:
data_structure = {
Expand Down Expand Up @@ -128,7 +128,7 @@ def get_status_data(status_data=None):
else:
return_data["State"] = status_data

# If status data is a dict then try to match the keys case insensitive.
# If status data is a dict then try to match the keys case-insensitive.
elif isinstance(status_data, dict):
for status_key, status_value in status_data.items():
for key in return_data.keys():
Expand Down
2 changes: 1 addition & 1 deletion cr_module/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def get_firmware_info_generic():
if component_id is None:
component_id = component_name

# mitigate issue for Supermicro on using IDs more then once
# mitigate issue for Supermicro on using IDs more than once
if plugin_object.rf.vendor == "Supermicro":
try:
int(component_id)
Expand Down
2 changes: 1 addition & 1 deletion cr_module/firmware_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def component_has_firmware_issues(inventory_type, model, firmware_version):
Returns
-------
bool
True if affect, False otherwise
True if affected, False otherwise
"""

if model is None or firmware_version is None:
Expand Down
2 changes: 1 addition & 1 deletion cr_module/nic.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_network_port(port_data=None, network_function_id=None, return_data=False
if plugin_object.rf.vendor != "Dell":
port_id = f"{adapter_id}.{port_id}"

# check if port has already be added
# check if port has already been added
if port_id in [p.id for p in plugin_object.inventory.get(NetworkPort)]:
# silently ignore that network port has already been parsed
# print(f"ALREADY in INVENTORY: {port_id}")
Expand Down
2 changes: 1 addition & 1 deletion cr_module/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ def get_enclosures(enclosure_link):
continue

# this controller has already been checked
# check if controller Id or Name have already be recorded
# now check if controller ID or Name has already been recorded
skip_controller = False
if simple_storage_controller_response.get("@odata.id").rstrip("/") in storage_controller_id_list or \
simple_storage_controller_response.get("Id") in \
Expand Down

0 comments on commit 89a8d98

Please sign in to comment.