From b2b2aeda0c6bf49b627e953304c56d8b0150c648 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Tue, 10 Sep 2019 13:36:00 -0700 Subject: [PATCH] Update sushy dependency to 2.0.0 Change-Id: If467ccbaf0290092bd856615c7d87b3829b70c6d --- requirements.txt | 2 +- .../tests/unit/json_samples/v2_1/drive.json | 2 +- .../v2_1/network_device_function.json | 2 +- .../resources/v2_1/chassis/test_chassis.py | 3 +- .../unit/resources/v2_1/chassis/test_power.py | 1 - .../resources/v2_1/chassis/test_power_zone.py | 4 +-- .../resources/v2_1/chassis/test_thermal.py | 1 - .../v2_1/chassis/test_thermal_zone.py | 4 +-- .../ethernet_switch/test_ethernet_switch.py | 3 +- .../test_ethernet_switch_acl.py | 4 +-- .../test_ethernet_switch_acl_rule.py | 4 +-- .../test_ethernet_switch_port.py | 4 +-- .../test_ethernet_switch_static_mac.py | 6 ++-- .../test_vlan_network_interface.py | 6 ++-- .../event_service/test_event_destination.py | 4 +-- .../v2_1/event_service/test_event_service.py | 1 - .../resources/v2_1/fabric/test_endpoint.py | 4 +-- .../unit/resources/v2_1/fabric/test_fabric.py | 4 +-- .../unit/resources/v2_1/fabric/test_port.py | 6 ++-- .../unit/resources/v2_1/fabric/test_switch.py | 6 ++-- .../unit/resources/v2_1/fabric/test_zone.py | 4 +-- .../v2_1/manager/test_ethernet_interface.py | 4 +-- .../resources/v2_1/manager/test_manager.py | 3 +- .../manager/test_manager_network_protocol.py | 1 - .../unit/resources/v2_1/node/test_node.py | 24 ++++++++-------- .../v2_1/registries/test_registries.py | 3 +- .../storage_service/test_storage_service.py | 4 +-- .../unit/resources/v2_1/system/test_drive.py | 1 - .../v2_1/system/test_ethernet_interface.py | 4 +-- .../unit/resources/v2_1/system/test_memory.py | 5 ++-- .../system/test_network_device_function.py | 4 +-- .../v2_1/system/test_network_interface.py | 4 +-- .../resources/v2_1/system/test_pcie_device.py | 1 - .../v2_1/system/test_pcie_function.py | 1 - .../resources/v2_1/system/test_processor.py | 5 ++-- .../resources/v2_1/system/test_storage.py | 4 +-- .../unit/resources/v2_1/system/test_system.py | 5 ++-- .../unit/resources/v2_1/task/test_task.py | 3 +- .../resources/v2_1/task/test_task_service.py | 1 - .../unit/resources/v2_1/test_rsdlib_v2_1.py | 1 - .../unit/resources/v2_2/chassis/test_power.py | 1 - .../resources/v2_2/chassis/test_thermal.py | 1 - .../ethernet_switch/test_ethernet_switch.py | 2 +- .../test_ethernet_switch_metrics.py | 1 - .../test_ethernet_switch_port.py | 3 +- .../test_ethernet_switch_port_metrics.py | 1 - .../unit/resources/v2_2/fabric/test_port.py | 1 - .../system/test_computer_system_metrics.py | 1 - .../unit/resources/v2_2/system/test_memory.py | 5 ++-- .../v2_2/system/test_memory_metrics.py | 1 - .../resources/v2_2/system/test_processor.py | 5 ++-- .../v2_2/system/test_processor_metrics.py | 1 - .../unit/resources/v2_2/system/test_system.py | 5 ++-- .../test_metric_definition.py | 6 ++-- .../telemetry_service/test_metric_report.py | 3 +- .../test_metric_report_definition.py | 3 +- .../test_telemetry_service.py | 1 - .../v2_2/telemetry_service/test_trigger.py | 9 ++++-- .../unit/resources/v2_2/test_rsdlib_v2_2.py | 1 - .../v2_2/update_service/test_action_info.py | 1 - .../update_service/test_update_service.py | 1 - .../ethernet_switch/test_ethernet_switch.py | 5 ++-- .../resources/v2_3/fabric/test_endpoint.py | 28 +++++++++++-------- .../unit/resources/v2_3/fabric/test_fabric.py | 10 ++++--- .../unit/resources/v2_3/fabric/test_zone.py | 10 ++++--- .../resources/v2_3/manager/test_manager.py | 4 +-- .../v2_3/node/test_attach_action_info.py | 1 - .../unit/resources/v2_3/node/test_node.py | 10 ++++--- .../v2_3/storage_service/test_drive.py | 24 ++++++++++------ .../storage_service/test_drive_metrics.py | 1 - .../v2_3/storage_service/test_storage_pool.py | 24 ++++++++++------ .../storage_service/test_storage_service.py | 10 ++++--- .../v2_3/storage_service/test_volume.py | 12 ++++---- .../storage_service/test_volume_metrics.py | 1 - .../v2_3/system/test_ethernet_interface.py | 9 +++--- .../unit/resources/v2_3/system/test_system.py | 23 +++++++++------ .../unit/resources/v2_3/test_rsdlib_v2_3.py | 1 - .../resources/v2_4/fabric/test_endpoint.py | 24 ++++++++++------ .../unit/resources/v2_4/fabric/test_fabric.py | 10 ++++--- .../unit/resources/v2_4/node/test_node.py | 10 ++++--- .../v2_4/storage_service/test_capacity.py | 1 - .../storage_service/test_storage_service.py | 9 +++--- .../v2_4/storage_service/test_volume.py | 4 +-- .../resources/v2_4/system/test_processor.py | 12 ++++---- .../unit/resources/v2_4/system/test_system.py | 23 +++++++++------ .../unit/resources/v2_4/test_rsdlib_v2_4.py | 1 - rsd_lib/tests/unit/test_main.py | 1 - 87 files changed, 254 insertions(+), 220 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7eef795..66e429c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ # process, which may cause wedges in the gate later. pbr>=2.0 # Apache-2.0 -sushy==1.8.1 # Apache-2.0 +sushy>=2.0.0 # Apache-2.0 jsonschema>=2.6.0 # MIT diff --git a/rsd_lib/tests/unit/json_samples/v2_1/drive.json b/rsd_lib/tests/unit/json_samples/v2_1/drive.json index 6a73885..23f6f77 100644 --- a/rsd_lib/tests/unit/json_samples/v2_1/drive.json +++ b/rsd_lib/tests/unit/json_samples/v2_1/drive.json @@ -55,7 +55,7 @@ "Oem": { "Intel_RackScale": { "@odata.type": "#Intel.Oem.Drive", - "EraseOnDetach": null, + "EraseOnDetach": false, "FirmwareVersion": "1.17", "DriveErased": true, "Storage": { diff --git a/rsd_lib/tests/unit/json_samples/v2_1/network_device_function.json b/rsd_lib/tests/unit/json_samples/v2_1/network_device_function.json index 885bb44..f5f7be1 100644 --- a/rsd_lib/tests/unit/json_samples/v2_1/network_device_function.json +++ b/rsd_lib/tests/unit/json_samples/v2_1/network_device_function.json @@ -32,7 +32,7 @@ "SecondaryTargetIPAddress": null, "SecondaryTargetTCPPort": null, "SecondaryLUN": null, - "SecondaryVLANEnable": null, + "SecondaryVLANEnable": false, "SecondaryVLANId": null, "SecondaryDNS": null, "IPMaskDNSViaDHCP": false, diff --git a/rsd_lib/tests/unit/resources/v2_1/chassis/test_chassis.py b/rsd_lib/tests/unit/resources/v2_1/chassis/test_chassis.py index aa86f51..1fad0af 100644 --- a/rsd_lib/tests/unit/resources/v2_1/chassis/test_chassis.py +++ b/rsd_lib/tests/unit/resources/v2_1/chassis/test_chassis.py @@ -37,7 +37,6 @@ class TestChassis(base.TestCase): ) def test_parse_attributes(self): - self.chassis_inst._parse_attributes() self.assertEqual("1.0.2", self.chassis_inst.redfish_version) self.assertEqual("FlexChassis1", self.chassis_inst.asset_tag) self.assertEqual("RackMount", self.chassis_inst.chassis_type) @@ -370,7 +369,6 @@ class TestChassisCollection(base.TestCase): ) def test__parse_attributes(self): - self.chassis_col._parse_attributes() self.assertEqual("1.0.2", self.chassis_col.redfish_version) self.assertEqual("Chassis Collection", self.chassis_col.name) self.assertIn( @@ -385,6 +383,7 @@ class TestChassisCollection(base.TestCase): self.chassis_col._conn, "/redfish/v1/Chassis/Chassis1", redfish_version=self.chassis_col.redfish_version, + registries=None, ) @mock.patch.object(chassis, "Chassis", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_1/chassis/test_power.py b/rsd_lib/tests/unit/resources/v2_1/chassis/test_power.py index ced362b..3bdfcb5 100644 --- a/rsd_lib/tests/unit/resources/v2_1/chassis/test_power.py +++ b/rsd_lib/tests/unit/resources/v2_1/chassis/test_power.py @@ -34,7 +34,6 @@ class PowerTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.power_inst._parse_attributes() self.assertEqual("Power", self.power_inst.identity) self.assertEqual("PowerName", self.power_inst.name) self.assertEqual("PowerSubsystem", self.power_inst.description) diff --git a/rsd_lib/tests/unit/resources/v2_1/chassis/test_power_zone.py b/rsd_lib/tests/unit/resources/v2_1/chassis/test_power_zone.py index 72b3371..16de2f4 100644 --- a/rsd_lib/tests/unit/resources/v2_1/chassis/test_power_zone.py +++ b/rsd_lib/tests/unit/resources/v2_1/chassis/test_power_zone.py @@ -36,7 +36,6 @@ class PowerZoneTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.power_zone_inst._parse_attributes() self.assertEqual("1", self.power_zone_inst.identity) self.assertEqual("power zone 1", self.power_zone_inst.name) self.assertEqual( @@ -120,7 +119,6 @@ class PowerZoneCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.power_zone_col._parse_attributes() self.assertEqual("1.1.0", self.power_zone_col.redfish_version) self.assertEqual( ("/redfish/v1/Chassis/Rack1/PowerZones/Power1",), @@ -136,6 +134,7 @@ class PowerZoneCollectionTestCase(testtools.TestCase): self.power_zone_col._conn, "/redfish/v1/Chassis/Rack1/PowerZones/Power1", redfish_version=self.power_zone_col.redfish_version, + registries=None, ) @mock.patch.object(power_zone, "PowerZone", autospec=True) @@ -146,6 +145,7 @@ class PowerZoneCollectionTestCase(testtools.TestCase): self.power_zone_col._conn, "/redfish/v1/Chassis/Rack1/PowerZones/Power1", redfish_version=self.power_zone_col.redfish_version, + registries=None, ) ] mock_power_zone.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal.py b/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal.py index 2ab5aab..911d86a 100644 --- a/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal.py +++ b/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal.py @@ -36,7 +36,6 @@ class ThermalTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.thermal_inst._parse_attributes() self.assertEqual("Thermal", self.thermal_inst.identity) self.assertEqual("ThermalName", self.thermal_inst.name) self.assertEqual("Thermal Subsystem", self.thermal_inst.description) diff --git a/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal_zone.py b/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal_zone.py index b328049..272bd4b 100644 --- a/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal_zone.py +++ b/rsd_lib/tests/unit/resources/v2_1/chassis/test_thermal_zone.py @@ -36,7 +36,6 @@ class ThermalZoneTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.thermal_zone_inst._parse_attributes() self.assertEqual("1", self.thermal_zone_inst.identity) self.assertEqual("thermal zone 1", self.thermal_zone_inst.name) self.assertEqual( @@ -131,7 +130,6 @@ class ThermalZoneCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.thermal_zone_col._parse_attributes() self.assertEqual("1.1.0", self.thermal_zone_col.redfish_version) self.assertEqual( ("/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1",), @@ -147,6 +145,7 @@ class ThermalZoneCollectionTestCase(testtools.TestCase): self.thermal_zone_col._conn, "/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1", redfish_version=self.thermal_zone_col.redfish_version, + registries=None, ) @mock.patch.object(thermal_zone, "ThermalZone", autospec=True) @@ -157,6 +156,7 @@ class ThermalZoneCollectionTestCase(testtools.TestCase): self.thermal_zone_col._conn, "/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1", redfish_version=self.thermal_zone_col.redfish_version, + registries=None, ) ] mock_thermal_zone.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch.py index e3767c2..e161123 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch.py @@ -40,7 +40,6 @@ class EthernetSwtichTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_switch_inst._parse_attributes() self.assertEqual("1.0.2", self.ethernet_switch_inst.redfish_version) self.assertEqual("Switch1", self.ethernet_switch_inst.identity) self.assertEqual("Switch1", self.ethernet_switch_inst.name) @@ -205,7 +204,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_switch_col._parse_attributes() self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version) self.assertEqual( "Ethernet Switches Collection", self.ethernet_switch_col.name @@ -225,6 +223,7 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): self.ethernet_switch_col._conn, "/redfish/v1/EthernetSwitches/Switch1", redfish_version=self.ethernet_switch_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_switch, "EthernetSwitch", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl.py index 145fb84..8192400 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl.py @@ -41,7 +41,6 @@ class EthernetSwitchACLTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.acl_inst._parse_attributes() self.assertEqual("1.0.2", self.acl_inst.redfish_version) self.assertEqual("ACL1", self.acl_inst.identity) self.assertEqual( @@ -230,7 +229,6 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.acl_col._parse_attributes() self.assertEqual("1.0.2", self.acl_col.redfish_version) self.assertEqual( "Ethernet Switch Access Control List Collection", self.acl_col.name @@ -249,6 +247,7 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase): self.acl_col._conn, "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1", redfish_version=self.acl_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_switch_acl, "EthernetSwitchACL", autospec=True) @@ -258,6 +257,7 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase): self.acl_col._conn, "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1", redfish_version=self.acl_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl_rule.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl_rule.py index f008c35..fef0ddf 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl_rule.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_acl_rule.py @@ -42,7 +42,6 @@ class EthernetSwitchACLRuleTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.acl_rule_inst._parse_attributes() self.assertEqual("1.0.2", self.acl_rule_inst.redfish_version) self.assertEqual("Rule1", self.acl_rule_inst.identity) self.assertEqual("Example Rule", self.acl_rule_inst.name) @@ -237,7 +236,6 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.acl_rule_col._parse_attributes() self.assertEqual("1.0.2", self.acl_rule_col.redfish_version) self.assertEqual( "Ethernet Switch Access Control " "List Rules Collection", @@ -259,6 +257,7 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase): self.acl_rule_col._conn, "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/Rules/Rule1", redfish_version=self.acl_rule_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -272,6 +271,7 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase): "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/" "Rules/Rule1", redfish_version=self.acl_rule_col.redfish_version, + registries=None, ) ] mock_acl_rule.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_port.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_port.py index 1cbfc19..5ae5762 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_port.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_port.py @@ -41,7 +41,6 @@ class EthernetSwitchPortTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_inst._parse_attributes() self.assertEqual("1.0.2", self.port_inst.redfish_version) self.assertEqual("Port1", self.port_inst.identity) self.assertEqual("Switch Port", self.port_inst.name) @@ -293,7 +292,6 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_col._parse_attributes() self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual("Ethernet Switch Port Collection", self.port_col.name) self.assertEqual( @@ -312,6 +310,7 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", redfish_version=self.port_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -323,6 +322,7 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", redfish_version=self.port_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_static_mac.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_static_mac.py index 7921439..a9a0cad 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_static_mac.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_ethernet_switch_static_mac.py @@ -43,7 +43,6 @@ class EthernetSwitchStaticMACTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.static_mac_inst._parse_attributes() self.assertEqual("1.0.2", self.static_mac_inst.redfish_version) self.assertEqual("1", self.static_mac_inst.identity) self.assertEqual("StaticMAC", self.static_mac_inst.name) @@ -118,7 +117,6 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.static_mac_col._parse_attributes() self.assertEqual("1.1.0", self.static_mac_col.redfish_version) self.assertEqual( ("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1",), @@ -136,6 +134,7 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase): self.static_mac_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1", redfish_version=self.static_mac_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -148,7 +147,8 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase): self.static_mac_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/" "StaticMACs/1", - redfish_version=self.static_mac_col.redfish_version, + self.static_mac_col.redfish_version, + None, ) ] mock_static_mac.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_vlan_network_interface.py b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_vlan_network_interface.py index 17c0c7c..3ea6d07 100644 --- a/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_vlan_network_interface.py +++ b/rsd_lib/tests/unit/resources/v2_1/ethernet_switch/test_vlan_network_interface.py @@ -40,7 +40,6 @@ class VLanNetworkInterfaceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.vlan_inst._parse_attributes() self.assertEqual("1.0.2", self.vlan_inst.redfish_version) self.assertEqual("VLAN1", self.vlan_inst.identity) self.assertEqual("VLAN Network Interface", self.vlan_inst.name) @@ -82,7 +81,6 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.vlan_col._parse_attributes() self.assertEqual("1.1.0", self.vlan_col.redfish_version) self.assertEqual( ("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1",), @@ -100,6 +98,7 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase): self.vlan_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1", redfish_version=self.vlan_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -112,7 +111,8 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase): self.vlan_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/" "VLANs/VLAN1", - redfish_version=self.vlan_col.redfish_version, + self.vlan_col.redfish_version, + None, ) ] mock_vlan.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_destination.py b/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_destination.py index 2879f6d..129b252 100644 --- a/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_destination.py +++ b/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_destination.py @@ -38,7 +38,6 @@ class EventSubscriptionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.event_destination_inst._parse_attributes() self.assertEqual("1", self.event_destination_inst.identity) self.assertEqual( "EventSubscription 1", self.event_destination_inst.name @@ -91,7 +90,6 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.event_subscription_col._parse_attributes() self.assertEqual("1.0.2", self.event_subscription_col.redfish_version) self.assertEqual( "Event Subscriptions Collection", self.event_subscription_col.name @@ -110,6 +108,7 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase): self.event_subscription_col._conn, "/redfish/v1/EventService/Subscriptions/1", redfish_version=self.event_subscription_col.redfish_version, + registries=None, ) @mock.patch.object(event_destination, "EventDestination", autospec=True) @@ -119,6 +118,7 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase): self.event_subscription_col._conn, "/redfish/v1/EventService/Subscriptions/1", redfish_version=self.event_subscription_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_service.py b/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_service.py index 6624654..bd2f842 100644 --- a/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_service.py +++ b/rsd_lib/tests/unit/resources/v2_1/event_service/test_event_service.py @@ -35,7 +35,6 @@ class EventServiceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.event_service_inst._parse_attributes() self.assertEqual("EventService", self.event_service_inst.identity) self.assertEqual("Event Service", self.event_service_inst.name) self.assertEqual("Event Service", self.event_service_inst.description) diff --git a/rsd_lib/tests/unit/resources/v2_1/fabric/test_endpoint.py b/rsd_lib/tests/unit/resources/v2_1/fabric/test_endpoint.py index 9307d9e..e5aee3a 100644 --- a/rsd_lib/tests/unit/resources/v2_1/fabric/test_endpoint.py +++ b/rsd_lib/tests/unit/resources/v2_1/fabric/test_endpoint.py @@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.endpoint_inst._parse_attributes() self.assertEqual("1.0.2", self.endpoint_inst.redfish_version) self.assertEqual( "The PCIe Physical function of an 850GB NVMe drive", @@ -99,7 +98,6 @@ class EndpointCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.endpoint_col._parse_attributes() self.assertEqual("1.0.2", self.endpoint_col.redfish_version) self.assertEqual("PCIe Endpoint Collection", self.endpoint_col.name) self.assertEqual( @@ -120,6 +118,7 @@ class EndpointCollectionTestCase(testtools.TestCase): self.endpoint_col._conn, "/redfish/v1/Fabrics/PCIe/Endpoints/NVMeDrivePF1", redfish_version=self.endpoint_col.redfish_version, + registries=None, ) @mock.patch.object(endpoint, "Endpoint", autospec=True) @@ -129,6 +128,7 @@ class EndpointCollectionTestCase(testtools.TestCase): self.endpoint_col._conn, "/redfish/v1/Fabrics/PCIe/Endpoints" "/HostRootComplex1", redfish_version=self.endpoint_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(3, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/fabric/test_fabric.py b/rsd_lib/tests/unit/resources/v2_1/fabric/test_fabric.py index 56e813d..91e63f4 100644 --- a/rsd_lib/tests/unit/resources/v2_1/fabric/test_fabric.py +++ b/rsd_lib/tests/unit/resources/v2_1/fabric/test_fabric.py @@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.fabric_inst._parse_attributes() self.assertEqual("1.0.2", self.fabric_inst.redfish_version) self.assertEqual("PCIe Fabric", self.fabric_inst.description) self.assertEqual("PCIe", self.fabric_inst.identity) @@ -202,7 +201,6 @@ class FabricCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.fabric_col._parse_attributes() self.assertEqual("1.0.2", self.fabric_col.redfish_version) self.assertEqual("Fabric Collection", self.fabric_col.name) self.assertEqual( @@ -216,6 +214,7 @@ class FabricCollectionTestCase(testtools.TestCase): self.fabric_col._conn, "/redfish/v1/Fabrics/PCIe", redfish_version=self.fabric_col.redfish_version, + registries=None, ) @mock.patch.object(fabric, "Fabric", autospec=True) @@ -225,6 +224,7 @@ class FabricCollectionTestCase(testtools.TestCase): self.fabric_col._conn, "/redfish/v1/Fabrics/PCIe", redfish_version=self.fabric_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/fabric/test_port.py b/rsd_lib/tests/unit/resources/v2_1/fabric/test_port.py index 20e1b5f..ee05590 100644 --- a/rsd_lib/tests/unit/resources/v2_1/fabric/test_port.py +++ b/rsd_lib/tests/unit/resources/v2_1/fabric/test_port.py @@ -38,7 +38,6 @@ class PortTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_inst._parse_attributes() self.assertEqual("Up1", self.port_inst.identity) self.assertEqual("PCIe Upstream Port 1", self.port_inst.name) self.assertEqual("PCIe Upstream Port 1", self.port_inst.description) @@ -73,7 +72,7 @@ class PortTestCase(testtools.TestCase): self.assertRaisesRegex( exceptions.MissingAttributeError, "attribute Actions/#Port.Reset/target", - self.port_inst._parse_attributes, + self.port_inst.refresh, ) def test_get__reset_action_element(self): @@ -135,7 +134,6 @@ class PortCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_col._parse_attributes() self.assertEqual("PCIe Port Collection", self.port_col.name) self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual( @@ -157,6 +155,7 @@ class PortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1", redfish_version=self.port_col.redfish_version, + registries=None, ) @mock.patch.object(port, "Port", autospec=True) @@ -166,6 +165,7 @@ class PortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/Fabrics/PCIe/Switches/1/" "Ports/Down2", redfish_version="1.0.2", + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(mock_port.call_count, 4) diff --git a/rsd_lib/tests/unit/resources/v2_1/fabric/test_switch.py b/rsd_lib/tests/unit/resources/v2_1/fabric/test_switch.py index 182c246..d9f4cf0 100644 --- a/rsd_lib/tests/unit/resources/v2_1/fabric/test_switch.py +++ b/rsd_lib/tests/unit/resources/v2_1/fabric/test_switch.py @@ -39,7 +39,6 @@ class SwitchTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.switch_inst._parse_attributes() self.assertEqual("1", self.switch_inst.identity) self.assertEqual("PCIe Switch", self.switch_inst.name) self.assertEqual("PCIe Switch", self.switch_inst.description) @@ -73,7 +72,7 @@ class SwitchTestCase(testtools.TestCase): self.assertRaisesRegex( exceptions.MissingAttributeError, "attribute Actions/#Switch.Reset/target", - self.switch_inst._parse_attributes, + self.switch_inst.refresh, ) def test_get__reset_action_element(self): @@ -176,7 +175,6 @@ class SwitchCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.switch_col._parse_attributes() self.assertEqual("Switch Collection", self.switch_col.name) self.assertEqual( ("/redfish/v1/Fabrics/PCIe/Switches/1",), @@ -190,6 +188,7 @@ class SwitchCollectionTestCase(testtools.TestCase): self.switch_col._conn, "/redfish/v1/Fabrics/PCIe/Switches/1", redfish_version=self.switch_col.redfish_version, + registries=None, ) @mock.patch.object(switch, "Switch", autospec=True) @@ -199,6 +198,7 @@ class SwitchCollectionTestCase(testtools.TestCase): self.switch_col._conn, "/redfish/v1/Fabrics/PCIe/Switches/1", redfish_version="1.0.2", + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/fabric/test_zone.py b/rsd_lib/tests/unit/resources/v2_1/fabric/test_zone.py index 4a1d2ff..b697665 100644 --- a/rsd_lib/tests/unit/resources/v2_1/fabric/test_zone.py +++ b/rsd_lib/tests/unit/resources/v2_1/fabric/test_zone.py @@ -35,7 +35,6 @@ class ZoneTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.zone_inst._parse_attributes() self.assertEqual("1.0.2", self.zone_inst.redfish_version) self.assertEqual("PCIe Zone 1", self.zone_inst.description) self.assertEqual("1", self.zone_inst.identity) @@ -109,7 +108,6 @@ class ZoneCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.zone_col._parse_attributes() self.assertEqual("1.0.2", self.zone_col.redfish_version) self.assertEqual("PCIe Zone Collection", self.zone_col.name) self.assertEqual( @@ -127,6 +125,7 @@ class ZoneCollectionTestCase(testtools.TestCase): self.zone_col._conn, "/redfish/v1/Fabrics/PCIe/Zones/1", redfish_version=self.zone_col.redfish_version, + registries=None, ) @mock.patch.object(zone, "Zone", autospec=True) @@ -136,6 +135,7 @@ class ZoneCollectionTestCase(testtools.TestCase): self.zone_col._conn, "/redfish/v1/Fabrics/PCIe/Zones/2", redfish_version=self.zone_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(2, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/manager/test_ethernet_interface.py b/rsd_lib/tests/unit/resources/v2_1/manager/test_ethernet_interface.py index 7b8fea6..7705c57 100644 --- a/rsd_lib/tests/unit/resources/v2_1/manager/test_ethernet_interface.py +++ b/rsd_lib/tests/unit/resources/v2_1/manager/test_ethernet_interface.py @@ -39,7 +39,6 @@ class EthernetInterface(testtools.TestCase): ) def test_parse_attributes(self): - self.ethernet_interface_inst._parse_attributes() self.assertEqual("LAN1", self.ethernet_interface_inst.identity) self.assertEqual( "Ethernet Interface", self.ethernet_interface_inst.name @@ -204,7 +203,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_interface_col._parse_attributes() self.assertEqual("1.0.2", self.ethernet_interface_col.redfish_version) self.assertEqual( ("/redfish/v1/Managers/1/EthernetInterfaces/1",), @@ -220,6 +218,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): self.ethernet_interface_col._conn, "/redfish/v1/Managers/1/EthernetInterfaces/1", redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_interface, "EthernetInterface", autospec=True) @@ -230,6 +229,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): self.ethernet_interface_col._conn, "/redfish/v1/Managers/1/EthernetInterfaces/1", redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, ) ] mock_ethernet_interface.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/manager/test_manager.py b/rsd_lib/tests/unit/resources/v2_1/manager/test_manager.py index 48b3be7..059431f 100644 --- a/rsd_lib/tests/unit/resources/v2_1/manager/test_manager.py +++ b/rsd_lib/tests/unit/resources/v2_1/manager/test_manager.py @@ -35,7 +35,6 @@ class TestManager(base.TestCase): ) def test_parse_attributes(self): - self.manager_inst._parse_attributes() self.assertEqual("1.0.2", self.manager_inst.redfish_version) self.assertEqual("1", self.manager_inst.identity) self.assertEqual("Manager", self.manager_inst.name) @@ -238,7 +237,6 @@ class TestManagerCollection(base.TestCase): ) def test_parse_attributes(self): - self.manager_col._parse_attributes() self.assertEqual("1.0.2", self.manager_col.redfish_version) self.assertEqual("Manager Collection", self.manager_col.name) self.assertEqual( @@ -258,6 +256,7 @@ class TestManagerCollection(base.TestCase): self.manager_col._conn, "/redfish/v1/Managers/RMC", redfish_version=self.manager_col.redfish_version, + registries=None, ) @mock.patch.object(manager, "Manager", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_1/manager/test_manager_network_protocol.py b/rsd_lib/tests/unit/resources/v2_1/manager/test_manager_network_protocol.py index 35d16cc..8ba843c 100644 --- a/rsd_lib/tests/unit/resources/v2_1/manager/test_manager_network_protocol.py +++ b/rsd_lib/tests/unit/resources/v2_1/manager/test_manager_network_protocol.py @@ -40,7 +40,6 @@ class NetworkProtocolTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.network_protocol_inst._parse_attributes() self.assertEqual( "NetworkProtocol", self.network_protocol_inst.identity ) diff --git a/rsd_lib/tests/unit/resources/v2_1/node/test_node.py b/rsd_lib/tests/unit/resources/v2_1/node/test_node.py index ab4f506..3b194ad 100644 --- a/rsd_lib/tests/unit/resources/v2_1/node/test_node.py +++ b/rsd_lib/tests/unit/resources/v2_1/node/test_node.py @@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.node_inst._parse_attributes() self.assertEqual("1.0.2", self.node_inst.redfish_version) self.assertEqual("Node #1", self.node_inst.description) self.assertEqual("Allocated", self.node_inst.composed_node_state) @@ -91,7 +90,7 @@ class NodeTestCase(testtools.TestCase): self.assertRaisesRegex( exceptions.MissingAttributeError, "attribute Actions", - self.node_inst._parse_attributes, + self.node_inst.refresh, ) def test__parse_attributes_missing_reset_target(self): @@ -99,7 +98,7 @@ class NodeTestCase(testtools.TestCase): self.assertRaisesRegex( exceptions.MissingAttributeError, "attribute Actions/#ComposedNode.Reset/target", - self.node_inst._parse_attributes, + self.node_inst.refresh, ) def test_get__reset_action_element(self): @@ -310,7 +309,7 @@ class NodeTestCase(testtools.TestCase): "Resource@Redfish.AllowableValues" ] ) = [] - self.node_inst._parse_attributes() + self.node_inst.refresh() expected = self.node_inst.get_allowed_attach_endpoints() result = () self.assertEqual(expected, result) @@ -355,7 +354,7 @@ class NodeTestCase(testtools.TestCase): "Resource@Redfish.AllowableValues" ] ) = [] - self.node_inst._parse_attributes() + self.node_inst.refresh() expected = self.node_inst.get_allowed_detach_endpoints() result = () self.assertEqual(expected, result) @@ -383,7 +382,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json["Memory"]["Status"].pop("Health") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.status.health) @@ -393,7 +392,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json["Memory"]["Status"].pop("State") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.status.health) @@ -403,7 +402,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json["Memory"]["Status"].pop("HealthRollup") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.status.health) @@ -413,7 +412,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json["Memory"].pop("Status") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.status) @@ -421,7 +420,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json["Memory"].pop("TotalSystemMemoryGiB") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(None, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.status) @@ -429,7 +428,7 @@ class NodeTestCase(testtools.TestCase): # | GIVEN | self.node_inst._json.pop("Memory") # | WHEN | - self.node_inst._parse_attributes() + self.node_inst.refresh() # | THEN | self.assertEqual(None, self.node_inst.memory) @@ -461,7 +460,6 @@ class NodeCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.node_col._parse_attributes() self.assertEqual("1.0.2", self.node_col.redfish_version) self.assertEqual("Composed Nodes Collection", self.node_col.name) self.assertEqual( @@ -475,6 +473,7 @@ class NodeCollectionTestCase(testtools.TestCase): self.node_col._conn, "/redfish/v1/Nodes/Node1", redfish_version=self.node_col.redfish_version, + registries=None, ) @mock.patch.object(node, "Node", autospec=True) @@ -484,6 +483,7 @@ class NodeCollectionTestCase(testtools.TestCase): self.node_col._conn, "/redfish/v1/Nodes/Node1", redfish_version=self.node_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/registries/test_registries.py b/rsd_lib/tests/unit/resources/v2_1/registries/test_registries.py index f044739..b9a7b3d 100644 --- a/rsd_lib/tests/unit/resources/v2_1/registries/test_registries.py +++ b/rsd_lib/tests/unit/resources/v2_1/registries/test_registries.py @@ -34,7 +34,6 @@ class RegistriesTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.registries_inst._parse_attributes() self.assertEqual("Base", self.registries_inst.identity) self.assertEqual( "Base Message Registry File", self.registries_inst.name @@ -71,7 +70,6 @@ class RegistriesCollectionTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.registries_col._parse_attributes() self.assertEqual("Registry File Collection", self.registries_col.name) self.assertEqual( ("/redfish/v1/Registries/Base",), @@ -88,6 +86,7 @@ class RegistriesCollectionTestCase(testtools.TestCase): self.registries_col._conn, "/redfish/v1/Registries/Base", redfish_version=self.registries_col.redfish_version, + registries=None, ) @mock.patch.object( diff --git a/rsd_lib/tests/unit/resources/v2_1/storage_service/test_storage_service.py b/rsd_lib/tests/unit/resources/v2_1/storage_service/test_storage_service.py index 4eeb3b0..94f8b76 100644 --- a/rsd_lib/tests/unit/resources/v2_1/storage_service/test_storage_service.py +++ b/rsd_lib/tests/unit/resources/v2_1/storage_service/test_storage_service.py @@ -38,7 +38,6 @@ class StorageServiceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.storage_service_inst._parse_attributes() self.assertEqual("1.0.2", self.storage_service_inst.redfish_version) self.assertEqual( "Storage Service", self.storage_service_inst.description @@ -249,7 +248,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.storage_service_col._parse_attributes() self.assertEqual("1.0.2", self.storage_service_col.redfish_version) self.assertEqual( "Storage Services Collection", self.storage_service_col.name @@ -266,6 +264,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase): self.storage_service_col._conn, "/redfish/v1/Services/RSS1", redfish_version=self.storage_service_col.redfish_version, + registries=None, ) @mock.patch.object(storage_service, "StorageService", autospec=True) @@ -275,6 +274,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase): self.storage_service_col._conn, "/redfish/v1/Services/RSS1", redfish_version=self.storage_service_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_drive.py b/rsd_lib/tests/unit/resources/v2_1/system/test_drive.py index b2d2561..0adac1f 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_drive.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_drive.py @@ -36,7 +36,6 @@ class DriveTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.drive_inst._parse_attributes() self.assertEqual("1.1.0", self.drive_inst.redfish_version) self.assertEqual("OK", self.drive_inst.status_indicator) self.assertEqual("Lit", self.drive_inst.indicator_led) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_ethernet_interface.py b/rsd_lib/tests/unit/resources/v2_1/system/test_ethernet_interface.py index f92b1b8..ebf38fe 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_ethernet_interface.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_ethernet_interface.py @@ -38,7 +38,6 @@ class EthernetInterfaceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_interface_inst._parse_attributes() self.assertEqual( "Ethernet Interface", self.ethernet_interface_inst.name ) @@ -130,7 +129,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_interface_col._parse_attributes() self.assertEqual("1.1.0", self.ethernet_interface_col.redfish_version) self.assertEqual( ("/redfish/v1/Systems/System1/EthernetInterfaces/LAN1",), @@ -146,6 +144,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): self.ethernet_interface_col._conn, "/redfish/v1/Systems/System1/EthernetInterfaces/LAN1", redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_interface, "EthernetInterface", autospec=True) @@ -156,6 +155,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): self.ethernet_interface_col._conn, "/redfish/v1/Systems/System1/EthernetInterfaces/LAN1", redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, ) ] mock_network_interface.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_memory.py b/rsd_lib/tests/unit/resources/v2_1/system/test_memory.py index c1da0ac..4fb010e 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_memory.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_memory.py @@ -36,7 +36,6 @@ class MemoryTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.memory_inst._parse_attributes() self.assertEqual("1.1.0", self.memory_inst.redfish_version) self.assertEqual("DIMM", self.memory_inst.name) self.assertEqual("Dimm1", self.memory_inst.identity) @@ -88,7 +87,6 @@ class MemoryCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.sys_memory_col._parse_attributes() self.assertEqual("1.1.0", self.sys_memory_col.redfish_version) self.assertEqual( ( @@ -107,6 +105,7 @@ class MemoryCollectionTestCase(testtools.TestCase): self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm1", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ) @mock.patch.object(memory, "Memory", autospec=True) @@ -117,11 +116,13 @@ class MemoryCollectionTestCase(testtools.TestCase): self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm1", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ), mock.call( self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm2", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ), ] mock_memory.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_network_device_function.py b/rsd_lib/tests/unit/resources/v2_1/system/test_network_device_function.py index 404ec38..33b3715 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_network_device_function.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_network_device_function.py @@ -40,7 +40,6 @@ class NetworkDeviceFunctionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.network_device_function_inst._parse_attributes() self.assertEqual( "1.1.0", self.network_device_function_inst.redfish_version ) @@ -231,7 +230,6 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.network_device_function_col._parse_attributes() self.assertEqual( "1.1.0", self.network_device_function_col.redfish_version ) @@ -256,6 +254,7 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase): "/redfish/v1/Systems/System1/NetworkInterfaces/1/" "NetworkDeviceFunctions/1", redfish_version=self.network_device_function_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -268,6 +267,7 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase): "/redfish/v1/Systems/System1/NetworkInterfaces/1/" "NetworkDeviceFunctions/1", redfish_version=self.network_device_function_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_network_interface.py b/rsd_lib/tests/unit/resources/v2_1/system/test_network_interface.py index d0c623e..9c18f0d 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_network_interface.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_network_interface.py @@ -38,7 +38,6 @@ class NetworkInterface(testtools.TestCase): ) def test__parse_attributes(self): - self.network_interface_inst._parse_attributes() self.assertEqual("1.1.0", self.network_interface_inst.redfish_version) self.assertEqual( "Network Device View", self.network_interface_inst.name @@ -138,7 +137,6 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.network_interface_col._parse_attributes() self.assertEqual("1.1.0", self.network_interface_col.redfish_version) self.assertEqual( ("/redfish/v1/Systems/System1/NetworkInterfaces/1",), @@ -154,6 +152,7 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase): self.network_interface_col._conn, "/redfish/v1/Systems/System1/NetworkInterfaces/1", redfish_version=self.network_interface_col.redfish_version, + registries=None, ) @mock.patch.object(network_interface, "NetworkInterface", autospec=True) @@ -163,6 +162,7 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase): self.network_interface_col._conn, "/redfish/v1/Systems/System1/NetworkInterfaces/1", redfish_version=self.network_interface_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_device.py b/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_device.py index 7c3c178..944c383 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_device.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_device.py @@ -36,7 +36,6 @@ class PCIeDeviceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.pcie_device_inst._parse_attributes() self.assertEqual("Device1", self.pcie_device_inst.identity) self.assertEqual("NVMe SSD Drive", self.pcie_device_inst.name) self.assertEqual( diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_function.py b/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_function.py index 72562dd..e91c856 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_function.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_pcie_function.py @@ -36,7 +36,6 @@ class PCIeFunctionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.pcie_function_inst._parse_attributes() self.assertEqual("1", self.pcie_function_inst.identity) self.assertEqual("SSD", self.pcie_function_inst.name) self.assertEqual("SSD Drive", self.pcie_function_inst.description) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_processor.py b/rsd_lib/tests/unit/resources/v2_1/system/test_processor.py index b83ce3f..067862d 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_processor.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_processor.py @@ -36,7 +36,6 @@ class ProcessorTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.processor_inst._parse_attributes() self.assertEqual("CPU1", self.processor_inst.identity) self.assertEqual("Processor", self.processor_inst.name) self.assertEqual(None, self.processor_inst.description) @@ -98,7 +97,6 @@ class ProcessorCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.processor_col._parse_attributes() self.assertEqual("1.1.0", self.processor_col.redfish_version) self.assertEqual( ( @@ -117,6 +115,7 @@ class ProcessorCollectionTestCase(testtools.TestCase): self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU1", redfish_version=self.processor_col.redfish_version, + registries=None, ) @mock.patch.object(processor, "Processor", autospec=True) @@ -127,11 +126,13 @@ class ProcessorCollectionTestCase(testtools.TestCase): self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU1", redfish_version=self.processor_col.redfish_version, + registries=None, ), mock.call( self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU2", redfish_version=self.processor_col.redfish_version, + registries=None, ), ] mock_processor.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_storage.py b/rsd_lib/tests/unit/resources/v2_1/system/test_storage.py index cc2ca20..de9a40d 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_storage.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_storage.py @@ -37,7 +37,6 @@ class StorageSubsystemTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.storage_inst._parse_attributes() self.assertEqual("SATA Storage System", self.storage_inst.name) self.assertEqual("1", self.storage_inst.identity) self.assertEqual("System SATA", self.storage_inst.description) @@ -167,7 +166,6 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.storage_subsystem_col._parse_attributes() self.assertEqual("1.1.0", self.storage_subsystem_col.redfish_version) self.assertEqual( ("/redfish/v1/Systems/1/Storage/SATA",), @@ -183,6 +181,7 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase): self.storage_subsystem_col._conn, "/redfish/v1/Systems/1/Storage/SATA", redfish_version=self.storage_subsystem_col.redfish_version, + registries=None, ) @mock.patch.object(storage, "Storage", autospec=True) @@ -193,6 +192,7 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase): self.storage_subsystem_col._conn, "/redfish/v1/Systems/1/Storage/SATA", redfish_version=self.storage_subsystem_col.redfish_version, + registries=None, ) ] mock_storage_subsystem.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/system/test_system.py b/rsd_lib/tests/unit/resources/v2_1/system/test_system.py index 0d7837a..9b77af6 100644 --- a/rsd_lib/tests/unit/resources/v2_1/system/test_system.py +++ b/rsd_lib/tests/unit/resources/v2_1/system/test_system.py @@ -44,7 +44,6 @@ class SystemTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.system_inst._parse_attributes() self.assertEqual("1.1.0", self.system_inst.redfish_version) self.assertEqual("System1", self.system_inst.identity) self.assertEqual("My Computer System", self.system_inst.name) @@ -691,7 +690,6 @@ class SystemCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.system_col._parse_attributes() self.assertEqual("1.1.0", self.system_col.redfish_version) self.assertEqual( ("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"), @@ -705,6 +703,7 @@ class SystemCollectionTestCase(testtools.TestCase): self.system_col._conn, "/redfish/v1/Systems/System1", redfish_version=self.system_col.redfish_version, + registries=None, ) @mock.patch.object(system, "System", autospec=True) @@ -715,11 +714,13 @@ class SystemCollectionTestCase(testtools.TestCase): self.system_col._conn, "/redfish/v1/Systems/System1", redfish_version=self.system_col.redfish_version, + registries=None, ), mock.call( self.system_col._conn, "/redfish/v1/Systems/System2", redfish_version=self.system_col.redfish_version, + registries=None, ), ] mock_system.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_1/task/test_task.py b/rsd_lib/tests/unit/resources/v2_1/task/test_task.py index f45bcf0..c846c93 100644 --- a/rsd_lib/tests/unit/resources/v2_1/task/test_task.py +++ b/rsd_lib/tests/unit/resources/v2_1/task/test_task.py @@ -35,7 +35,6 @@ class TaskTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.task_inst._parse_attributes() self.assertEqual("1", self.task_inst.identity) self.assertEqual("Task 1", self.task_inst.name) self.assertEqual("Task 1", self.task_inst.description) @@ -76,7 +75,6 @@ class TaskCollectionTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.task_col._parse_attributes() self.assertEqual("Task Collection", self.task_col.name) self.assertEqual( ("/redfish/v1/TaskService/Tasks/1",), @@ -91,6 +89,7 @@ class TaskCollectionTestCase(testtools.TestCase): self.task_col._conn, "/redfish/v1/TaskService/Tasks/1", redfish_version=self.task_col.redfish_version, + registries=None, ) @mock.patch.object(task, "Task", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_1/task/test_task_service.py b/rsd_lib/tests/unit/resources/v2_1/task/test_task_service.py index 86271b0..04a727c 100644 --- a/rsd_lib/tests/unit/resources/v2_1/task/test_task_service.py +++ b/rsd_lib/tests/unit/resources/v2_1/task/test_task_service.py @@ -36,7 +36,6 @@ class TaskServiceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.task_service_inst._parse_attributes() self.assertEqual("TaskService", self.task_service_inst.identity) self.assertEqual("Tasks Service", self.task_service_inst.name) self.assertEqual( diff --git a/rsd_lib/tests/unit/resources/v2_1/test_rsdlib_v2_1.py b/rsd_lib/tests/unit/resources/v2_1/test_rsdlib_v2_1.py index 7bd6d8f..a1e6f9d 100644 --- a/rsd_lib/tests/unit/resources/v2_1/test_rsdlib_v2_1.py +++ b/rsd_lib/tests/unit/resources/v2_1/test_rsdlib_v2_1.py @@ -42,7 +42,6 @@ class RSDLibV2_1TestCase(testtools.TestCase): self.rsd = v2_1.RSDLibV2_1(self.conn) def test__parse_attributes(self): - self.rsd._parse_attributes() self.assertEqual("2.1.0", self.rsd._rsd_api_version) self.assertEqual("1.0.2", self.rsd._redfish_version) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) diff --git a/rsd_lib/tests/unit/resources/v2_2/chassis/test_power.py b/rsd_lib/tests/unit/resources/v2_2/chassis/test_power.py index 72f75a2..7add9a9 100644 --- a/rsd_lib/tests/unit/resources/v2_2/chassis/test_power.py +++ b/rsd_lib/tests/unit/resources/v2_2/chassis/test_power.py @@ -34,7 +34,6 @@ class PowerTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.power_inst._parse_attributes() self.assertEqual( "Off", self.power_inst.power_supplies[0].indicator_led ) diff --git a/rsd_lib/tests/unit/resources/v2_2/chassis/test_thermal.py b/rsd_lib/tests/unit/resources/v2_2/chassis/test_thermal.py index 75e1947..495d07a 100644 --- a/rsd_lib/tests/unit/resources/v2_2/chassis/test_thermal.py +++ b/rsd_lib/tests/unit/resources/v2_2/chassis/test_thermal.py @@ -36,7 +36,6 @@ class ThermalTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.thermal._parse_attributes() self.assertEqual( 12, self.thermal.oem.intel_rackscale.volumetric_airflow_cfm ) diff --git a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch.py b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch.py index c90856a..cb57b6e 100644 --- a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch.py +++ b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch.py @@ -176,7 +176,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.ethernet_switch_col._parse_attributes() self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version) self.assertEqual( "Ethernet Switches Collection", self.ethernet_switch_col.name @@ -196,6 +195,7 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): self.ethernet_switch_col._conn, "/redfish/v1/EthernetSwitches/Switch1", redfish_version=self.ethernet_switch_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_switch, "EthernetSwitch", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_metrics.py b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_metrics.py index 41902ff..7bba221 100644 --- a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_metrics.py @@ -38,7 +38,6 @@ class MetricsTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.metrics_inst._parse_attributes() self.assertEqual( "EthernetSwitch Metrics for Switch1", self.metrics_inst.name ) diff --git a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port.py b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port.py index c305955..5c274b4 100644 --- a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port.py +++ b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port.py @@ -119,7 +119,6 @@ class PortCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_col._parse_attributes() self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual("Ethernet Switch Port Collection", self.port_col.name) self.assertEqual( @@ -138,6 +137,7 @@ class PortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", redfish_version=self.port_col.redfish_version, + registries=None, ) @mock.patch.object( @@ -149,6 +149,7 @@ class PortCollectionTestCase(testtools.TestCase): self.port_col._conn, "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", redfish_version=self.port_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port_metrics.py b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port_metrics.py index f3ccfda..00d8091 100644 --- a/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_2/ethernet_switch/test_ethernet_switch_port_metrics.py @@ -40,7 +40,6 @@ class PortMetricsTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_metrics_inst._parse_attributes() self.assertEqual("1.1.0", self.port_metrics_inst.redfish_version) self.assertEqual( "Ethernet Switch Port Metrics", self.port_metrics_inst.name diff --git a/rsd_lib/tests/unit/resources/v2_2/fabric/test_port.py b/rsd_lib/tests/unit/resources/v2_2/fabric/test_port.py index 8b2ca77..0049350 100644 --- a/rsd_lib/tests/unit/resources/v2_2/fabric/test_port.py +++ b/rsd_lib/tests/unit/resources/v2_2/fabric/test_port.py @@ -37,7 +37,6 @@ class PortTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.port_inst._parse_attributes() self.assertEqual( "/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1/Metrics", self.port_inst.oem.intel_rackscale.metrics, diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_computer_system_metrics.py b/rsd_lib/tests/unit/resources/v2_2/system/test_computer_system_metrics.py index ab62e7d..5d95989 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_computer_system_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_computer_system_metrics.py @@ -40,7 +40,6 @@ class MetricsTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.system_metrics_inst._parse_attributes() self.assertEqual("1.0.2", self.system_metrics_inst.redfish_version) self.assertEqual( "Computer System Metrics for System1", diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_memory.py b/rsd_lib/tests/unit/resources/v2_2/system/test_memory.py index ef1162e..332bf5e 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_memory.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_memory.py @@ -37,7 +37,6 @@ class MemoryTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.memory_inst._parse_attributes() self.assertEqual("1.1.0", self.memory_inst.redfish_version) self.assertEqual("DIMM", self.memory_inst.name) self.assertEqual("Dimm1", self.memory_inst.identity) @@ -140,7 +139,6 @@ class MemoryCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.sys_memory_col._parse_attributes() self.assertEqual("1.1.0", self.sys_memory_col.redfish_version) self.assertEqual( ( @@ -159,6 +157,7 @@ class MemoryCollectionTestCase(testtools.TestCase): self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm1", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ) @mock.patch.object(memory, "Memory", autospec=True) @@ -169,11 +168,13 @@ class MemoryCollectionTestCase(testtools.TestCase): self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm1", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ), mock.call( self.sys_memory_col._conn, "/redfish/v1/Systems/System1/Memory/Dimm2", redfish_version=self.sys_memory_col.redfish_version, + registries=None, ), ] mock_memory.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_memory_metrics.py b/rsd_lib/tests/unit/resources/v2_2/system/test_memory_metrics.py index 7402d7b..4f493c9 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_memory_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_memory_metrics.py @@ -38,7 +38,6 @@ class MemoryMetricsTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.memory_metrics_inst._parse_attributes() self.assertEqual("1.1.0", self.memory_metrics_inst.redfish_version) self.assertEqual( "Memory Metrics for DIMM1", self.memory_metrics_inst.name diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_processor.py b/rsd_lib/tests/unit/resources/v2_2/system/test_processor.py index 41cb1bf..020a9dc 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_processor.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_processor.py @@ -37,7 +37,6 @@ class ProcessorTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.processor_inst._parse_attributes() self.assertEqual("1.1.0", self.processor_inst.redfish_version) self.assertEqual("CPU1", self.processor_inst.identity) self.assertEqual("Processor", self.processor_inst.name) @@ -293,7 +292,6 @@ class ProcessorCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.processor_col._parse_attributes() self.assertEqual("1.1.0", self.processor_col.redfish_version) self.assertEqual( ( @@ -312,6 +310,7 @@ class ProcessorCollectionTestCase(testtools.TestCase): self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU1", redfish_version=self.processor_col.redfish_version, + registries=None, ) @mock.patch.object(processor, "Processor", autospec=True) @@ -322,11 +321,13 @@ class ProcessorCollectionTestCase(testtools.TestCase): self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU1", redfish_version=self.processor_col.redfish_version, + registries=None, ), mock.call( self.processor_col._conn, "/redfish/v1/Systems/System1/Processors/CPU2", redfish_version=self.processor_col.redfish_version, + registries=None, ), ] mock_system.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_processor_metrics.py b/rsd_lib/tests/unit/resources/v2_2/system/test_processor_metrics.py index 62376f5..cb7353c 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_processor_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_processor_metrics.py @@ -38,7 +38,6 @@ class ProcessorMetricsTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.processor_metrics_inst._parse_attributes() self.assertEqual("1.1.0", self.processor_metrics_inst.redfish_version) self.assertEqual( "ProcessorMetrics for CPU1", self.processor_metrics_inst.name diff --git a/rsd_lib/tests/unit/resources/v2_2/system/test_system.py b/rsd_lib/tests/unit/resources/v2_2/system/test_system.py index 3dcd7ee..b8f5b1d 100644 --- a/rsd_lib/tests/unit/resources/v2_2/system/test_system.py +++ b/rsd_lib/tests/unit/resources/v2_2/system/test_system.py @@ -44,7 +44,6 @@ class SystemTestCase(testtools.TestCase): self.assertIsInstance(self.system_inst, v2_1_system.System) def test__parse_attributes(self): - self.system_inst._parse_attributes() self.assertEqual( "0.001", self.system_inst.trusted_modules[0].firmware_version ) @@ -275,7 +274,6 @@ class SystemCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.system_col._parse_attributes() self.assertEqual("1.1.0", self.system_col.redfish_version) self.assertEqual( ("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"), @@ -289,6 +287,7 @@ class SystemCollectionTestCase(testtools.TestCase): self.system_col._conn, "/redfish/v1/Systems/System1", redfish_version=self.system_col.redfish_version, + registries=None, ) @mock.patch.object(system, "System", autospec=True) @@ -299,11 +298,13 @@ class SystemCollectionTestCase(testtools.TestCase): self.system_col._conn, "/redfish/v1/Systems/System1", redfish_version=self.system_col.redfish_version, + registries=None, ), mock.call( self.system_col._conn, "/redfish/v1/Systems/System2", redfish_version=self.system_col.redfish_version, + registries=None, ), ] mock_system.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_definition.py b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_definition.py index aa0fc9f..433c08e 100644 --- a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_definition.py +++ b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_definition.py @@ -37,7 +37,6 @@ class MetricDefinitionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.metric_definition_inst._parse_attributes() self.assertEqual("1.1.0", self.metric_definition_inst.redfish_version) self.assertEqual("memoryTemperature", self.metric_definition_inst.name) self.assertEqual("1-md-6", self.metric_definition_inst.identity) @@ -188,7 +187,6 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.metric_def_col._parse_attributes() self.assertEqual("1.1.0", self.metric_def_col.redfish_version) self.assertEqual( ( @@ -209,6 +207,7 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase): self.metric_def_col._conn, "/redfish/v1/TelemetryService/MetricDefinitions/CPUTemperature", redfish_version=self.metric_def_col.redfish_version, + registries=None, ) @mock.patch.object(metric_definition, "MetricDefinition", autospec=True) @@ -221,16 +220,19 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase): "/redfish/v1/TelemetryService/MetricDefinitions/" "CPUTemperature", redfish_version=self.metric_def_col.redfish_version, + registries=None, ), mock.call( self.metric_def_col._conn, "/redfish/v1/TelemetryService/MetricDefinitions/CPUHealth", redfish_version=self.metric_def_col.redfish_version, + registries=None, ), mock.call( self.metric_def_col._conn, "/redfish/v1/TelemetryService/MetricDefinitions/CPUBandwidth", redfish_version=self.metric_def_col.redfish_version, + registries=None, ), ] mock_metric_definition.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report.py b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report.py index 829d847..beed2d6 100644 --- a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report.py +++ b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report.py @@ -37,7 +37,6 @@ class MetricReportTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.metric_report_inst._parse_attributes() self.assertEqual( "TransmitCPU1Metrics", self.metric_report_inst.identity ) @@ -192,7 +191,6 @@ class MetricReportCollectionTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.metric_report_col._parse_attributes() self.assertEqual("MetricReports", self.metric_report_col.name) @mock.patch.object(metric_report, "MetricReport", autospec=True) @@ -205,6 +203,7 @@ class MetricReportCollectionTestCase(testtools.TestCase): self.metric_report_col._conn, "/redfish/v1/TelemetryService/MetricReports/TransmitCPU1Metrics", redfish_version=self.metric_report_col.redfish_version, + registries=None, ) @mock.patch.object(metric_report, "MetricReport", autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report_definition.py b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report_definition.py index ed31b6c..dee2e45 100644 --- a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report_definition.py +++ b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_metric_report_definition.py @@ -44,7 +44,6 @@ class ReportDefinitionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.metric_report_definition_inst._parse_attributes() self.assertEqual( "CPUEventPublish", self.metric_report_definition_inst.identity ) @@ -238,7 +237,6 @@ class ReportDefinitionCollectionTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.report_definition_col._parse_attributes() self.assertEqual( "MetricReportDefinition Collection", self.report_definition_col.name, @@ -256,6 +254,7 @@ class ReportDefinitionCollectionTestCase(testtools.TestCase): self.report_definition_col._conn, "/redfish/v1/TelemetryService/MetricReportDefinitions/CPU1Metrics", redfish_version=self.report_definition_col.redfish_version, + registries=None, ) @mock.patch.object( diff --git a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_telemetry_service.py b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_telemetry_service.py index 3909e79..2b4bdeb 100644 --- a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_telemetry_service.py +++ b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_telemetry_service.py @@ -38,7 +38,6 @@ class TelemetryTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.telemetry_service_inst._parse_attributes() self.assertEqual("1.1.0", self.telemetry_service_inst.redfish_version) self.assertEqual("Enabled", self.telemetry_service_inst.status.state) self.assertEqual("OK", self.telemetry_service_inst.status.health) diff --git a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_trigger.py b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_trigger.py index 2cc6f5a..5b3006e 100644 --- a/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_trigger.py +++ b/rsd_lib/tests/unit/resources/v2_2/telemetry_service/test_trigger.py @@ -37,7 +37,6 @@ class TriggersTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.triggers_inst._parse_attributes() self.assertEqual("ProcessorTemperature", self.triggers_inst.identity) self.assertEqual( "Triggers for Processor Temperature Malfunction", @@ -181,7 +180,6 @@ class TriggersCollectionTestCase(testtools.TestCase): ) def test_parse_attributes(self): - self.triggers_col._parse_attributes() self.assertEqual("Triggers Collection", self.triggers_col.name) @mock.patch.object(triggers, "Triggers", autospec=True) @@ -194,6 +192,7 @@ class TriggersCollectionTestCase(testtools.TestCase): self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/ProcessorCatastrophicError", redfish_version=self.triggers_col.redfish_version, + registries=None, ) @mock.patch.object(triggers, "Triggers", autospec=True) @@ -206,33 +205,39 @@ class TriggersCollectionTestCase(testtools.TestCase): "/redfish/v1/TelemetryService/Triggers/" "ProcessorCatastrophicError", redfish_version=self.triggers_col.redfish_version, + registries=None, ), mock.call( self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/" "ProcessorInitializationError", redfish_version=self.triggers_col.redfish_version, + registries=None, ), mock.call( self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/" "ProcessorMachineCheckError", redfish_version=self.triggers_col.redfish_version, + registries=None, ), mock.call( self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/ProcessorPOSTFailure", redfish_version=self.triggers_col.redfish_version, + registries=None, ), mock.call( self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/ProcessorTemperature", redfish_version=self.triggers_col.redfish_version, + registries=None, ), mock.call( self.triggers_col._conn, "/redfish/v1/TelemetryService/Triggers/ProcessorThermalTrip", redfish_version=self.triggers_col.redfish_version, + registries=None, ), ] mock_trigger.assert_has_calls(calls) diff --git a/rsd_lib/tests/unit/resources/v2_2/test_rsdlib_v2_2.py b/rsd_lib/tests/unit/resources/v2_2/test_rsdlib_v2_2.py index 91a8a1c..7e32e23 100644 --- a/rsd_lib/tests/unit/resources/v2_2/test_rsdlib_v2_2.py +++ b/rsd_lib/tests/unit/resources/v2_2/test_rsdlib_v2_2.py @@ -49,7 +49,6 @@ class RSDLibV2_2TestCase(testtools.TestCase): self.rsd = v2_2.RSDLibV2_2(self.conn) def test__parse_attributes(self): - self.rsd._parse_attributes() self.assertEqual("2.2.0", self.rsd._rsd_api_version) self.assertEqual("1.1.0", self.rsd._redfish_version) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) diff --git a/rsd_lib/tests/unit/resources/v2_2/update_service/test_action_info.py b/rsd_lib/tests/unit/resources/v2_2/update_service/test_action_info.py index 5e75ccf..305f654 100644 --- a/rsd_lib/tests/unit/resources/v2_2/update_service/test_action_info.py +++ b/rsd_lib/tests/unit/resources/v2_2/update_service/test_action_info.py @@ -39,7 +39,6 @@ class ActionInfoTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.action_info_inst._parse_attributes() self.assertEqual({}, self.action_info_inst.oem) def test_parameters(self): diff --git a/rsd_lib/tests/unit/resources/v2_2/update_service/test_update_service.py b/rsd_lib/tests/unit/resources/v2_2/update_service/test_update_service.py index a4ab42b..02b28a0 100644 --- a/rsd_lib/tests/unit/resources/v2_2/update_service/test_update_service.py +++ b/rsd_lib/tests/unit/resources/v2_2/update_service/test_update_service.py @@ -35,7 +35,6 @@ class UpdateServiceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.update_service_inst._parse_attributes() self.assertEqual("UpdateService", self.update_service_inst.identity) self.assertEqual("Update service", self.update_service_inst.name) self.assertEqual("Disabled", self.update_service_inst.status.state) diff --git a/rsd_lib/tests/unit/resources/v2_3/ethernet_switch/test_ethernet_switch.py b/rsd_lib/tests/unit/resources/v2_3/ethernet_switch/test_ethernet_switch.py index fff9b10..941942f 100644 --- a/rsd_lib/tests/unit/resources/v2_3/ethernet_switch/test_ethernet_switch.py +++ b/rsd_lib/tests/unit/resources/v2_3/ethernet_switch/test_ethernet_switch.py @@ -35,7 +35,6 @@ class TestEthernetSwtich(base.TestCase): redfish_version='1.0.2') def test_parse_attributes(self): - self.ethernet_switch_inst._parse_attributes() self.assertEqual('1.0.2', self.ethernet_switch_inst.redfish_version) self.assertEqual('Switch1', self.ethernet_switch_inst.identity) self.assertEqual('Switch1', self.ethernet_switch_inst.name) @@ -149,7 +148,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.ethernet_switch_col._parse_attributes() self.assertEqual('1.0.2', self.ethernet_switch_col.redfish_version) self.assertEqual('Ethernet Switches Collection', self.ethernet_switch_col.name) @@ -164,7 +162,8 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase): mock_ethernet_switch.assert_called_once_with( self.ethernet_switch_col._conn, '/redfish/v1/EthernetSwitches/Switch1', - redfish_version=self.ethernet_switch_col.redfish_version + redfish_version=self.ethernet_switch_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_switch, 'EthernetSwitch', autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_3/fabric/test_endpoint.py b/rsd_lib/tests/unit/resources/v2_3/fabric/test_endpoint.py index 618d126..d018752 100644 --- a/rsd_lib/tests/unit/resources/v2_3/fabric/test_endpoint.py +++ b/rsd_lib/tests/unit/resources/v2_3/fabric/test_endpoint.py @@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.endpoint_inst._parse_attributes() self.assertEqual('1.0.2', self.endpoint_inst.redfish_version) self.assertEqual('Fabric Endpoint', self.endpoint_inst.description) @@ -79,9 +78,9 @@ class EndpointTestCase(testtools.TestCase): with open('rsd_lib/tests/unit/json_samples/v2_3/endpoint_2.json', 'r') as f: - self.endpoint_inst._json = json.loads(f.read()) + self.conn.get.return_value.json.return_value = json.loads(f.read()) - self.endpoint_inst._parse_attributes() + self.endpoint_inst.refresh() self.assertEqual('1.0.2', self.endpoint_inst.redfish_version) self.assertEqual('Fabric Initiator Endpoint', self.endpoint_inst.description) @@ -193,7 +192,6 @@ class EndpointCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.endpoint_col._parse_attributes() self.assertEqual('1.0.2', self.endpoint_col.redfish_version) self.assertEqual('Endpoint Collection', self.endpoint_col.name) @@ -208,18 +206,26 @@ class EndpointCollectionTestCase(testtools.TestCase): mock_endpoint.assert_called_once_with( self.endpoint_col._conn, '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', - redfish_version=self.endpoint_col.redfish_version) + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ) @mock.patch.object(endpoint, 'Endpoint', autospec=True) def test_get_members(self, mock_endpoint): members = self.endpoint_col.get_members() calls = [ - mock.call(self.endpoint_col._conn, - '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', - redfish_version=self.endpoint_col.redfish_version), - mock.call(self.endpoint_col._conn, - '/redfish/v1/Fabrics/NVMeoE/Endpoints/2', - redfish_version=self.endpoint_col.redfish_version) + mock.call( + self.endpoint_col._conn, + '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ), + mock.call( + self.endpoint_col._conn, + '/redfish/v1/Fabrics/NVMeoE/Endpoints/2', + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ) ] mock_endpoint.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_3/fabric/test_fabric.py b/rsd_lib/tests/unit/resources/v2_3/fabric/test_fabric.py index 07483a1..6e6d780 100644 --- a/rsd_lib/tests/unit/resources/v2_3/fabric/test_fabric.py +++ b/rsd_lib/tests/unit/resources/v2_3/fabric/test_fabric.py @@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.fabric_inst._parse_attributes() self.assertEqual('1.0.2', self.fabric_inst.redfish_version) self.assertEqual('NVMeoE', self.fabric_inst.identity) self.assertEqual(None, self.fabric_inst.name) @@ -175,7 +174,6 @@ class FabricCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/Fabrics', redfish_version='1.0.2') def test__parse_attributes(self): - self.fabric_col._parse_attributes() self.assertEqual('1.0.2', self.fabric_col.redfish_version) self.assertEqual('Fabric Collection', self.fabric_col.name) @@ -187,13 +185,17 @@ class FabricCollectionTestCase(testtools.TestCase): self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE') mock_fabric.assert_called_once_with( self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', - redfish_version=self.fabric_col.redfish_version) + redfish_version=self.fabric_col.redfish_version, + registries=None, + ) @mock.patch.object(fabric, 'Fabric', autospec=True) def test_get_members(self, mock_fabric): members = self.fabric_col.get_members() mock_fabric.assert_called_once_with( self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', - redfish_version=self.fabric_col.redfish_version) + redfish_version=self.fabric_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_3/fabric/test_zone.py b/rsd_lib/tests/unit/resources/v2_3/fabric/test_zone.py index 664a424..0404f91 100644 --- a/rsd_lib/tests/unit/resources/v2_3/fabric/test_zone.py +++ b/rsd_lib/tests/unit/resources/v2_3/fabric/test_zone.py @@ -36,7 +36,6 @@ class ZoneTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.zone_inst._parse_attributes() self.assertEqual('1.0.2', self.zone_inst.redfish_version) self.assertEqual('Zone 1', self.zone_inst.description) @@ -89,7 +88,6 @@ class ZoneCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.zone_col._parse_attributes() self.assertEqual('1.0.2', self.zone_col.redfish_version) self.assertEqual('Zone Collection', self.zone_col.name) @@ -101,14 +99,18 @@ class ZoneCollectionTestCase(testtools.TestCase): self.zone_col.get_member('/redfish/v1/Fabrics/NVMeoE/Zones/1') mock_zone.assert_called_once_with( self.zone_col._conn, '/redfish/v1/Fabrics/NVMeoE/Zones/1', - redfish_version=self.zone_col.redfish_version) + redfish_version=self.zone_col.redfish_version, + registries=None, + ) @mock.patch.object(zone, 'Zone', autospec=True) def test_get_members(self, mock_zone): members = self.zone_col.get_members() mock_zone.assert_called_with( self.zone_col._conn, '/redfish/v1/Fabrics/NVMeoE/Zones/1', - redfish_version=self.zone_col.redfish_version) + redfish_version=self.zone_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_3/manager/test_manager.py b/rsd_lib/tests/unit/resources/v2_3/manager/test_manager.py index 3c1297e..f81e56e 100644 --- a/rsd_lib/tests/unit/resources/v2_3/manager/test_manager.py +++ b/rsd_lib/tests/unit/resources/v2_3/manager/test_manager.py @@ -95,7 +95,6 @@ class TestManagerCollection(base.TestCase): redfish_version='1.0.2') def test_parse_attributes(self): - self.manager_col._parse_attributes() self.assertEqual('1.0.2', self.manager_col.redfish_version) self.assertEqual('Manager Collection', self.manager_col.name) self.assertEqual(('/redfish/v1/Managers/BMC1', @@ -110,7 +109,8 @@ class TestManagerCollection(base.TestCase): mock_manager.assert_called_once_with( self.manager_col._conn, '/redfish/v1/Managers/BMC1', - redfish_version=self.manager_col.redfish_version + redfish_version=self.manager_col.redfish_version, + registries=None, ) @mock.patch.object(manager, 'Manager', autospec=True) diff --git a/rsd_lib/tests/unit/resources/v2_3/node/test_attach_action_info.py b/rsd_lib/tests/unit/resources/v2_3/node/test_attach_action_info.py index 9213dbe..0ae9ce7 100644 --- a/rsd_lib/tests/unit/resources/v2_3/node/test_attach_action_info.py +++ b/rsd_lib/tests/unit/resources/v2_3/node/test_attach_action_info.py @@ -34,7 +34,6 @@ class AttachResourceActionInfoTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.attach_action_info._parse_attributes() self.assertEqual('1.0.2', self.attach_action_info.redfish_version) self.assertEqual(None, self.attach_action_info.description) self.assertEqual('AttachResourceActionInfo', diff --git a/rsd_lib/tests/unit/resources/v2_3/node/test_node.py b/rsd_lib/tests/unit/resources/v2_3/node/test_node.py index 8a76384..dfd99c4 100644 --- a/rsd_lib/tests/unit/resources/v2_3/node/test_node.py +++ b/rsd_lib/tests/unit/resources/v2_3/node/test_node.py @@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.node_inst._parse_attributes() self.assertEqual(True, self.node_inst.clear_tpm_on_delete) def test_update_node(self): @@ -235,7 +234,6 @@ class NodeCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2') def test__parse_attributes(self): - self.node_col._parse_attributes() self.assertEqual('1.0.2', self.node_col.redfish_version) self.assertEqual('Composed Node Collection', self.node_col.name) self.assertEqual(('/redfish/v1/Nodes/1',), @@ -246,14 +244,18 @@ class NodeCollectionTestCase(testtools.TestCase): self.node_col.get_member('/redfish/v1/Nodes/1') mock_node.assert_called_once_with( self.node_col._conn, '/redfish/v1/Nodes/1', - redfish_version=self.node_col.redfish_version) + redfish_version=self.node_col.redfish_version, + registries=None, + ) @mock.patch.object(node, 'Node', autospec=True) def test_get_members(self, mock_node): members = self.node_col.get_members() mock_node.assert_called_once_with( self.node_col._conn, '/redfish/v1/Nodes/1', - redfish_version=self.node_col.redfish_version) + redfish_version=self.node_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive.py index e50add5..0178e28 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive.py @@ -35,7 +35,6 @@ class DriveTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.drive_inst._parse_attributes() self.assertEqual('1.0.2', self.drive_inst.redfish_version) self.assertEqual('2', self.drive_inst.identity) self.assertEqual('Physical Drive', self.drive_inst.name) @@ -143,7 +142,6 @@ class DriveCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.drive_col._parse_attributes() self.assertEqual('1.0.2', self.drive_col.redfish_version) self.assertEqual('Drives', self.drive_col.name) @@ -159,18 +157,26 @@ class DriveCollectionTestCase(testtools.TestCase): mock_drive.assert_called_once_with( self.drive_col._conn, '/redfish/v1/Chassis/1/Drives/1', - redfish_version=self.drive_col.redfish_version) + redfish_version=self.drive_col.redfish_version, + registries=None, + ) @mock.patch.object(drive, 'Drive', autospec=True) def test_get_members(self, mock_drive): members = self.drive_col.get_members() calls = [ - mock.call(self.drive_col._conn, - '/redfish/v1/Chassis/1/Drives/1', - redfish_version=self.drive_col.redfish_version), - mock.call(self.drive_col._conn, - '/redfish/v1/Chassis/1/Drives/2', - redfish_version=self.drive_col.redfish_version) + mock.call( + self.drive_col._conn, + '/redfish/v1/Chassis/1/Drives/1', + redfish_version=self.drive_col.redfish_version, + registries=None, + ), + mock.call( + self.drive_col._conn, + '/redfish/v1/Chassis/1/Drives/2', + redfish_version=self.drive_col.redfish_version, + registries=None, + ) ] mock_drive.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive_metrics.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive_metrics.py index 45d2993..54b09f1 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_drive_metrics.py @@ -34,7 +34,6 @@ class DriveMetricsTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.drive_metrics_inst._parse_attributes() self.assertEqual('Drive Metrics for Drive', self.drive_metrics_inst.name) self.assertEqual('Metrics for Drive 1', diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_pool.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_pool.py index 53ea089..68476d0 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_pool.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_pool.py @@ -37,7 +37,6 @@ class StoragePoolTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_pool_inst._parse_attributes() self.assertEqual('1.0.2', self.storage_pool_inst.redfish_version) self.assertEqual('Base storage pool', self.storage_pool_inst.description) @@ -210,7 +209,6 @@ class StoragePoolCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_pool_col._parse_attributes() self.assertEqual('1.0.2', self.storage_pool_col.redfish_version) self.assertEqual('StoragePools Collection', self.storage_pool_col.name) @@ -226,18 +224,26 @@ class StoragePoolCollectionTestCase(testtools.TestCase): mock_storage_pool.assert_called_once_with( self.storage_pool_col._conn, '/redfish/v1/StorageServices/NVMeoE1/StoragePools/1', - redfish_version=self.storage_pool_col.redfish_version) + redfish_version=self.storage_pool_col.redfish_version, + registries=None, + ) @mock.patch.object(storage_pool, 'StoragePool', autospec=True) def test_get_members(self, mock_storage_pool): members = self.storage_pool_col.get_members() calls = [ - mock.call(self.storage_pool_col._conn, - '/redfish/v1/StorageServices/NVMeoE1/StoragePools/1', - redfish_version=self.storage_pool_col.redfish_version), - mock.call(self.storage_pool_col._conn, - '/redfish/v1/StorageServices/NVMeoE1/StoragePools/2', - redfish_version=self.storage_pool_col.redfish_version) + mock.call( + self.storage_pool_col._conn, + '/redfish/v1/StorageServices/NVMeoE1/StoragePools/1', + redfish_version=self.storage_pool_col.redfish_version, + registries=None, + ), + mock.call( + self.storage_pool_col._conn, + '/redfish/v1/StorageServices/NVMeoE1/StoragePools/2', + redfish_version=self.storage_pool_col.redfish_version, + registries=None, + ) ] mock_storage_pool.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_service.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_service.py index 141a330..cbac62a 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_service.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_storage_service.py @@ -40,7 +40,6 @@ class StorageServiceTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_service_inst._parse_attributes() self.assertEqual('1.0.2', self.storage_service_inst.redfish_version) self.assertEqual('Storage Service description', self.storage_service_inst.description) @@ -291,7 +290,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_service_col._parse_attributes() self.assertEqual('1.0.2', self.storage_service_col.redfish_version) self.assertEqual('Storage Services Collection', self.storage_service_col.name) @@ -305,7 +303,9 @@ class StorageServiceCollectionTestCase(testtools.TestCase): mock_storage_service.assert_called_once_with( self.storage_service_col._conn, '/redfish/v1/StorageServices/NVMeoE1', - redfish_version=self.storage_service_col.redfish_version) + redfish_version=self.storage_service_col.redfish_version, + registries=None, + ) @mock.patch.object(storage_service, 'StorageService', autospec=True) def test_get_members(self, mock_storage_service): @@ -313,6 +313,8 @@ class StorageServiceCollectionTestCase(testtools.TestCase): mock_storage_service.assert_called_once_with( self.storage_service_col._conn, '/redfish/v1/StorageServices/NVMeoE1', - redfish_version=self.storage_service_col.redfish_version) + redfish_version=self.storage_service_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume.py index faa2990..9d63d78 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume.py @@ -39,7 +39,6 @@ class StorageServiceTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.volume_inst._parse_attributes() self.assertEqual('1.0.2', self.volume_inst.redfish_version) self.assertEqual('Volume description', self.volume_inst.description) self.assertEqual('1', self.volume_inst.identity) @@ -91,7 +90,7 @@ class StorageServiceTestCase(testtools.TestCase): self.volume_inst.json.pop('Actions') self.assertRaisesRegex( exceptions.MissingAttributeError, 'attribute Actions', - self.volume_inst._parse_attributes) + self.volume_inst.refresh) def test_update_volume(self): self.volume_inst.update(bootable=True) @@ -228,7 +227,6 @@ class VolumeCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.volume_col._parse_attributes() self.assertEqual('1.0.2', self.volume_col.redfish_version) self.assertEqual('Volume Collection', self.volume_col.name) @@ -242,7 +240,9 @@ class VolumeCollectionTestCase(testtools.TestCase): mock_volume.assert_called_once_with( self.volume_col._conn, '/redfish/v1/StorageServices/NVMeoE1/Volumes/1', - redfish_version=self.volume_col.redfish_version) + redfish_version=self.volume_col.redfish_version, + registries=None, + ) @mock.patch.object(volume, 'Volume', autospec=True) def test_get_members(self, mock_volume): @@ -250,7 +250,9 @@ class VolumeCollectionTestCase(testtools.TestCase): mock_volume.assert_called_once_with( self.volume_col._conn, '/redfish/v1/StorageServices/NVMeoE1/Volumes/1', - redfish_version=self.volume_col.redfish_version) + redfish_version=self.volume_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume_metrics.py b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume_metrics.py index e648985..e505b5e 100644 --- a/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume_metrics.py +++ b/rsd_lib/tests/unit/resources/v2_3/storage_service/test_volume_metrics.py @@ -34,7 +34,6 @@ class VolumeMetricsTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.volume_metrics_inst._parse_attributes() self.assertEqual('Volume Metrics', self.volume_metrics_inst.name) self.assertEqual('Metrics', self.volume_metrics_inst.identity) self.assertEqual('Metrics for Volume 1', diff --git a/rsd_lib/tests/unit/resources/v2_3/system/test_ethernet_interface.py b/rsd_lib/tests/unit/resources/v2_3/system/test_ethernet_interface.py index 6aa9a58..179c6ba 100644 --- a/rsd_lib/tests/unit/resources/v2_3/system/test_ethernet_interface.py +++ b/rsd_lib/tests/unit/resources/v2_3/system/test_ethernet_interface.py @@ -34,7 +34,6 @@ class EthernetInterface(testtools.TestCase): redfish_version='1.0.2') def test_parse_attributes(self): - self.ethernet_interface_inst._parse_attributes() self.assertEqual("LAN1", self.ethernet_interface_inst.identity) self.assertEqual("Ethernet Interface", self.ethernet_interface_inst.name) @@ -124,7 +123,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.ethernet_interface_col._parse_attributes() self.assertEqual('1.0.2', self.ethernet_interface_col.redfish_version) self.assertEqual( ('/redfish/v1/Systems/System1/EthernetInterfaces/LAN1',), @@ -137,7 +135,8 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): mock_ethernet_interface.assert_called_once_with( self.ethernet_interface_col._conn, '/redfish/v1/Systems/System1/EthernetInterfaces/LAN1', - redfish_version=self.ethernet_interface_col.redfish_version + redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, ) @mock.patch.object(ethernet_interface, 'EthernetInterface', autospec=True) @@ -147,7 +146,9 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase): mock.call( self.ethernet_interface_col._conn, '/redfish/v1/Systems/System1/EthernetInterfaces/LAN1', - redfish_version=self.ethernet_interface_col.redfish_version) + redfish_version=self.ethernet_interface_col.redfish_version, + registries=None, + ) ] mock_ethernet_interface.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_3/system/test_system.py b/rsd_lib/tests/unit/resources/v2_3/system/test_system.py index 4daff41..5308e8b 100644 --- a/rsd_lib/tests/unit/resources/v2_3/system/test_system.py +++ b/rsd_lib/tests/unit/resources/v2_3/system/test_system.py @@ -99,7 +99,6 @@ class SystemCollectionTestCase(testtools.TestCase): redfish_version='1.1.0') def test__parse_attributes(self): - self.system_col._parse_attributes() self.assertEqual('1.1.0', self.system_col.redfish_version) self.assertEqual(('/redfish/v1/Systems/System1', '/redfish/v1/Systems/System2'), @@ -112,18 +111,26 @@ class SystemCollectionTestCase(testtools.TestCase): mock_system.assert_called_once_with( self.system_col._conn, '/redfish/v1/Systems/System1', - redfish_version=self.system_col.redfish_version) + redfish_version=self.system_col.redfish_version, + registries=None, + ) @mock.patch.object(system, 'System', autospec=True) def test_get_members(self, mock_system): members = self.system_col.get_members() calls = [ - mock.call(self.system_col._conn, - '/redfish/v1/Systems/System1', - redfish_version=self.system_col.redfish_version), - mock.call(self.system_col._conn, - '/redfish/v1/Systems/System2', - redfish_version=self.system_col.redfish_version) + mock.call( + self.system_col._conn, + '/redfish/v1/Systems/System1', + redfish_version=self.system_col.redfish_version, + registries=None, + ), + mock.call( + self.system_col._conn, + '/redfish/v1/Systems/System2', + redfish_version=self.system_col.redfish_version, + registries=None, + ) ] mock_system.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_3/test_rsdlib_v2_3.py b/rsd_lib/tests/unit/resources/v2_3/test_rsdlib_v2_3.py index 1e7bd8e..f014d61 100644 --- a/rsd_lib/tests/unit/resources/v2_3/test_rsdlib_v2_3.py +++ b/rsd_lib/tests/unit/resources/v2_3/test_rsdlib_v2_3.py @@ -47,7 +47,6 @@ class RSDLibV2_3TestCase(testtools.TestCase): self.rsd = v2_3.RSDLibV2_3(self.conn) def test__parse_attributes(self): - self.rsd._parse_attributes() self.assertEqual("2.3.0", self.rsd._rsd_api_version) self.assertEqual("1.1.0", self.rsd._redfish_version) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) diff --git a/rsd_lib/tests/unit/resources/v2_4/fabric/test_endpoint.py b/rsd_lib/tests/unit/resources/v2_4/fabric/test_endpoint.py index cd567f8..c78313d 100644 --- a/rsd_lib/tests/unit/resources/v2_4/fabric/test_endpoint.py +++ b/rsd_lib/tests/unit/resources/v2_4/fabric/test_endpoint.py @@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.endpoint_inst._parse_attributes() self.assertEqual('1.0.2', self.endpoint_inst.redfish_version) self.assertEqual('Fabric Endpoint', self.endpoint_inst.description) @@ -116,7 +115,6 @@ class EndpointCollectionTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.endpoint_col._parse_attributes() self.assertEqual('1.0.2', self.endpoint_col.redfish_version) self.assertEqual('Endpoint Collection', self.endpoint_col.name) @@ -131,18 +129,26 @@ class EndpointCollectionTestCase(testtools.TestCase): mock_endpoint.assert_called_once_with( self.endpoint_col._conn, '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', - redfish_version=self.endpoint_col.redfish_version) + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ) @mock.patch.object(endpoint, 'Endpoint', autospec=True) def test_get_members(self, mock_endpoint): members = self.endpoint_col.get_members() calls = [ - mock.call(self.endpoint_col._conn, - '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', - redfish_version=self.endpoint_col.redfish_version), - mock.call(self.endpoint_col._conn, - '/redfish/v1/Fabrics/NVMeoE/Endpoints/2', - redfish_version=self.endpoint_col.redfish_version) + mock.call( + self.endpoint_col._conn, + '/redfish/v1/Fabrics/NVMeoE/Endpoints/1', + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ), + mock.call( + self.endpoint_col._conn, + '/redfish/v1/Fabrics/NVMeoE/Endpoints/2', + redfish_version=self.endpoint_col.redfish_version, + registries=None, + ) ] mock_endpoint.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_4/fabric/test_fabric.py b/rsd_lib/tests/unit/resources/v2_4/fabric/test_fabric.py index 1e1d2f8..610a327 100644 --- a/rsd_lib/tests/unit/resources/v2_4/fabric/test_fabric.py +++ b/rsd_lib/tests/unit/resources/v2_4/fabric/test_fabric.py @@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.fabric_inst._parse_attributes() self.assertEqual('1.0.2', self.fabric_inst.redfish_version) self.assertEqual('NVMeoE', self.fabric_inst.identity) self.assertEqual(None, self.fabric_inst.name) @@ -175,7 +174,6 @@ class FabricCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/Fabrics', redfish_version='1.0.2') def test__parse_attributes(self): - self.fabric_col._parse_attributes() self.assertEqual('1.0.2', self.fabric_col.redfish_version) self.assertEqual('Fabric Collection', self.fabric_col.name) @@ -187,13 +185,17 @@ class FabricCollectionTestCase(testtools.TestCase): self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE') mock_fabric.assert_called_once_with( self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', - redfish_version=self.fabric_col.redfish_version) + redfish_version=self.fabric_col.redfish_version, + registries=None, + ) @mock.patch.object(fabric, 'Fabric', autospec=True) def test_get_members(self, mock_fabric): members = self.fabric_col.get_members() mock_fabric.assert_called_once_with( self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', - redfish_version=self.fabric_col.redfish_version) + redfish_version=self.fabric_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_4/node/test_node.py b/rsd_lib/tests/unit/resources/v2_4/node/test_node.py index baa1854..2df7c8c 100644 --- a/rsd_lib/tests/unit/resources/v2_4/node/test_node.py +++ b/rsd_lib/tests/unit/resources/v2_4/node/test_node.py @@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.node_inst._parse_attributes() self.assertEqual(True, self.node_inst.clear_tpm_on_delete) self.assertEqual( 'OverwritePCD', @@ -266,7 +265,6 @@ class NodeCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2') def test__parse_attributes(self): - self.node_col._parse_attributes() self.assertEqual('1.0.2', self.node_col.redfish_version) self.assertEqual('Composed Node Collection', self.node_col.name) self.assertEqual(('/redfish/v1/Nodes/1',), @@ -277,14 +275,18 @@ class NodeCollectionTestCase(testtools.TestCase): self.node_col.get_member('/redfish/v1/Nodes/1') mock_node.assert_called_once_with( self.node_col._conn, '/redfish/v1/Nodes/1', - redfish_version=self.node_col.redfish_version) + redfish_version=self.node_col.redfish_version, + registries=None, + ) @mock.patch.object(node, 'Node', autospec=True) def test_get_members(self, mock_node): members = self.node_col.get_members() mock_node.assert_called_once_with( self.node_col._conn, '/redfish/v1/Nodes/1', - redfish_version=self.node_col.redfish_version) + redfish_version=self.node_col.redfish_version, + registries=None, + ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_capacity.py b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_capacity.py index aac329f..48fa018 100644 --- a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_capacity.py +++ b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_capacity.py @@ -39,7 +39,6 @@ class CapacitySourceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.capacity_sources_inst._parse_attributes() self.assertEqual("1.0.2", self.capacity_sources_inst.redfish_version) self.assertEqual( "Volume capacity source", self.capacity_sources_inst.description diff --git a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_storage_service.py b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_storage_service.py index 01d333c..75db737 100644 --- a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_storage_service.py +++ b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_storage_service.py @@ -37,7 +37,6 @@ class StorageServiceTestCase(testtools.TestCase): redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_service_inst._parse_attributes() self.assertEqual('1.0.2', self.storage_service_inst.redfish_version) self.assertEqual('Storage Service description', self.storage_service_inst.description) @@ -117,7 +116,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase): self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2') def test__parse_attributes(self): - self.storage_service_col._parse_attributes() self.assertEqual('1.0.2', self.storage_service_col.redfish_version) self.assertEqual('Storage Services Collection', self.storage_service_col.name) @@ -131,7 +129,9 @@ class StorageServiceCollectionTestCase(testtools.TestCase): mock_storage_service.assert_called_once_with( self.storage_service_col._conn, '/redfish/v1/StorageServices/NVMeoE1', - redfish_version=self.storage_service_col.redfish_version) + redfish_version=self.storage_service_col.redfish_version, + registries=None, + ) @mock.patch.object(storage_service, 'StorageService', autospec=True) def test_get_members(self, mock_storage_service): @@ -139,6 +139,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase): mock_storage_service.assert_called_once_with( self.storage_service_col._conn, '/redfish/v1/StorageServices/NVMeoE1', - redfish_version=self.storage_service_col.redfish_version) + redfish_version=self.storage_service_col.redfish_version, + registries=None) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_volume.py b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_volume.py index d380286..3273d03 100644 --- a/rsd_lib/tests/unit/resources/v2_4/storage_service/test_volume.py +++ b/rsd_lib/tests/unit/resources/v2_4/storage_service/test_volume.py @@ -39,7 +39,6 @@ class StorageServiceTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.volume_inst._parse_attributes() self.assertEqual("1.0.2", self.volume_inst.redfish_version) self.assertEqual("Volume description", self.volume_inst.description) self.assertEqual("1", self.volume_inst.identity) @@ -187,7 +186,6 @@ class VolumeCollectionTestCase(testtools.TestCase): ) def test__parse_attributes(self): - self.volume_col._parse_attributes() self.assertEqual("1.0.2", self.volume_col.redfish_version) self.assertEqual("Volume Collection", self.volume_col.name) self.assertEqual( @@ -204,6 +202,7 @@ class VolumeCollectionTestCase(testtools.TestCase): self.volume_col._conn, "/redfish/v1/StorageServices/NVMeoE1/Volumes/1", redfish_version=self.volume_col.redfish_version, + registries=None, ) @mock.patch.object(volume, "Volume", autospec=True) @@ -213,6 +212,7 @@ class VolumeCollectionTestCase(testtools.TestCase): self.volume_col._conn, "/redfish/v1/StorageServices/NVMeoE1/Volumes/1", redfish_version=self.volume_col.redfish_version, + registries=None, ) self.assertIsInstance(members, list) self.assertEqual(1, len(members)) diff --git a/rsd_lib/tests/unit/resources/v2_4/system/test_processor.py b/rsd_lib/tests/unit/resources/v2_4/system/test_processor.py index 9c6867a..c178d17 100644 --- a/rsd_lib/tests/unit/resources/v2_4/system/test_processor.py +++ b/rsd_lib/tests/unit/resources/v2_4/system/test_processor.py @@ -36,7 +36,6 @@ class ProcessorTestCase(testtools.TestCase): redfish_version='1.1.0') def test__parse_attributes(self): - self.processor_inst._parse_attributes() self.assertEqual('1.1.0', self.processor_inst.redfish_version) self.assertEqual('CPU1', self.processor_inst.identity) self.assertEqual('Processor', self.processor_inst.name) @@ -301,7 +300,6 @@ class ProcessorCollectionTestCase(testtools.TestCase): redfish_version='1.1.0') def test__parse_attributes(self): - self.processor_col._parse_attributes() self.assertEqual('1.1.0', self.processor_col.redfish_version) self.assertEqual(('/redfish/v1/Systems/System1/Processors/CPU1', '/redfish/v1/Systems/System1/Processors/FPGA1'), @@ -314,7 +312,9 @@ class ProcessorCollectionTestCase(testtools.TestCase): mock_system.assert_called_once_with( self.processor_col._conn, '/redfish/v1/Systems/System1/Processors/CPU1', - redfish_version=self.processor_col.redfish_version) + redfish_version=self.processor_col.redfish_version, + registries=None, + ) @mock.patch.object(processor, 'Processor', autospec=True) def test_get_members(self, mock_system): @@ -322,10 +322,12 @@ class ProcessorCollectionTestCase(testtools.TestCase): calls = [ mock.call(self.processor_col._conn, '/redfish/v1/Systems/System1/Processors/CPU1', - redfish_version=self.processor_col.redfish_version), + redfish_version=self.processor_col.redfish_version, + registries=None), mock.call(self.processor_col._conn, '/redfish/v1/Systems/System1/Processors/FPGA1', - redfish_version=self.processor_col.redfish_version) + redfish_version=self.processor_col.redfish_version, + registries=None) ] mock_system.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_4/system/test_system.py b/rsd_lib/tests/unit/resources/v2_4/system/test_system.py index c4a597e..eb86aa8 100644 --- a/rsd_lib/tests/unit/resources/v2_4/system/test_system.py +++ b/rsd_lib/tests/unit/resources/v2_4/system/test_system.py @@ -94,7 +94,6 @@ class SystemCollectionTestCase(testtools.TestCase): redfish_version='1.1.0') def test__parse_attributes(self): - self.system_col._parse_attributes() self.assertEqual('1.1.0', self.system_col.redfish_version) self.assertEqual(('/redfish/v1/Systems/System1', '/redfish/v1/Systems/System2'), @@ -107,18 +106,26 @@ class SystemCollectionTestCase(testtools.TestCase): mock_system.assert_called_once_with( self.system_col._conn, '/redfish/v1/Systems/System1', - redfish_version=self.system_col.redfish_version) + redfish_version=self.system_col.redfish_version, + registries=None, + ) @mock.patch.object(system, 'System', autospec=True) def test_get_members(self, mock_system): members = self.system_col.get_members() calls = [ - mock.call(self.system_col._conn, - '/redfish/v1/Systems/System1', - redfish_version=self.system_col.redfish_version), - mock.call(self.system_col._conn, - '/redfish/v1/Systems/System2', - redfish_version=self.system_col.redfish_version) + mock.call( + self.system_col._conn, + '/redfish/v1/Systems/System1', + redfish_version=self.system_col.redfish_version, + registries=None, + ), + mock.call( + self.system_col._conn, + '/redfish/v1/Systems/System2', + redfish_version=self.system_col.redfish_version, + registries=None, + ) ] mock_system.assert_has_calls(calls) self.assertIsInstance(members, list) diff --git a/rsd_lib/tests/unit/resources/v2_4/test_rsdlib_v2_4.py b/rsd_lib/tests/unit/resources/v2_4/test_rsdlib_v2_4.py index 440e11f..fc9189b 100644 --- a/rsd_lib/tests/unit/resources/v2_4/test_rsdlib_v2_4.py +++ b/rsd_lib/tests/unit/resources/v2_4/test_rsdlib_v2_4.py @@ -46,7 +46,6 @@ class RSDLibV2_3TestCase(testtools.TestCase): self.rsd = v2_4.RSDLibV2_4(self.conn) def test__parse_attributes(self): - self.rsd._parse_attributes() self.assertEqual("2.4.0", self.rsd._rsd_api_version) self.assertEqual("1.5.0", self.rsd._redfish_version) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) diff --git a/rsd_lib/tests/unit/test_main.py b/rsd_lib/tests/unit/test_main.py index 086408f..73709dd 100644 --- a/rsd_lib/tests/unit/test_main.py +++ b/rsd_lib/tests/unit/test_main.py @@ -39,7 +39,6 @@ class RSDLibTestCase(testtools.TestCase): password='bar', verify=True) def test__parse_attributes(self): - self.rsd._parse_attributes() self.assertEqual("2.1.0", self.rsd._rsd_api_version) self.assertEqual("1.0.2", self.rsd._redfish_version)