diff --git a/pbconf/python-redfish.yml b/pbconf/python-redfish.yml index 8aa2fe9..191e0ab 100644 --- a/pbconf/python-redfish.yml +++ b/pbconf/python-redfish.yml @@ -68,7 +68,7 @@ sshport: # a QEMU rhel-3-i286 here means that the VM will be named rhel-3-i386.qemu # vmlist: - python-redfish: opensuse-12.3-i386,debian-8-i386,ubuntu-16.04-i386,mageia-5-i386,mageia-5-x86_64,fedora-23-x86_64,rhel-7-x86_64,opensuse-12.3-x86_64,sles-12-x86_64,debian-8-x86_64,ubuntu-16.04-x86_64 + python-redfish: rhel-6-i386,sles-11-i386,mageia-5-i386,rhel-6-x86_64,rhel-7-x86_64,sles-12-x86_64,sles-15-x86_64 # # # Valid values for vmtype are @@ -102,7 +102,7 @@ vmlist: # # Supported distribution for python-redfish velist: - python-redfish: opensuse-42.2-x86_64,centos-7-x86_64,fedora-25-x86_64,debian-8-x86_64,mageia-5-x86_64,ubuntu-16.04-x86_64 + python-redfish: centos-6-x86_64,centos-7-x86_64,debian-8-x86_64,debian-9-x86_64,ubuntu-16.04-x86_64,ubuntu-17.10-x86_64,ubuntu-18.04-x86_64,ubuntu-18.10-x86_64,mageia-5-x86_64,mageia-6-x86_64,fedora-25-x86_64,fedora-26-x86_64,fedora-27-x86_64,fedora-28-x86_64,fedora-29-x86_64,opensuse-42.1-x86_64,opensuse-42.2-x86_64,opensuse-42.3-x86_64,opensuse-15.0-x86_64,opensuse-15.1-x86_64 # # VE params vetype: diff --git a/redfish-client/redfish-client b/redfish-client/redfish-client index 700b18e..8bc3bfc 100755 --- a/redfish-client/redfish-client +++ b/redfish-client/redfish-client @@ -240,7 +240,7 @@ if __name__ == '__main__': render_template("manager_info.template") def display_chassis_info(redfish_data): - # Display system information using jinja2 template + # Display chassis information using jinja2 template render_template("chassis_info.template") def display_system_info(redfish_data): diff --git a/redfish-client/templates/system_info.template b/redfish-client/templates/system_info.template index 857b6aa..4f1eb77 100644 --- a/redfish-client/templates/system_info.template +++ b/redfish-client/templates/system_info.template @@ -50,7 +50,7 @@ Ethernet Interface : This system has no ethernet interface as Redfish standard data {%- endif %} Looking for potential OEM information : -{%- if system.data.Oem.Hpe %} +{%- if system.data.Oem.Hpe or system.data.Oem.Hp %} Supplemental information from HPE OEM part. {%- if system.network_adapters_collection %} {%- for networkadapter_index in system.network_adapters_collection.network_adapters_dict | sort %} @@ -84,7 +84,7 @@ Simple Storage : This system has no simple storage as Redfish standard data {%- endif %} Looking for potential OEM information : -{%- if system.data.Oem.Hpe %} +{%- if system.data.Oem.Hpe or system.data.Oem.Hp %} Supplemental information from HPE OEM part. {%- if system.smart_storage %} {%- for array_controllers_index in system.smart_storage.array_controllers_collection.array_controllers_dict | sort %} diff --git a/redfish/main.py b/redfish/main.py index 7077673..562c151 100644 --- a/redfish/main.py +++ b/redfish/main.py @@ -75,7 +75,7 @@ versions of resource types. On HTTP POST to create: -WHen POSTing to create a resource (e.g. create an account or session) the +When POSTing to create a resource (e.g. create an account or session) the guarantee is that a successful response includes a "Location" HTTP header indicating the resource URI of the newly created resource. The POST may also include a representation of the newly created object in a JSON response body @@ -99,7 +99,7 @@ JSON-SCHEMA: The json-schema available at /redfish/v1/Schemas governs the content of the resources, but keep in mind: * not every property in the schema is implemented in every implementation. -* some properties are schemed to allow both null and anotehr type like string +* some properties are schemed to allow both null and another type like string * or integer. Robust client code should check both the existence and type of interesting @@ -168,7 +168,7 @@ class RedfishConnection(object): """Initialize a connection to a Redfish service.""" # Specify a name for the logger as recommended by the logging # documentation. However for strange reason requests logs are not - # anymore capture in the log file. + # anymore captured in the log file. # TODO : Check strange behavior about requests logs. config.logger = config.initialize_logger(config.REDFISH_LOGFILE, config.CONSOLE_LOGGER_LEVEL, @@ -184,7 +184,7 @@ class RedfishConnection(object): self.connection_parameters.enforceSSL = enforceSSL self.connection_parameters.verify_cert = verify_cert - # Use DMTF mockup or not + # Use a mockup or not (like the DMTF or HPE one) self.__simulator = simulator # Session attributes @@ -233,7 +233,7 @@ class RedfishConnection(object): # Structure change with mockup 1.0.0, there is no links # section anymore. # =================================================================== - # TODO : Add a switch to allow the both structure + # TODO : Add a switch to allow both structures # =================================================================== # standard @@ -259,7 +259,8 @@ class RedfishConnection(object): try: self.Chassis = standard.ChassisCollection( - self.Root.get_link_url("Chassis"), self.connection_parameters) + self.Root.get_link_url("Chassis"), + self.connection_parameters) except AttributeError: self.Chassis = None diff --git a/redfish/standard.py b/redfish/standard.py index 5a32b05..c28ab2b 100644 --- a/redfish/standard.py +++ b/redfish/standard.py @@ -212,6 +212,8 @@ class Systems(Device): # This means we don't have Processors detailed data self.simple_storage_collection = None + hpeflag = False + hpflag = False try: self.data.Oem.Hpe try: @@ -233,6 +235,34 @@ class Systems(Device): # This means we don't have SmartStorage self.smart_storage = None except AttributeError: + # This means we don't have Hpe oem data + hpeflag = True + + try: + self.data.Oem.Hp + try: + self.network_adapters_collection = \ + hpe.NetworkAdaptersCollection( + self.get_link_url('NetworkAdapters', + self.data.Oem.Hp.Links), + connection_parameters) + except AttributeError: + # This means we don't have NetworkAdapters + self.network_adapters_collection = None + try: + self.smart_storage = \ + hpe.SmartStorage( + self.get_link_url('SmartStorage', + self.data.Oem.Hp.Links), + connection_parameters) + except AttributeError: + # This means we don't have SmartStorage + self.smart_storage = None + except AttributeError: + # This means we don't have Hp oem data + hpflag = True + + if hpeflag and hpflag: # This means we don't have oem data self.data.Oem = None