Update sushy dependency to 2.0.0

Change-Id: If467ccbaf0290092bd856615c7d87b3829b70c6d
This commit is contained in:
Lin Yang 2019-09-10 13:36:00 -07:00
parent f6d3ec88ef
commit b2b2aeda0c
87 changed files with 254 additions and 220 deletions

View File

@ -3,5 +3,5 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
pbr>=2.0 # Apache-2.0 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 jsonschema>=2.6.0 # MIT

View File

@ -55,7 +55,7 @@
"Oem": { "Oem": {
"Intel_RackScale": { "Intel_RackScale": {
"@odata.type": "#Intel.Oem.Drive", "@odata.type": "#Intel.Oem.Drive",
"EraseOnDetach": null, "EraseOnDetach": false,
"FirmwareVersion": "1.17", "FirmwareVersion": "1.17",
"DriveErased": true, "DriveErased": true,
"Storage": { "Storage": {

View File

@ -32,7 +32,7 @@
"SecondaryTargetIPAddress": null, "SecondaryTargetIPAddress": null,
"SecondaryTargetTCPPort": null, "SecondaryTargetTCPPort": null,
"SecondaryLUN": null, "SecondaryLUN": null,
"SecondaryVLANEnable": null, "SecondaryVLANEnable": false,
"SecondaryVLANId": null, "SecondaryVLANId": null,
"SecondaryDNS": null, "SecondaryDNS": null,
"IPMaskDNSViaDHCP": false, "IPMaskDNSViaDHCP": false,

View File

@ -37,7 +37,6 @@ class TestChassis(base.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.chassis_inst._parse_attributes()
self.assertEqual("1.0.2", self.chassis_inst.redfish_version) self.assertEqual("1.0.2", self.chassis_inst.redfish_version)
self.assertEqual("FlexChassis1", self.chassis_inst.asset_tag) self.assertEqual("FlexChassis1", self.chassis_inst.asset_tag)
self.assertEqual("RackMount", self.chassis_inst.chassis_type) self.assertEqual("RackMount", self.chassis_inst.chassis_type)
@ -370,7 +369,6 @@ class TestChassisCollection(base.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.chassis_col._parse_attributes()
self.assertEqual("1.0.2", self.chassis_col.redfish_version) self.assertEqual("1.0.2", self.chassis_col.redfish_version)
self.assertEqual("Chassis Collection", self.chassis_col.name) self.assertEqual("Chassis Collection", self.chassis_col.name)
self.assertIn( self.assertIn(
@ -385,6 +383,7 @@ class TestChassisCollection(base.TestCase):
self.chassis_col._conn, self.chassis_col._conn,
"/redfish/v1/Chassis/Chassis1", "/redfish/v1/Chassis/Chassis1",
redfish_version=self.chassis_col.redfish_version, redfish_version=self.chassis_col.redfish_version,
registries=None,
) )
@mock.patch.object(chassis, "Chassis", autospec=True) @mock.patch.object(chassis, "Chassis", autospec=True)

View File

@ -34,7 +34,6 @@ class PowerTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.power_inst._parse_attributes()
self.assertEqual("Power", self.power_inst.identity) self.assertEqual("Power", self.power_inst.identity)
self.assertEqual("PowerName", self.power_inst.name) self.assertEqual("PowerName", self.power_inst.name)
self.assertEqual("PowerSubsystem", self.power_inst.description) self.assertEqual("PowerSubsystem", self.power_inst.description)

View File

@ -36,7 +36,6 @@ class PowerZoneTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.power_zone_inst._parse_attributes()
self.assertEqual("1", self.power_zone_inst.identity) self.assertEqual("1", self.power_zone_inst.identity)
self.assertEqual("power zone 1", self.power_zone_inst.name) self.assertEqual("power zone 1", self.power_zone_inst.name)
self.assertEqual( self.assertEqual(
@ -120,7 +119,6 @@ class PowerZoneCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.power_zone_col._parse_attributes()
self.assertEqual("1.1.0", self.power_zone_col.redfish_version) self.assertEqual("1.1.0", self.power_zone_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Chassis/Rack1/PowerZones/Power1",), ("/redfish/v1/Chassis/Rack1/PowerZones/Power1",),
@ -136,6 +134,7 @@ class PowerZoneCollectionTestCase(testtools.TestCase):
self.power_zone_col._conn, self.power_zone_col._conn,
"/redfish/v1/Chassis/Rack1/PowerZones/Power1", "/redfish/v1/Chassis/Rack1/PowerZones/Power1",
redfish_version=self.power_zone_col.redfish_version, redfish_version=self.power_zone_col.redfish_version,
registries=None,
) )
@mock.patch.object(power_zone, "PowerZone", autospec=True) @mock.patch.object(power_zone, "PowerZone", autospec=True)
@ -146,6 +145,7 @@ class PowerZoneCollectionTestCase(testtools.TestCase):
self.power_zone_col._conn, self.power_zone_col._conn,
"/redfish/v1/Chassis/Rack1/PowerZones/Power1", "/redfish/v1/Chassis/Rack1/PowerZones/Power1",
redfish_version=self.power_zone_col.redfish_version, redfish_version=self.power_zone_col.redfish_version,
registries=None,
) )
] ]
mock_power_zone.assert_has_calls(calls) mock_power_zone.assert_has_calls(calls)

View File

@ -36,7 +36,6 @@ class ThermalTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.thermal_inst._parse_attributes()
self.assertEqual("Thermal", self.thermal_inst.identity) self.assertEqual("Thermal", self.thermal_inst.identity)
self.assertEqual("ThermalName", self.thermal_inst.name) self.assertEqual("ThermalName", self.thermal_inst.name)
self.assertEqual("Thermal Subsystem", self.thermal_inst.description) self.assertEqual("Thermal Subsystem", self.thermal_inst.description)

View File

@ -36,7 +36,6 @@ class ThermalZoneTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.thermal_zone_inst._parse_attributes()
self.assertEqual("1", self.thermal_zone_inst.identity) self.assertEqual("1", self.thermal_zone_inst.identity)
self.assertEqual("thermal zone 1", self.thermal_zone_inst.name) self.assertEqual("thermal zone 1", self.thermal_zone_inst.name)
self.assertEqual( self.assertEqual(
@ -131,7 +130,6 @@ class ThermalZoneCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.thermal_zone_col._parse_attributes()
self.assertEqual("1.1.0", self.thermal_zone_col.redfish_version) self.assertEqual("1.1.0", self.thermal_zone_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1",), ("/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1",),
@ -147,6 +145,7 @@ class ThermalZoneCollectionTestCase(testtools.TestCase):
self.thermal_zone_col._conn, self.thermal_zone_col._conn,
"/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1", "/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1",
redfish_version=self.thermal_zone_col.redfish_version, redfish_version=self.thermal_zone_col.redfish_version,
registries=None,
) )
@mock.patch.object(thermal_zone, "ThermalZone", autospec=True) @mock.patch.object(thermal_zone, "ThermalZone", autospec=True)
@ -157,6 +156,7 @@ class ThermalZoneCollectionTestCase(testtools.TestCase):
self.thermal_zone_col._conn, self.thermal_zone_col._conn,
"/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1", "/redfish/v1/Chassis/Rack1/ThermalZones/Thermal1",
redfish_version=self.thermal_zone_col.redfish_version, redfish_version=self.thermal_zone_col.redfish_version,
registries=None,
) )
] ]
mock_thermal_zone.assert_has_calls(calls) mock_thermal_zone.assert_has_calls(calls)

View File

@ -40,7 +40,6 @@ class EthernetSwtichTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_switch_inst._parse_attributes()
self.assertEqual("1.0.2", self.ethernet_switch_inst.redfish_version) 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.identity)
self.assertEqual("Switch1", self.ethernet_switch_inst.name) self.assertEqual("Switch1", self.ethernet_switch_inst.name)
@ -205,7 +204,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_switch_col._parse_attributes()
self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version) self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version)
self.assertEqual( self.assertEqual(
"Ethernet Switches Collection", self.ethernet_switch_col.name "Ethernet Switches Collection", self.ethernet_switch_col.name
@ -225,6 +223,7 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
self.ethernet_switch_col._conn, self.ethernet_switch_col._conn,
"/redfish/v1/EthernetSwitches/Switch1", "/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) @mock.patch.object(ethernet_switch, "EthernetSwitch", autospec=True)

View File

@ -41,7 +41,6 @@ class EthernetSwitchACLTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.acl_inst._parse_attributes()
self.assertEqual("1.0.2", self.acl_inst.redfish_version) self.assertEqual("1.0.2", self.acl_inst.redfish_version)
self.assertEqual("ACL1", self.acl_inst.identity) self.assertEqual("ACL1", self.acl_inst.identity)
self.assertEqual( self.assertEqual(
@ -230,7 +229,6 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.acl_col._parse_attributes()
self.assertEqual("1.0.2", self.acl_col.redfish_version) self.assertEqual("1.0.2", self.acl_col.redfish_version)
self.assertEqual( self.assertEqual(
"Ethernet Switch Access Control List Collection", self.acl_col.name "Ethernet Switch Access Control List Collection", self.acl_col.name
@ -249,6 +247,7 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase):
self.acl_col._conn, self.acl_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1", "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1",
redfish_version=self.acl_col.redfish_version, redfish_version=self.acl_col.redfish_version,
registries=None,
) )
@mock.patch.object(ethernet_switch_acl, "EthernetSwitchACL", autospec=True) @mock.patch.object(ethernet_switch_acl, "EthernetSwitchACL", autospec=True)
@ -258,6 +257,7 @@ class EthernetSwitchACLCollectionTestCase(testtools.TestCase):
self.acl_col._conn, self.acl_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1", "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1",
redfish_version=self.acl_col.redfish_version, redfish_version=self.acl_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -42,7 +42,6 @@ class EthernetSwitchACLRuleTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.acl_rule_inst._parse_attributes()
self.assertEqual("1.0.2", self.acl_rule_inst.redfish_version) self.assertEqual("1.0.2", self.acl_rule_inst.redfish_version)
self.assertEqual("Rule1", self.acl_rule_inst.identity) self.assertEqual("Rule1", self.acl_rule_inst.identity)
self.assertEqual("Example Rule", self.acl_rule_inst.name) self.assertEqual("Example Rule", self.acl_rule_inst.name)
@ -237,7 +236,6 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.acl_rule_col._parse_attributes()
self.assertEqual("1.0.2", self.acl_rule_col.redfish_version) self.assertEqual("1.0.2", self.acl_rule_col.redfish_version)
self.assertEqual( self.assertEqual(
"Ethernet Switch Access Control " "List Rules Collection", "Ethernet Switch Access Control " "List Rules Collection",
@ -259,6 +257,7 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase):
self.acl_rule_col._conn, self.acl_rule_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/Rules/Rule1", "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/Rules/Rule1",
redfish_version=self.acl_rule_col.redfish_version, redfish_version=self.acl_rule_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -272,6 +271,7 @@ class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase):
"/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/" "/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/"
"Rules/Rule1", "Rules/Rule1",
redfish_version=self.acl_rule_col.redfish_version, redfish_version=self.acl_rule_col.redfish_version,
registries=None,
) )
] ]
mock_acl_rule.assert_has_calls(calls) mock_acl_rule.assert_has_calls(calls)

View File

@ -41,7 +41,6 @@ class EthernetSwitchPortTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_inst._parse_attributes()
self.assertEqual("1.0.2", self.port_inst.redfish_version) self.assertEqual("1.0.2", self.port_inst.redfish_version)
self.assertEqual("Port1", self.port_inst.identity) self.assertEqual("Port1", self.port_inst.identity)
self.assertEqual("Switch Port", self.port_inst.name) self.assertEqual("Switch Port", self.port_inst.name)
@ -293,7 +292,6 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_col._parse_attributes()
self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual("1.0.2", self.port_col.redfish_version)
self.assertEqual("Ethernet Switch Port Collection", self.port_col.name) self.assertEqual("Ethernet Switch Port Collection", self.port_col.name)
self.assertEqual( self.assertEqual(
@ -312,6 +310,7 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1",
redfish_version=self.port_col.redfish_version, redfish_version=self.port_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -323,6 +322,7 @@ class EthernetSwitchPortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1",
redfish_version=self.port_col.redfish_version, redfish_version=self.port_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -43,7 +43,6 @@ class EthernetSwitchStaticMACTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): 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.0.2", self.static_mac_inst.redfish_version)
self.assertEqual("1", self.static_mac_inst.identity) self.assertEqual("1", self.static_mac_inst.identity)
self.assertEqual("StaticMAC", self.static_mac_inst.name) self.assertEqual("StaticMAC", self.static_mac_inst.name)
@ -118,7 +117,6 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.static_mac_col._parse_attributes()
self.assertEqual("1.1.0", self.static_mac_col.redfish_version) self.assertEqual("1.1.0", self.static_mac_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1",), ("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1",),
@ -136,6 +134,7 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase):
self.static_mac_col._conn, self.static_mac_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/StaticMACs/1",
redfish_version=self.static_mac_col.redfish_version, redfish_version=self.static_mac_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -148,7 +147,8 @@ class EthernetSwitchStaticMACCollectionTestCase(testtools.TestCase):
self.static_mac_col._conn, self.static_mac_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/" "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/"
"StaticMACs/1", "StaticMACs/1",
redfish_version=self.static_mac_col.redfish_version, self.static_mac_col.redfish_version,
None,
) )
] ]
mock_static_mac.assert_has_calls(calls) mock_static_mac.assert_has_calls(calls)

View File

@ -40,7 +40,6 @@ class VLanNetworkInterfaceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.vlan_inst._parse_attributes()
self.assertEqual("1.0.2", self.vlan_inst.redfish_version) self.assertEqual("1.0.2", self.vlan_inst.redfish_version)
self.assertEqual("VLAN1", self.vlan_inst.identity) self.assertEqual("VLAN1", self.vlan_inst.identity)
self.assertEqual("VLAN Network Interface", self.vlan_inst.name) self.assertEqual("VLAN Network Interface", self.vlan_inst.name)
@ -82,7 +81,6 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.vlan_col._parse_attributes()
self.assertEqual("1.1.0", self.vlan_col.redfish_version) self.assertEqual("1.1.0", self.vlan_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1",), ("/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1",),
@ -100,6 +98,7 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase):
self.vlan_col._conn, self.vlan_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/VLANs/VLAN1",
redfish_version=self.vlan_col.redfish_version, redfish_version=self.vlan_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -112,7 +111,8 @@ class VLanNetworkInterfaceCollectionTestCase(testtools.TestCase):
self.vlan_col._conn, self.vlan_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/" "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1/"
"VLANs/VLAN1", "VLANs/VLAN1",
redfish_version=self.vlan_col.redfish_version, self.vlan_col.redfish_version,
None,
) )
] ]
mock_vlan.assert_has_calls(calls) mock_vlan.assert_has_calls(calls)

View File

@ -38,7 +38,6 @@ class EventSubscriptionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.event_destination_inst._parse_attributes()
self.assertEqual("1", self.event_destination_inst.identity) self.assertEqual("1", self.event_destination_inst.identity)
self.assertEqual( self.assertEqual(
"EventSubscription 1", self.event_destination_inst.name "EventSubscription 1", self.event_destination_inst.name
@ -91,7 +90,6 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.event_subscription_col._parse_attributes()
self.assertEqual("1.0.2", self.event_subscription_col.redfish_version) self.assertEqual("1.0.2", self.event_subscription_col.redfish_version)
self.assertEqual( self.assertEqual(
"Event Subscriptions Collection", self.event_subscription_col.name "Event Subscriptions Collection", self.event_subscription_col.name
@ -110,6 +108,7 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase):
self.event_subscription_col._conn, self.event_subscription_col._conn,
"/redfish/v1/EventService/Subscriptions/1", "/redfish/v1/EventService/Subscriptions/1",
redfish_version=self.event_subscription_col.redfish_version, redfish_version=self.event_subscription_col.redfish_version,
registries=None,
) )
@mock.patch.object(event_destination, "EventDestination", autospec=True) @mock.patch.object(event_destination, "EventDestination", autospec=True)
@ -119,6 +118,7 @@ class EventSubscriptionCollectionTestCase(testtools.TestCase):
self.event_subscription_col._conn, self.event_subscription_col._conn,
"/redfish/v1/EventService/Subscriptions/1", "/redfish/v1/EventService/Subscriptions/1",
redfish_version=self.event_subscription_col.redfish_version, redfish_version=self.event_subscription_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -35,7 +35,6 @@ class EventServiceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.event_service_inst._parse_attributes()
self.assertEqual("EventService", self.event_service_inst.identity) 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.name)
self.assertEqual("Event Service", self.event_service_inst.description) self.assertEqual("Event Service", self.event_service_inst.description)

View File

@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_inst._parse_attributes()
self.assertEqual("1.0.2", self.endpoint_inst.redfish_version) self.assertEqual("1.0.2", self.endpoint_inst.redfish_version)
self.assertEqual( self.assertEqual(
"The PCIe Physical function of an 850GB NVMe drive", "The PCIe Physical function of an 850GB NVMe drive",
@ -99,7 +98,6 @@ class EndpointCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_col._parse_attributes()
self.assertEqual("1.0.2", self.endpoint_col.redfish_version) self.assertEqual("1.0.2", self.endpoint_col.redfish_version)
self.assertEqual("PCIe Endpoint Collection", self.endpoint_col.name) self.assertEqual("PCIe Endpoint Collection", self.endpoint_col.name)
self.assertEqual( self.assertEqual(
@ -120,6 +118,7 @@ class EndpointCollectionTestCase(testtools.TestCase):
self.endpoint_col._conn, self.endpoint_col._conn,
"/redfish/v1/Fabrics/PCIe/Endpoints/NVMeDrivePF1", "/redfish/v1/Fabrics/PCIe/Endpoints/NVMeDrivePF1",
redfish_version=self.endpoint_col.redfish_version, redfish_version=self.endpoint_col.redfish_version,
registries=None,
) )
@mock.patch.object(endpoint, "Endpoint", autospec=True) @mock.patch.object(endpoint, "Endpoint", autospec=True)
@ -129,6 +128,7 @@ class EndpointCollectionTestCase(testtools.TestCase):
self.endpoint_col._conn, self.endpoint_col._conn,
"/redfish/v1/Fabrics/PCIe/Endpoints" "/HostRootComplex1", "/redfish/v1/Fabrics/PCIe/Endpoints" "/HostRootComplex1",
redfish_version=self.endpoint_col.redfish_version, redfish_version=self.endpoint_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(3, len(members)) self.assertEqual(3, len(members))

View File

@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_inst._parse_attributes()
self.assertEqual("1.0.2", self.fabric_inst.redfish_version) self.assertEqual("1.0.2", self.fabric_inst.redfish_version)
self.assertEqual("PCIe Fabric", self.fabric_inst.description) self.assertEqual("PCIe Fabric", self.fabric_inst.description)
self.assertEqual("PCIe", self.fabric_inst.identity) self.assertEqual("PCIe", self.fabric_inst.identity)
@ -202,7 +201,6 @@ class FabricCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_col._parse_attributes()
self.assertEqual("1.0.2", self.fabric_col.redfish_version) self.assertEqual("1.0.2", self.fabric_col.redfish_version)
self.assertEqual("Fabric Collection", self.fabric_col.name) self.assertEqual("Fabric Collection", self.fabric_col.name)
self.assertEqual( self.assertEqual(
@ -216,6 +214,7 @@ class FabricCollectionTestCase(testtools.TestCase):
self.fabric_col._conn, self.fabric_col._conn,
"/redfish/v1/Fabrics/PCIe", "/redfish/v1/Fabrics/PCIe",
redfish_version=self.fabric_col.redfish_version, redfish_version=self.fabric_col.redfish_version,
registries=None,
) )
@mock.patch.object(fabric, "Fabric", autospec=True) @mock.patch.object(fabric, "Fabric", autospec=True)
@ -225,6 +224,7 @@ class FabricCollectionTestCase(testtools.TestCase):
self.fabric_col._conn, self.fabric_col._conn,
"/redfish/v1/Fabrics/PCIe", "/redfish/v1/Fabrics/PCIe",
redfish_version=self.fabric_col.redfish_version, redfish_version=self.fabric_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -38,7 +38,6 @@ class PortTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_inst._parse_attributes()
self.assertEqual("Up1", self.port_inst.identity) 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.name)
self.assertEqual("PCIe Upstream Port 1", self.port_inst.description) self.assertEqual("PCIe Upstream Port 1", self.port_inst.description)
@ -73,7 +72,7 @@ class PortTestCase(testtools.TestCase):
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.MissingAttributeError, exceptions.MissingAttributeError,
"attribute Actions/#Port.Reset/target", "attribute Actions/#Port.Reset/target",
self.port_inst._parse_attributes, self.port_inst.refresh,
) )
def test_get__reset_action_element(self): def test_get__reset_action_element(self):
@ -135,7 +134,6 @@ class PortCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_col._parse_attributes()
self.assertEqual("PCIe Port Collection", self.port_col.name) self.assertEqual("PCIe Port Collection", self.port_col.name)
self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual("1.0.2", self.port_col.redfish_version)
self.assertEqual( self.assertEqual(
@ -157,6 +155,7 @@ class PortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1", "/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1",
redfish_version=self.port_col.redfish_version, redfish_version=self.port_col.redfish_version,
registries=None,
) )
@mock.patch.object(port, "Port", autospec=True) @mock.patch.object(port, "Port", autospec=True)
@ -166,6 +165,7 @@ class PortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/Fabrics/PCIe/Switches/1/" "Ports/Down2", "/redfish/v1/Fabrics/PCIe/Switches/1/" "Ports/Down2",
redfish_version="1.0.2", redfish_version="1.0.2",
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(mock_port.call_count, 4) self.assertEqual(mock_port.call_count, 4)

View File

@ -39,7 +39,6 @@ class SwitchTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.switch_inst._parse_attributes()
self.assertEqual("1", self.switch_inst.identity) self.assertEqual("1", self.switch_inst.identity)
self.assertEqual("PCIe Switch", self.switch_inst.name) self.assertEqual("PCIe Switch", self.switch_inst.name)
self.assertEqual("PCIe Switch", self.switch_inst.description) self.assertEqual("PCIe Switch", self.switch_inst.description)
@ -73,7 +72,7 @@ class SwitchTestCase(testtools.TestCase):
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.MissingAttributeError, exceptions.MissingAttributeError,
"attribute Actions/#Switch.Reset/target", "attribute Actions/#Switch.Reset/target",
self.switch_inst._parse_attributes, self.switch_inst.refresh,
) )
def test_get__reset_action_element(self): def test_get__reset_action_element(self):
@ -176,7 +175,6 @@ class SwitchCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.switch_col._parse_attributes()
self.assertEqual("Switch Collection", self.switch_col.name) self.assertEqual("Switch Collection", self.switch_col.name)
self.assertEqual( self.assertEqual(
("/redfish/v1/Fabrics/PCIe/Switches/1",), ("/redfish/v1/Fabrics/PCIe/Switches/1",),
@ -190,6 +188,7 @@ class SwitchCollectionTestCase(testtools.TestCase):
self.switch_col._conn, self.switch_col._conn,
"/redfish/v1/Fabrics/PCIe/Switches/1", "/redfish/v1/Fabrics/PCIe/Switches/1",
redfish_version=self.switch_col.redfish_version, redfish_version=self.switch_col.redfish_version,
registries=None,
) )
@mock.patch.object(switch, "Switch", autospec=True) @mock.patch.object(switch, "Switch", autospec=True)
@ -199,6 +198,7 @@ class SwitchCollectionTestCase(testtools.TestCase):
self.switch_col._conn, self.switch_col._conn,
"/redfish/v1/Fabrics/PCIe/Switches/1", "/redfish/v1/Fabrics/PCIe/Switches/1",
redfish_version="1.0.2", redfish_version="1.0.2",
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -35,7 +35,6 @@ class ZoneTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.zone_inst._parse_attributes()
self.assertEqual("1.0.2", self.zone_inst.redfish_version) self.assertEqual("1.0.2", self.zone_inst.redfish_version)
self.assertEqual("PCIe Zone 1", self.zone_inst.description) self.assertEqual("PCIe Zone 1", self.zone_inst.description)
self.assertEqual("1", self.zone_inst.identity) self.assertEqual("1", self.zone_inst.identity)
@ -109,7 +108,6 @@ class ZoneCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.zone_col._parse_attributes()
self.assertEqual("1.0.2", self.zone_col.redfish_version) self.assertEqual("1.0.2", self.zone_col.redfish_version)
self.assertEqual("PCIe Zone Collection", self.zone_col.name) self.assertEqual("PCIe Zone Collection", self.zone_col.name)
self.assertEqual( self.assertEqual(
@ -127,6 +125,7 @@ class ZoneCollectionTestCase(testtools.TestCase):
self.zone_col._conn, self.zone_col._conn,
"/redfish/v1/Fabrics/PCIe/Zones/1", "/redfish/v1/Fabrics/PCIe/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) @mock.patch.object(zone, "Zone", autospec=True)
@ -136,6 +135,7 @@ class ZoneCollectionTestCase(testtools.TestCase):
self.zone_col._conn, self.zone_col._conn,
"/redfish/v1/Fabrics/PCIe/Zones/2", "/redfish/v1/Fabrics/PCIe/Zones/2",
redfish_version=self.zone_col.redfish_version, redfish_version=self.zone_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(2, len(members)) self.assertEqual(2, len(members))

View File

@ -39,7 +39,6 @@ class EthernetInterface(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.ethernet_interface_inst._parse_attributes()
self.assertEqual("LAN1", self.ethernet_interface_inst.identity) self.assertEqual("LAN1", self.ethernet_interface_inst.identity)
self.assertEqual( self.assertEqual(
"Ethernet Interface", self.ethernet_interface_inst.name "Ethernet Interface", self.ethernet_interface_inst.name
@ -204,7 +203,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_interface_col._parse_attributes()
self.assertEqual("1.0.2", self.ethernet_interface_col.redfish_version) self.assertEqual("1.0.2", self.ethernet_interface_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Managers/1/EthernetInterfaces/1",), ("/redfish/v1/Managers/1/EthernetInterfaces/1",),
@ -220,6 +218,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
"/redfish/v1/Managers/1/EthernetInterfaces/1", "/redfish/v1/Managers/1/EthernetInterfaces/1",
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) @mock.patch.object(ethernet_interface, "EthernetInterface", autospec=True)
@ -230,6 +229,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
"/redfish/v1/Managers/1/EthernetInterfaces/1", "/redfish/v1/Managers/1/EthernetInterfaces/1",
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) mock_ethernet_interface.assert_has_calls(calls)

View File

@ -35,7 +35,6 @@ class TestManager(base.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.manager_inst._parse_attributes()
self.assertEqual("1.0.2", self.manager_inst.redfish_version) self.assertEqual("1.0.2", self.manager_inst.redfish_version)
self.assertEqual("1", self.manager_inst.identity) self.assertEqual("1", self.manager_inst.identity)
self.assertEqual("Manager", self.manager_inst.name) self.assertEqual("Manager", self.manager_inst.name)
@ -238,7 +237,6 @@ class TestManagerCollection(base.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.manager_col._parse_attributes()
self.assertEqual("1.0.2", self.manager_col.redfish_version) self.assertEqual("1.0.2", self.manager_col.redfish_version)
self.assertEqual("Manager Collection", self.manager_col.name) self.assertEqual("Manager Collection", self.manager_col.name)
self.assertEqual( self.assertEqual(
@ -258,6 +256,7 @@ class TestManagerCollection(base.TestCase):
self.manager_col._conn, self.manager_col._conn,
"/redfish/v1/Managers/RMC", "/redfish/v1/Managers/RMC",
redfish_version=self.manager_col.redfish_version, redfish_version=self.manager_col.redfish_version,
registries=None,
) )
@mock.patch.object(manager, "Manager", autospec=True) @mock.patch.object(manager, "Manager", autospec=True)

View File

@ -40,7 +40,6 @@ class NetworkProtocolTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.network_protocol_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"NetworkProtocol", self.network_protocol_inst.identity "NetworkProtocol", self.network_protocol_inst.identity
) )

View File

@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_inst._parse_attributes()
self.assertEqual("1.0.2", self.node_inst.redfish_version) self.assertEqual("1.0.2", self.node_inst.redfish_version)
self.assertEqual("Node #1", self.node_inst.description) self.assertEqual("Node #1", self.node_inst.description)
self.assertEqual("Allocated", self.node_inst.composed_node_state) self.assertEqual("Allocated", self.node_inst.composed_node_state)
@ -91,7 +90,7 @@ class NodeTestCase(testtools.TestCase):
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.MissingAttributeError, exceptions.MissingAttributeError,
"attribute Actions", "attribute Actions",
self.node_inst._parse_attributes, self.node_inst.refresh,
) )
def test__parse_attributes_missing_reset_target(self): def test__parse_attributes_missing_reset_target(self):
@ -99,7 +98,7 @@ class NodeTestCase(testtools.TestCase):
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.MissingAttributeError, exceptions.MissingAttributeError,
"attribute Actions/#ComposedNode.Reset/target", "attribute Actions/#ComposedNode.Reset/target",
self.node_inst._parse_attributes, self.node_inst.refresh,
) )
def test_get__reset_action_element(self): def test_get__reset_action_element(self):
@ -310,7 +309,7 @@ class NodeTestCase(testtools.TestCase):
"Resource@Redfish.AllowableValues" "Resource@Redfish.AllowableValues"
] ]
) = [] ) = []
self.node_inst._parse_attributes() self.node_inst.refresh()
expected = self.node_inst.get_allowed_attach_endpoints() expected = self.node_inst.get_allowed_attach_endpoints()
result = () result = ()
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -355,7 +354,7 @@ class NodeTestCase(testtools.TestCase):
"Resource@Redfish.AllowableValues" "Resource@Redfish.AllowableValues"
] ]
) = [] ) = []
self.node_inst._parse_attributes() self.node_inst.refresh()
expected = self.node_inst.get_allowed_detach_endpoints() expected = self.node_inst.get_allowed_detach_endpoints()
result = () result = ()
self.assertEqual(expected, result) self.assertEqual(expected, result)
@ -383,7 +382,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json["Memory"]["Status"].pop("Health") self.node_inst._json["Memory"]["Status"].pop("Health")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(32, self.node_inst.memory.total_system_memory_gib)
self.assertEqual(None, self.node_inst.memory.status.health) self.assertEqual(None, self.node_inst.memory.status.health)
@ -393,7 +392,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json["Memory"]["Status"].pop("State") self.node_inst._json["Memory"]["Status"].pop("State")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(32, self.node_inst.memory.total_system_memory_gib)
self.assertEqual(None, self.node_inst.memory.status.health) self.assertEqual(None, self.node_inst.memory.status.health)
@ -403,7 +402,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json["Memory"]["Status"].pop("HealthRollup") self.node_inst._json["Memory"]["Status"].pop("HealthRollup")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(32, self.node_inst.memory.total_system_memory_gib)
self.assertEqual(None, self.node_inst.memory.status.health) self.assertEqual(None, self.node_inst.memory.status.health)
@ -413,7 +412,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json["Memory"].pop("Status") self.node_inst._json["Memory"].pop("Status")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(32, self.node_inst.memory.total_system_memory_gib) self.assertEqual(32, self.node_inst.memory.total_system_memory_gib)
self.assertEqual(None, self.node_inst.memory.status) self.assertEqual(None, self.node_inst.memory.status)
@ -421,7 +420,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json["Memory"].pop("TotalSystemMemoryGiB") self.node_inst._json["Memory"].pop("TotalSystemMemoryGiB")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(None, self.node_inst.memory.total_system_memory_gib) self.assertEqual(None, self.node_inst.memory.total_system_memory_gib)
self.assertEqual(None, self.node_inst.memory.status) self.assertEqual(None, self.node_inst.memory.status)
@ -429,7 +428,7 @@ class NodeTestCase(testtools.TestCase):
# | GIVEN | # | GIVEN |
self.node_inst._json.pop("Memory") self.node_inst._json.pop("Memory")
# | WHEN | # | WHEN |
self.node_inst._parse_attributes() self.node_inst.refresh()
# | THEN | # | THEN |
self.assertEqual(None, self.node_inst.memory) self.assertEqual(None, self.node_inst.memory)
@ -461,7 +460,6 @@ class NodeCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_col._parse_attributes()
self.assertEqual("1.0.2", self.node_col.redfish_version) self.assertEqual("1.0.2", self.node_col.redfish_version)
self.assertEqual("Composed Nodes Collection", self.node_col.name) self.assertEqual("Composed Nodes Collection", self.node_col.name)
self.assertEqual( self.assertEqual(
@ -475,6 +473,7 @@ class NodeCollectionTestCase(testtools.TestCase):
self.node_col._conn, self.node_col._conn,
"/redfish/v1/Nodes/Node1", "/redfish/v1/Nodes/Node1",
redfish_version=self.node_col.redfish_version, redfish_version=self.node_col.redfish_version,
registries=None,
) )
@mock.patch.object(node, "Node", autospec=True) @mock.patch.object(node, "Node", autospec=True)
@ -484,6 +483,7 @@ class NodeCollectionTestCase(testtools.TestCase):
self.node_col._conn, self.node_col._conn,
"/redfish/v1/Nodes/Node1", "/redfish/v1/Nodes/Node1",
redfish_version=self.node_col.redfish_version, redfish_version=self.node_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -34,7 +34,6 @@ class RegistriesTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.registries_inst._parse_attributes()
self.assertEqual("Base", self.registries_inst.identity) self.assertEqual("Base", self.registries_inst.identity)
self.assertEqual( self.assertEqual(
"Base Message Registry File", self.registries_inst.name "Base Message Registry File", self.registries_inst.name
@ -71,7 +70,6 @@ class RegistriesCollectionTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.registries_col._parse_attributes()
self.assertEqual("Registry File Collection", self.registries_col.name) self.assertEqual("Registry File Collection", self.registries_col.name)
self.assertEqual( self.assertEqual(
("/redfish/v1/Registries/Base",), ("/redfish/v1/Registries/Base",),
@ -88,6 +86,7 @@ class RegistriesCollectionTestCase(testtools.TestCase):
self.registries_col._conn, self.registries_col._conn,
"/redfish/v1/Registries/Base", "/redfish/v1/Registries/Base",
redfish_version=self.registries_col.redfish_version, redfish_version=self.registries_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(

View File

@ -38,7 +38,6 @@ class StorageServiceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_inst._parse_attributes()
self.assertEqual("1.0.2", self.storage_service_inst.redfish_version) self.assertEqual("1.0.2", self.storage_service_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Storage Service", self.storage_service_inst.description "Storage Service", self.storage_service_inst.description
@ -249,7 +248,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_col._parse_attributes()
self.assertEqual("1.0.2", self.storage_service_col.redfish_version) self.assertEqual("1.0.2", self.storage_service_col.redfish_version)
self.assertEqual( self.assertEqual(
"Storage Services Collection", self.storage_service_col.name "Storage Services Collection", self.storage_service_col.name
@ -266,6 +264,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
self.storage_service_col._conn, self.storage_service_col._conn,
"/redfish/v1/Services/RSS1", "/redfish/v1/Services/RSS1",
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) @mock.patch.object(storage_service, "StorageService", autospec=True)
@ -275,6 +274,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
self.storage_service_col._conn, self.storage_service_col._conn,
"/redfish/v1/Services/RSS1", "/redfish/v1/Services/RSS1",
redfish_version=self.storage_service_col.redfish_version, redfish_version=self.storage_service_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -36,7 +36,6 @@ class DriveTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.drive_inst._parse_attributes()
self.assertEqual("1.1.0", self.drive_inst.redfish_version) self.assertEqual("1.1.0", self.drive_inst.redfish_version)
self.assertEqual("OK", self.drive_inst.status_indicator) self.assertEqual("OK", self.drive_inst.status_indicator)
self.assertEqual("Lit", self.drive_inst.indicator_led) self.assertEqual("Lit", self.drive_inst.indicator_led)

View File

@ -38,7 +38,6 @@ class EthernetInterfaceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_interface_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"Ethernet Interface", self.ethernet_interface_inst.name "Ethernet Interface", self.ethernet_interface_inst.name
) )
@ -130,7 +129,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_interface_col._parse_attributes()
self.assertEqual("1.1.0", self.ethernet_interface_col.redfish_version) self.assertEqual("1.1.0", self.ethernet_interface_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Systems/System1/EthernetInterfaces/LAN1",), ("/redfish/v1/Systems/System1/EthernetInterfaces/LAN1",),
@ -146,6 +144,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
"/redfish/v1/Systems/System1/EthernetInterfaces/LAN1", "/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) @mock.patch.object(ethernet_interface, "EthernetInterface", autospec=True)
@ -156,6 +155,7 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
"/redfish/v1/Systems/System1/EthernetInterfaces/LAN1", "/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_network_interface.assert_has_calls(calls) mock_network_interface.assert_has_calls(calls)

View File

@ -36,7 +36,6 @@ class MemoryTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.memory_inst._parse_attributes()
self.assertEqual("1.1.0", self.memory_inst.redfish_version) self.assertEqual("1.1.0", self.memory_inst.redfish_version)
self.assertEqual("DIMM", self.memory_inst.name) self.assertEqual("DIMM", self.memory_inst.name)
self.assertEqual("Dimm1", self.memory_inst.identity) self.assertEqual("Dimm1", self.memory_inst.identity)
@ -88,7 +87,6 @@ class MemoryCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.sys_memory_col._parse_attributes()
self.assertEqual("1.1.0", self.sys_memory_col.redfish_version) self.assertEqual("1.1.0", self.sys_memory_col.redfish_version)
self.assertEqual( self.assertEqual(
( (
@ -107,6 +105,7 @@ class MemoryCollectionTestCase(testtools.TestCase):
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm1", "/redfish/v1/Systems/System1/Memory/Dimm1",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
) )
@mock.patch.object(memory, "Memory", autospec=True) @mock.patch.object(memory, "Memory", autospec=True)
@ -117,11 +116,13 @@ class MemoryCollectionTestCase(testtools.TestCase):
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm1", "/redfish/v1/Systems/System1/Memory/Dimm1",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm2", "/redfish/v1/Systems/System1/Memory/Dimm2",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
), ),
] ]
mock_memory.assert_has_calls(calls) mock_memory.assert_has_calls(calls)

View File

@ -40,7 +40,6 @@ class NetworkDeviceFunctionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.network_device_function_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"1.1.0", self.network_device_function_inst.redfish_version "1.1.0", self.network_device_function_inst.redfish_version
) )
@ -231,7 +230,6 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.network_device_function_col._parse_attributes()
self.assertEqual( self.assertEqual(
"1.1.0", self.network_device_function_col.redfish_version "1.1.0", self.network_device_function_col.redfish_version
) )
@ -256,6 +254,7 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase):
"/redfish/v1/Systems/System1/NetworkInterfaces/1/" "/redfish/v1/Systems/System1/NetworkInterfaces/1/"
"NetworkDeviceFunctions/1", "NetworkDeviceFunctions/1",
redfish_version=self.network_device_function_col.redfish_version, redfish_version=self.network_device_function_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -268,6 +267,7 @@ class NetworkDeviceFunctionCollectionTestCase(testtools.TestCase):
"/redfish/v1/Systems/System1/NetworkInterfaces/1/" "/redfish/v1/Systems/System1/NetworkInterfaces/1/"
"NetworkDeviceFunctions/1", "NetworkDeviceFunctions/1",
redfish_version=self.network_device_function_col.redfish_version, redfish_version=self.network_device_function_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -38,7 +38,6 @@ class NetworkInterface(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.network_interface_inst._parse_attributes()
self.assertEqual("1.1.0", self.network_interface_inst.redfish_version) self.assertEqual("1.1.0", self.network_interface_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Network Device View", self.network_interface_inst.name "Network Device View", self.network_interface_inst.name
@ -138,7 +137,6 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.network_interface_col._parse_attributes()
self.assertEqual("1.1.0", self.network_interface_col.redfish_version) self.assertEqual("1.1.0", self.network_interface_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Systems/System1/NetworkInterfaces/1",), ("/redfish/v1/Systems/System1/NetworkInterfaces/1",),
@ -154,6 +152,7 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase):
self.network_interface_col._conn, self.network_interface_col._conn,
"/redfish/v1/Systems/System1/NetworkInterfaces/1", "/redfish/v1/Systems/System1/NetworkInterfaces/1",
redfish_version=self.network_interface_col.redfish_version, redfish_version=self.network_interface_col.redfish_version,
registries=None,
) )
@mock.patch.object(network_interface, "NetworkInterface", autospec=True) @mock.patch.object(network_interface, "NetworkInterface", autospec=True)
@ -163,6 +162,7 @@ class NetworkInterfaceCollectionTestCase(testtools.TestCase):
self.network_interface_col._conn, self.network_interface_col._conn,
"/redfish/v1/Systems/System1/NetworkInterfaces/1", "/redfish/v1/Systems/System1/NetworkInterfaces/1",
redfish_version=self.network_interface_col.redfish_version, redfish_version=self.network_interface_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -36,7 +36,6 @@ class PCIeDeviceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.pcie_device_inst._parse_attributes()
self.assertEqual("Device1", self.pcie_device_inst.identity) self.assertEqual("Device1", self.pcie_device_inst.identity)
self.assertEqual("NVMe SSD Drive", self.pcie_device_inst.name) self.assertEqual("NVMe SSD Drive", self.pcie_device_inst.name)
self.assertEqual( self.assertEqual(

View File

@ -36,7 +36,6 @@ class PCIeFunctionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.pcie_function_inst._parse_attributes()
self.assertEqual("1", self.pcie_function_inst.identity) self.assertEqual("1", self.pcie_function_inst.identity)
self.assertEqual("SSD", self.pcie_function_inst.name) self.assertEqual("SSD", self.pcie_function_inst.name)
self.assertEqual("SSD Drive", self.pcie_function_inst.description) self.assertEqual("SSD Drive", self.pcie_function_inst.description)

View File

@ -36,7 +36,6 @@ class ProcessorTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_inst._parse_attributes()
self.assertEqual("CPU1", self.processor_inst.identity) self.assertEqual("CPU1", self.processor_inst.identity)
self.assertEqual("Processor", self.processor_inst.name) self.assertEqual("Processor", self.processor_inst.name)
self.assertEqual(None, self.processor_inst.description) self.assertEqual(None, self.processor_inst.description)
@ -98,7 +97,6 @@ class ProcessorCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_col._parse_attributes()
self.assertEqual("1.1.0", self.processor_col.redfish_version) self.assertEqual("1.1.0", self.processor_col.redfish_version)
self.assertEqual( self.assertEqual(
( (
@ -117,6 +115,7 @@ class ProcessorCollectionTestCase(testtools.TestCase):
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU1", "/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) @mock.patch.object(processor, "Processor", autospec=True)
@ -127,11 +126,13 @@ class ProcessorCollectionTestCase(testtools.TestCase):
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU1", "/redfish/v1/Systems/System1/Processors/CPU1",
redfish_version=self.processor_col.redfish_version, redfish_version=self.processor_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU2", "/redfish/v1/Systems/System1/Processors/CPU2",
redfish_version=self.processor_col.redfish_version, redfish_version=self.processor_col.redfish_version,
registries=None,
), ),
] ]
mock_processor.assert_has_calls(calls) mock_processor.assert_has_calls(calls)

View File

@ -37,7 +37,6 @@ class StorageSubsystemTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_inst._parse_attributes()
self.assertEqual("SATA Storage System", self.storage_inst.name) self.assertEqual("SATA Storage System", self.storage_inst.name)
self.assertEqual("1", self.storage_inst.identity) self.assertEqual("1", self.storage_inst.identity)
self.assertEqual("System SATA", self.storage_inst.description) self.assertEqual("System SATA", self.storage_inst.description)
@ -167,7 +166,6 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_subsystem_col._parse_attributes()
self.assertEqual("1.1.0", self.storage_subsystem_col.redfish_version) self.assertEqual("1.1.0", self.storage_subsystem_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Systems/1/Storage/SATA",), ("/redfish/v1/Systems/1/Storage/SATA",),
@ -183,6 +181,7 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase):
self.storage_subsystem_col._conn, self.storage_subsystem_col._conn,
"/redfish/v1/Systems/1/Storage/SATA", "/redfish/v1/Systems/1/Storage/SATA",
redfish_version=self.storage_subsystem_col.redfish_version, redfish_version=self.storage_subsystem_col.redfish_version,
registries=None,
) )
@mock.patch.object(storage, "Storage", autospec=True) @mock.patch.object(storage, "Storage", autospec=True)
@ -193,6 +192,7 @@ class StorageSubsystemCollectionTestCase(testtools.TestCase):
self.storage_subsystem_col._conn, self.storage_subsystem_col._conn,
"/redfish/v1/Systems/1/Storage/SATA", "/redfish/v1/Systems/1/Storage/SATA",
redfish_version=self.storage_subsystem_col.redfish_version, redfish_version=self.storage_subsystem_col.redfish_version,
registries=None,
) )
] ]
mock_storage_subsystem.assert_has_calls(calls) mock_storage_subsystem.assert_has_calls(calls)

View File

@ -44,7 +44,6 @@ class SystemTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_inst._parse_attributes()
self.assertEqual("1.1.0", self.system_inst.redfish_version) self.assertEqual("1.1.0", self.system_inst.redfish_version)
self.assertEqual("System1", self.system_inst.identity) self.assertEqual("System1", self.system_inst.identity)
self.assertEqual("My Computer System", self.system_inst.name) self.assertEqual("My Computer System", self.system_inst.name)
@ -691,7 +690,6 @@ class SystemCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_col._parse_attributes()
self.assertEqual("1.1.0", self.system_col.redfish_version) self.assertEqual("1.1.0", self.system_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"), ("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"),
@ -705,6 +703,7 @@ class SystemCollectionTestCase(testtools.TestCase):
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System1", "/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) @mock.patch.object(system, "System", autospec=True)
@ -715,11 +714,13 @@ class SystemCollectionTestCase(testtools.TestCase):
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System1", "/redfish/v1/Systems/System1",
redfish_version=self.system_col.redfish_version, redfish_version=self.system_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System2", "/redfish/v1/Systems/System2",
redfish_version=self.system_col.redfish_version, redfish_version=self.system_col.redfish_version,
registries=None,
), ),
] ]
mock_system.assert_has_calls(calls) mock_system.assert_has_calls(calls)

View File

@ -35,7 +35,6 @@ class TaskTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.task_inst._parse_attributes()
self.assertEqual("1", self.task_inst.identity) self.assertEqual("1", self.task_inst.identity)
self.assertEqual("Task 1", self.task_inst.name) self.assertEqual("Task 1", self.task_inst.name)
self.assertEqual("Task 1", self.task_inst.description) self.assertEqual("Task 1", self.task_inst.description)
@ -76,7 +75,6 @@ class TaskCollectionTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.task_col._parse_attributes()
self.assertEqual("Task Collection", self.task_col.name) self.assertEqual("Task Collection", self.task_col.name)
self.assertEqual( self.assertEqual(
("/redfish/v1/TaskService/Tasks/1",), ("/redfish/v1/TaskService/Tasks/1",),
@ -91,6 +89,7 @@ class TaskCollectionTestCase(testtools.TestCase):
self.task_col._conn, self.task_col._conn,
"/redfish/v1/TaskService/Tasks/1", "/redfish/v1/TaskService/Tasks/1",
redfish_version=self.task_col.redfish_version, redfish_version=self.task_col.redfish_version,
registries=None,
) )
@mock.patch.object(task, "Task", autospec=True) @mock.patch.object(task, "Task", autospec=True)

View File

@ -36,7 +36,6 @@ class TaskServiceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.task_service_inst._parse_attributes()
self.assertEqual("TaskService", self.task_service_inst.identity) self.assertEqual("TaskService", self.task_service_inst.identity)
self.assertEqual("Tasks Service", self.task_service_inst.name) self.assertEqual("Tasks Service", self.task_service_inst.name)
self.assertEqual( self.assertEqual(

View File

@ -42,7 +42,6 @@ class RSDLibV2_1TestCase(testtools.TestCase):
self.rsd = v2_1.RSDLibV2_1(self.conn) self.rsd = v2_1.RSDLibV2_1(self.conn)
def test__parse_attributes(self): def test__parse_attributes(self):
self.rsd._parse_attributes()
self.assertEqual("2.1.0", self.rsd._rsd_api_version) self.assertEqual("2.1.0", self.rsd._rsd_api_version)
self.assertEqual("1.0.2", self.rsd._redfish_version) self.assertEqual("1.0.2", self.rsd._redfish_version)
self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path)

View File

@ -34,7 +34,6 @@ class PowerTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.power_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"Off", self.power_inst.power_supplies[0].indicator_led "Off", self.power_inst.power_supplies[0].indicator_led
) )

View File

@ -36,7 +36,6 @@ class ThermalTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.thermal._parse_attributes()
self.assertEqual( self.assertEqual(
12, self.thermal.oem.intel_rackscale.volumetric_airflow_cfm 12, self.thermal.oem.intel_rackscale.volumetric_airflow_cfm
) )

View File

@ -176,7 +176,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_switch_col._parse_attributes()
self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version) self.assertEqual("1.0.2", self.ethernet_switch_col.redfish_version)
self.assertEqual( self.assertEqual(
"Ethernet Switches Collection", self.ethernet_switch_col.name "Ethernet Switches Collection", self.ethernet_switch_col.name
@ -196,6 +195,7 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
self.ethernet_switch_col._conn, self.ethernet_switch_col._conn,
"/redfish/v1/EthernetSwitches/Switch1", "/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) @mock.patch.object(ethernet_switch, "EthernetSwitch", autospec=True)

View File

@ -38,7 +38,6 @@ class MetricsTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.metrics_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"EthernetSwitch Metrics for Switch1", self.metrics_inst.name "EthernetSwitch Metrics for Switch1", self.metrics_inst.name
) )

View File

@ -119,7 +119,6 @@ class PortCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_col._parse_attributes()
self.assertEqual("1.0.2", self.port_col.redfish_version) self.assertEqual("1.0.2", self.port_col.redfish_version)
self.assertEqual("Ethernet Switch Port Collection", self.port_col.name) self.assertEqual("Ethernet Switch Port Collection", self.port_col.name)
self.assertEqual( self.assertEqual(
@ -138,6 +137,7 @@ class PortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1",
redfish_version=self.port_col.redfish_version, redfish_version=self.port_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(
@ -149,6 +149,7 @@ class PortCollectionTestCase(testtools.TestCase):
self.port_col._conn, self.port_col._conn,
"/redfish/v1/EthernetSwitches/Switch1/Ports/Port1", "/redfish/v1/EthernetSwitches/Switch1/Ports/Port1",
redfish_version=self.port_col.redfish_version, redfish_version=self.port_col.redfish_version,
registries=None,
) )
self.assertIsInstance(members, list) self.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -40,7 +40,6 @@ class PortMetricsTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_metrics_inst._parse_attributes()
self.assertEqual("1.1.0", self.port_metrics_inst.redfish_version) self.assertEqual("1.1.0", self.port_metrics_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Ethernet Switch Port Metrics", self.port_metrics_inst.name "Ethernet Switch Port Metrics", self.port_metrics_inst.name

View File

@ -37,7 +37,6 @@ class PortTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.port_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1/Metrics", "/redfish/v1/Fabrics/PCIe/Switches/1/Ports/Up1/Metrics",
self.port_inst.oem.intel_rackscale.metrics, self.port_inst.oem.intel_rackscale.metrics,

View File

@ -40,7 +40,6 @@ class MetricsTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_metrics_inst._parse_attributes()
self.assertEqual("1.0.2", self.system_metrics_inst.redfish_version) self.assertEqual("1.0.2", self.system_metrics_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Computer System Metrics for System1", "Computer System Metrics for System1",

View File

@ -37,7 +37,6 @@ class MemoryTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.memory_inst._parse_attributes()
self.assertEqual("1.1.0", self.memory_inst.redfish_version) self.assertEqual("1.1.0", self.memory_inst.redfish_version)
self.assertEqual("DIMM", self.memory_inst.name) self.assertEqual("DIMM", self.memory_inst.name)
self.assertEqual("Dimm1", self.memory_inst.identity) self.assertEqual("Dimm1", self.memory_inst.identity)
@ -140,7 +139,6 @@ class MemoryCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.sys_memory_col._parse_attributes()
self.assertEqual("1.1.0", self.sys_memory_col.redfish_version) self.assertEqual("1.1.0", self.sys_memory_col.redfish_version)
self.assertEqual( self.assertEqual(
( (
@ -159,6 +157,7 @@ class MemoryCollectionTestCase(testtools.TestCase):
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm1", "/redfish/v1/Systems/System1/Memory/Dimm1",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
) )
@mock.patch.object(memory, "Memory", autospec=True) @mock.patch.object(memory, "Memory", autospec=True)
@ -169,11 +168,13 @@ class MemoryCollectionTestCase(testtools.TestCase):
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm1", "/redfish/v1/Systems/System1/Memory/Dimm1",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.sys_memory_col._conn, self.sys_memory_col._conn,
"/redfish/v1/Systems/System1/Memory/Dimm2", "/redfish/v1/Systems/System1/Memory/Dimm2",
redfish_version=self.sys_memory_col.redfish_version, redfish_version=self.sys_memory_col.redfish_version,
registries=None,
), ),
] ]
mock_memory.assert_has_calls(calls) mock_memory.assert_has_calls(calls)

View File

@ -38,7 +38,6 @@ class MemoryMetricsTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.memory_metrics_inst._parse_attributes()
self.assertEqual("1.1.0", self.memory_metrics_inst.redfish_version) self.assertEqual("1.1.0", self.memory_metrics_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Memory Metrics for DIMM1", self.memory_metrics_inst.name "Memory Metrics for DIMM1", self.memory_metrics_inst.name

View File

@ -37,7 +37,6 @@ class ProcessorTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_inst._parse_attributes()
self.assertEqual("1.1.0", self.processor_inst.redfish_version) self.assertEqual("1.1.0", self.processor_inst.redfish_version)
self.assertEqual("CPU1", self.processor_inst.identity) self.assertEqual("CPU1", self.processor_inst.identity)
self.assertEqual("Processor", self.processor_inst.name) self.assertEqual("Processor", self.processor_inst.name)
@ -293,7 +292,6 @@ class ProcessorCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_col._parse_attributes()
self.assertEqual("1.1.0", self.processor_col.redfish_version) self.assertEqual("1.1.0", self.processor_col.redfish_version)
self.assertEqual( self.assertEqual(
( (
@ -312,6 +310,7 @@ class ProcessorCollectionTestCase(testtools.TestCase):
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU1", "/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) @mock.patch.object(processor, "Processor", autospec=True)
@ -322,11 +321,13 @@ class ProcessorCollectionTestCase(testtools.TestCase):
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU1", "/redfish/v1/Systems/System1/Processors/CPU1",
redfish_version=self.processor_col.redfish_version, redfish_version=self.processor_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.processor_col._conn, self.processor_col._conn,
"/redfish/v1/Systems/System1/Processors/CPU2", "/redfish/v1/Systems/System1/Processors/CPU2",
redfish_version=self.processor_col.redfish_version, redfish_version=self.processor_col.redfish_version,
registries=None,
), ),
] ]
mock_system.assert_has_calls(calls) mock_system.assert_has_calls(calls)

View File

@ -38,7 +38,6 @@ class ProcessorMetricsTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_metrics_inst._parse_attributes()
self.assertEqual("1.1.0", self.processor_metrics_inst.redfish_version) self.assertEqual("1.1.0", self.processor_metrics_inst.redfish_version)
self.assertEqual( self.assertEqual(
"ProcessorMetrics for CPU1", self.processor_metrics_inst.name "ProcessorMetrics for CPU1", self.processor_metrics_inst.name

View File

@ -44,7 +44,6 @@ class SystemTestCase(testtools.TestCase):
self.assertIsInstance(self.system_inst, v2_1_system.System) self.assertIsInstance(self.system_inst, v2_1_system.System)
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"0.001", self.system_inst.trusted_modules[0].firmware_version "0.001", self.system_inst.trusted_modules[0].firmware_version
) )
@ -275,7 +274,6 @@ class SystemCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_col._parse_attributes()
self.assertEqual("1.1.0", self.system_col.redfish_version) self.assertEqual("1.1.0", self.system_col.redfish_version)
self.assertEqual( self.assertEqual(
("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"), ("/redfish/v1/Systems/System1", "/redfish/v1/Systems/System2"),
@ -289,6 +287,7 @@ class SystemCollectionTestCase(testtools.TestCase):
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System1", "/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) @mock.patch.object(system, "System", autospec=True)
@ -299,11 +298,13 @@ class SystemCollectionTestCase(testtools.TestCase):
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System1", "/redfish/v1/Systems/System1",
redfish_version=self.system_col.redfish_version, redfish_version=self.system_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.system_col._conn, self.system_col._conn,
"/redfish/v1/Systems/System2", "/redfish/v1/Systems/System2",
redfish_version=self.system_col.redfish_version, redfish_version=self.system_col.redfish_version,
registries=None,
), ),
] ]
mock_system.assert_has_calls(calls) mock_system.assert_has_calls(calls)

View File

@ -37,7 +37,6 @@ class MetricDefinitionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.metric_definition_inst._parse_attributes()
self.assertEqual("1.1.0", self.metric_definition_inst.redfish_version) self.assertEqual("1.1.0", self.metric_definition_inst.redfish_version)
self.assertEqual("memoryTemperature", self.metric_definition_inst.name) self.assertEqual("memoryTemperature", self.metric_definition_inst.name)
self.assertEqual("1-md-6", self.metric_definition_inst.identity) self.assertEqual("1-md-6", self.metric_definition_inst.identity)
@ -188,7 +187,6 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.metric_def_col._parse_attributes()
self.assertEqual("1.1.0", self.metric_def_col.redfish_version) self.assertEqual("1.1.0", self.metric_def_col.redfish_version)
self.assertEqual( self.assertEqual(
( (
@ -209,6 +207,7 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase):
self.metric_def_col._conn, self.metric_def_col._conn,
"/redfish/v1/TelemetryService/MetricDefinitions/CPUTemperature", "/redfish/v1/TelemetryService/MetricDefinitions/CPUTemperature",
redfish_version=self.metric_def_col.redfish_version, redfish_version=self.metric_def_col.redfish_version,
registries=None,
) )
@mock.patch.object(metric_definition, "MetricDefinition", autospec=True) @mock.patch.object(metric_definition, "MetricDefinition", autospec=True)
@ -221,16 +220,19 @@ class MetricDefinitionsCollectionTestCase(testtools.TestCase):
"/redfish/v1/TelemetryService/MetricDefinitions/" "/redfish/v1/TelemetryService/MetricDefinitions/"
"CPUTemperature", "CPUTemperature",
redfish_version=self.metric_def_col.redfish_version, redfish_version=self.metric_def_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.metric_def_col._conn, self.metric_def_col._conn,
"/redfish/v1/TelemetryService/MetricDefinitions/CPUHealth", "/redfish/v1/TelemetryService/MetricDefinitions/CPUHealth",
redfish_version=self.metric_def_col.redfish_version, redfish_version=self.metric_def_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.metric_def_col._conn, self.metric_def_col._conn,
"/redfish/v1/TelemetryService/MetricDefinitions/CPUBandwidth", "/redfish/v1/TelemetryService/MetricDefinitions/CPUBandwidth",
redfish_version=self.metric_def_col.redfish_version, redfish_version=self.metric_def_col.redfish_version,
registries=None,
), ),
] ]
mock_metric_definition.assert_has_calls(calls) mock_metric_definition.assert_has_calls(calls)

View File

@ -37,7 +37,6 @@ class MetricReportTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.metric_report_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"TransmitCPU1Metrics", self.metric_report_inst.identity "TransmitCPU1Metrics", self.metric_report_inst.identity
) )
@ -192,7 +191,6 @@ class MetricReportCollectionTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.metric_report_col._parse_attributes()
self.assertEqual("MetricReports", self.metric_report_col.name) self.assertEqual("MetricReports", self.metric_report_col.name)
@mock.patch.object(metric_report, "MetricReport", autospec=True) @mock.patch.object(metric_report, "MetricReport", autospec=True)
@ -205,6 +203,7 @@ class MetricReportCollectionTestCase(testtools.TestCase):
self.metric_report_col._conn, self.metric_report_col._conn,
"/redfish/v1/TelemetryService/MetricReports/TransmitCPU1Metrics", "/redfish/v1/TelemetryService/MetricReports/TransmitCPU1Metrics",
redfish_version=self.metric_report_col.redfish_version, redfish_version=self.metric_report_col.redfish_version,
registries=None,
) )
@mock.patch.object(metric_report, "MetricReport", autospec=True) @mock.patch.object(metric_report, "MetricReport", autospec=True)

View File

@ -44,7 +44,6 @@ class ReportDefinitionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.metric_report_definition_inst._parse_attributes()
self.assertEqual( self.assertEqual(
"CPUEventPublish", self.metric_report_definition_inst.identity "CPUEventPublish", self.metric_report_definition_inst.identity
) )
@ -238,7 +237,6 @@ class ReportDefinitionCollectionTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.report_definition_col._parse_attributes()
self.assertEqual( self.assertEqual(
"MetricReportDefinition Collection", "MetricReportDefinition Collection",
self.report_definition_col.name, self.report_definition_col.name,
@ -256,6 +254,7 @@ class ReportDefinitionCollectionTestCase(testtools.TestCase):
self.report_definition_col._conn, self.report_definition_col._conn,
"/redfish/v1/TelemetryService/MetricReportDefinitions/CPU1Metrics", "/redfish/v1/TelemetryService/MetricReportDefinitions/CPU1Metrics",
redfish_version=self.report_definition_col.redfish_version, redfish_version=self.report_definition_col.redfish_version,
registries=None,
) )
@mock.patch.object( @mock.patch.object(

View File

@ -38,7 +38,6 @@ class TelemetryTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.telemetry_service_inst._parse_attributes()
self.assertEqual("1.1.0", self.telemetry_service_inst.redfish_version) self.assertEqual("1.1.0", self.telemetry_service_inst.redfish_version)
self.assertEqual("Enabled", self.telemetry_service_inst.status.state) self.assertEqual("Enabled", self.telemetry_service_inst.status.state)
self.assertEqual("OK", self.telemetry_service_inst.status.health) self.assertEqual("OK", self.telemetry_service_inst.status.health)

View File

@ -37,7 +37,6 @@ class TriggersTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.triggers_inst._parse_attributes()
self.assertEqual("ProcessorTemperature", self.triggers_inst.identity) self.assertEqual("ProcessorTemperature", self.triggers_inst.identity)
self.assertEqual( self.assertEqual(
"Triggers for Processor Temperature Malfunction", "Triggers for Processor Temperature Malfunction",
@ -181,7 +180,6 @@ class TriggersCollectionTestCase(testtools.TestCase):
) )
def test_parse_attributes(self): def test_parse_attributes(self):
self.triggers_col._parse_attributes()
self.assertEqual("Triggers Collection", self.triggers_col.name) self.assertEqual("Triggers Collection", self.triggers_col.name)
@mock.patch.object(triggers, "Triggers", autospec=True) @mock.patch.object(triggers, "Triggers", autospec=True)
@ -194,6 +192,7 @@ class TriggersCollectionTestCase(testtools.TestCase):
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/ProcessorCatastrophicError", "/redfish/v1/TelemetryService/Triggers/ProcessorCatastrophicError",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
) )
@mock.patch.object(triggers, "Triggers", autospec=True) @mock.patch.object(triggers, "Triggers", autospec=True)
@ -206,33 +205,39 @@ class TriggersCollectionTestCase(testtools.TestCase):
"/redfish/v1/TelemetryService/Triggers/" "/redfish/v1/TelemetryService/Triggers/"
"ProcessorCatastrophicError", "ProcessorCatastrophicError",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/" "/redfish/v1/TelemetryService/Triggers/"
"ProcessorInitializationError", "ProcessorInitializationError",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/" "/redfish/v1/TelemetryService/Triggers/"
"ProcessorMachineCheckError", "ProcessorMachineCheckError",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/ProcessorPOSTFailure", "/redfish/v1/TelemetryService/Triggers/ProcessorPOSTFailure",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/ProcessorTemperature", "/redfish/v1/TelemetryService/Triggers/ProcessorTemperature",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
mock.call( mock.call(
self.triggers_col._conn, self.triggers_col._conn,
"/redfish/v1/TelemetryService/Triggers/ProcessorThermalTrip", "/redfish/v1/TelemetryService/Triggers/ProcessorThermalTrip",
redfish_version=self.triggers_col.redfish_version, redfish_version=self.triggers_col.redfish_version,
registries=None,
), ),
] ]
mock_trigger.assert_has_calls(calls) mock_trigger.assert_has_calls(calls)

View File

@ -49,7 +49,6 @@ class RSDLibV2_2TestCase(testtools.TestCase):
self.rsd = v2_2.RSDLibV2_2(self.conn) self.rsd = v2_2.RSDLibV2_2(self.conn)
def test__parse_attributes(self): def test__parse_attributes(self):
self.rsd._parse_attributes()
self.assertEqual("2.2.0", self.rsd._rsd_api_version) self.assertEqual("2.2.0", self.rsd._rsd_api_version)
self.assertEqual("1.1.0", self.rsd._redfish_version) self.assertEqual("1.1.0", self.rsd._redfish_version)
self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path)

View File

@ -39,7 +39,6 @@ class ActionInfoTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.action_info_inst._parse_attributes()
self.assertEqual({}, self.action_info_inst.oem) self.assertEqual({}, self.action_info_inst.oem)
def test_parameters(self): def test_parameters(self):

View File

@ -35,7 +35,6 @@ class UpdateServiceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.update_service_inst._parse_attributes()
self.assertEqual("UpdateService", self.update_service_inst.identity) self.assertEqual("UpdateService", self.update_service_inst.identity)
self.assertEqual("Update service", self.update_service_inst.name) self.assertEqual("Update service", self.update_service_inst.name)
self.assertEqual("Disabled", self.update_service_inst.status.state) self.assertEqual("Disabled", self.update_service_inst.status.state)

View File

@ -35,7 +35,6 @@ class TestEthernetSwtich(base.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test_parse_attributes(self): def test_parse_attributes(self):
self.ethernet_switch_inst._parse_attributes()
self.assertEqual('1.0.2', self.ethernet_switch_inst.redfish_version) 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.identity)
self.assertEqual('Switch1', self.ethernet_switch_inst.name) self.assertEqual('Switch1', self.ethernet_switch_inst.name)
@ -149,7 +148,6 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_switch_col._parse_attributes()
self.assertEqual('1.0.2', self.ethernet_switch_col.redfish_version) self.assertEqual('1.0.2', self.ethernet_switch_col.redfish_version)
self.assertEqual('Ethernet Switches Collection', self.assertEqual('Ethernet Switches Collection',
self.ethernet_switch_col.name) self.ethernet_switch_col.name)
@ -164,7 +162,8 @@ class EthernetSwitchCollectionTestCase(testtools.TestCase):
mock_ethernet_switch.assert_called_once_with( mock_ethernet_switch.assert_called_once_with(
self.ethernet_switch_col._conn, self.ethernet_switch_col._conn,
'/redfish/v1/EthernetSwitches/Switch1', '/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) @mock.patch.object(ethernet_switch, 'EthernetSwitch', autospec=True)

View File

@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_inst._parse_attributes()
self.assertEqual('1.0.2', self.endpoint_inst.redfish_version) self.assertEqual('1.0.2', self.endpoint_inst.redfish_version)
self.assertEqual('Fabric Endpoint', self.assertEqual('Fabric Endpoint',
self.endpoint_inst.description) 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', with open('rsd_lib/tests/unit/json_samples/v2_3/endpoint_2.json',
'r') as f: '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('1.0.2', self.endpoint_inst.redfish_version)
self.assertEqual('Fabric Initiator Endpoint', self.assertEqual('Fabric Initiator Endpoint',
self.endpoint_inst.description) self.endpoint_inst.description)
@ -193,7 +192,6 @@ class EndpointCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_col._parse_attributes()
self.assertEqual('1.0.2', self.endpoint_col.redfish_version) self.assertEqual('1.0.2', self.endpoint_col.redfish_version)
self.assertEqual('Endpoint Collection', self.assertEqual('Endpoint Collection',
self.endpoint_col.name) self.endpoint_col.name)
@ -208,18 +206,26 @@ class EndpointCollectionTestCase(testtools.TestCase):
mock_endpoint.assert_called_once_with( mock_endpoint.assert_called_once_with(
self.endpoint_col._conn, self.endpoint_col._conn,
'/redfish/v1/Fabrics/NVMeoE/Endpoints/1', '/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) @mock.patch.object(endpoint, 'Endpoint', autospec=True)
def test_get_members(self, mock_endpoint): def test_get_members(self, mock_endpoint):
members = self.endpoint_col.get_members() members = self.endpoint_col.get_members()
calls = [ calls = [
mock.call(self.endpoint_col._conn, mock.call(
'/redfish/v1/Fabrics/NVMeoE/Endpoints/1', self.endpoint_col._conn,
redfish_version=self.endpoint_col.redfish_version), '/redfish/v1/Fabrics/NVMeoE/Endpoints/1',
mock.call(self.endpoint_col._conn, redfish_version=self.endpoint_col.redfish_version,
'/redfish/v1/Fabrics/NVMeoE/Endpoints/2', registries=None,
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,
registries=None,
)
] ]
mock_endpoint.assert_has_calls(calls) mock_endpoint.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_inst._parse_attributes()
self.assertEqual('1.0.2', self.fabric_inst.redfish_version) self.assertEqual('1.0.2', self.fabric_inst.redfish_version)
self.assertEqual('NVMeoE', self.fabric_inst.identity) self.assertEqual('NVMeoE', self.fabric_inst.identity)
self.assertEqual(None, self.fabric_inst.name) 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') self.conn, '/redfish/v1/Fabrics', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_col._parse_attributes()
self.assertEqual('1.0.2', self.fabric_col.redfish_version) self.assertEqual('1.0.2', self.fabric_col.redfish_version)
self.assertEqual('Fabric Collection', self.assertEqual('Fabric Collection',
self.fabric_col.name) self.fabric_col.name)
@ -187,13 +185,17 @@ class FabricCollectionTestCase(testtools.TestCase):
self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE') self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE')
mock_fabric.assert_called_once_with( mock_fabric.assert_called_once_with(
self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', 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) @mock.patch.object(fabric, 'Fabric', autospec=True)
def test_get_members(self, mock_fabric): def test_get_members(self, mock_fabric):
members = self.fabric_col.get_members() members = self.fabric_col.get_members()
mock_fabric.assert_called_once_with( mock_fabric.assert_called_once_with(
self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', 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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -36,7 +36,6 @@ class ZoneTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.zone_inst._parse_attributes()
self.assertEqual('1.0.2', self.zone_inst.redfish_version) self.assertEqual('1.0.2', self.zone_inst.redfish_version)
self.assertEqual('Zone 1', self.assertEqual('Zone 1',
self.zone_inst.description) self.zone_inst.description)
@ -89,7 +88,6 @@ class ZoneCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.zone_col._parse_attributes()
self.assertEqual('1.0.2', self.zone_col.redfish_version) self.assertEqual('1.0.2', self.zone_col.redfish_version)
self.assertEqual('Zone Collection', self.assertEqual('Zone Collection',
self.zone_col.name) self.zone_col.name)
@ -101,14 +99,18 @@ class ZoneCollectionTestCase(testtools.TestCase):
self.zone_col.get_member('/redfish/v1/Fabrics/NVMeoE/Zones/1') self.zone_col.get_member('/redfish/v1/Fabrics/NVMeoE/Zones/1')
mock_zone.assert_called_once_with( mock_zone.assert_called_once_with(
self.zone_col._conn, '/redfish/v1/Fabrics/NVMeoE/Zones/1', 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) @mock.patch.object(zone, 'Zone', autospec=True)
def test_get_members(self, mock_zone): def test_get_members(self, mock_zone):
members = self.zone_col.get_members() members = self.zone_col.get_members()
mock_zone.assert_called_with( mock_zone.assert_called_with(
self.zone_col._conn, '/redfish/v1/Fabrics/NVMeoE/Zones/1', 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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -95,7 +95,6 @@ class TestManagerCollection(base.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test_parse_attributes(self): def test_parse_attributes(self):
self.manager_col._parse_attributes()
self.assertEqual('1.0.2', self.manager_col.redfish_version) self.assertEqual('1.0.2', self.manager_col.redfish_version)
self.assertEqual('Manager Collection', self.manager_col.name) self.assertEqual('Manager Collection', self.manager_col.name)
self.assertEqual(('/redfish/v1/Managers/BMC1', self.assertEqual(('/redfish/v1/Managers/BMC1',
@ -110,7 +109,8 @@ class TestManagerCollection(base.TestCase):
mock_manager.assert_called_once_with( mock_manager.assert_called_once_with(
self.manager_col._conn, self.manager_col._conn,
'/redfish/v1/Managers/BMC1', '/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) @mock.patch.object(manager, 'Manager', autospec=True)

View File

@ -34,7 +34,6 @@ class AttachResourceActionInfoTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.attach_action_info._parse_attributes()
self.assertEqual('1.0.2', self.attach_action_info.redfish_version) self.assertEqual('1.0.2', self.attach_action_info.redfish_version)
self.assertEqual(None, self.attach_action_info.description) self.assertEqual(None, self.attach_action_info.description)
self.assertEqual('AttachResourceActionInfo', self.assertEqual('AttachResourceActionInfo',

View File

@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_inst._parse_attributes()
self.assertEqual(True, self.node_inst.clear_tpm_on_delete) self.assertEqual(True, self.node_inst.clear_tpm_on_delete)
def test_update_node(self): def test_update_node(self):
@ -235,7 +234,6 @@ class NodeCollectionTestCase(testtools.TestCase):
self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2') self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_col._parse_attributes()
self.assertEqual('1.0.2', self.node_col.redfish_version) self.assertEqual('1.0.2', self.node_col.redfish_version)
self.assertEqual('Composed Node Collection', self.node_col.name) self.assertEqual('Composed Node Collection', self.node_col.name)
self.assertEqual(('/redfish/v1/Nodes/1',), self.assertEqual(('/redfish/v1/Nodes/1',),
@ -246,14 +244,18 @@ class NodeCollectionTestCase(testtools.TestCase):
self.node_col.get_member('/redfish/v1/Nodes/1') self.node_col.get_member('/redfish/v1/Nodes/1')
mock_node.assert_called_once_with( mock_node.assert_called_once_with(
self.node_col._conn, '/redfish/v1/Nodes/1', 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) @mock.patch.object(node, 'Node', autospec=True)
def test_get_members(self, mock_node): def test_get_members(self, mock_node):
members = self.node_col.get_members() members = self.node_col.get_members()
mock_node.assert_called_once_with( mock_node.assert_called_once_with(
self.node_col._conn, '/redfish/v1/Nodes/1', 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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -35,7 +35,6 @@ class DriveTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.drive_inst._parse_attributes()
self.assertEqual('1.0.2', self.drive_inst.redfish_version) self.assertEqual('1.0.2', self.drive_inst.redfish_version)
self.assertEqual('2', self.drive_inst.identity) self.assertEqual('2', self.drive_inst.identity)
self.assertEqual('Physical Drive', self.drive_inst.name) self.assertEqual('Physical Drive', self.drive_inst.name)
@ -143,7 +142,6 @@ class DriveCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.drive_col._parse_attributes()
self.assertEqual('1.0.2', self.drive_col.redfish_version) self.assertEqual('1.0.2', self.drive_col.redfish_version)
self.assertEqual('Drives', self.assertEqual('Drives',
self.drive_col.name) self.drive_col.name)
@ -159,18 +157,26 @@ class DriveCollectionTestCase(testtools.TestCase):
mock_drive.assert_called_once_with( mock_drive.assert_called_once_with(
self.drive_col._conn, self.drive_col._conn,
'/redfish/v1/Chassis/1/Drives/1', '/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) @mock.patch.object(drive, 'Drive', autospec=True)
def test_get_members(self, mock_drive): def test_get_members(self, mock_drive):
members = self.drive_col.get_members() members = self.drive_col.get_members()
calls = [ calls = [
mock.call(self.drive_col._conn, mock.call(
'/redfish/v1/Chassis/1/Drives/1', self.drive_col._conn,
redfish_version=self.drive_col.redfish_version), '/redfish/v1/Chassis/1/Drives/1',
mock.call(self.drive_col._conn, redfish_version=self.drive_col.redfish_version,
'/redfish/v1/Chassis/1/Drives/2', registries=None,
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,
registries=None,
)
] ]
mock_drive.assert_has_calls(calls) mock_drive.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -34,7 +34,6 @@ class DriveMetricsTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.drive_metrics_inst._parse_attributes()
self.assertEqual('Drive Metrics for Drive', self.assertEqual('Drive Metrics for Drive',
self.drive_metrics_inst.name) self.drive_metrics_inst.name)
self.assertEqual('Metrics for Drive 1', self.assertEqual('Metrics for Drive 1',

View File

@ -37,7 +37,6 @@ class StoragePoolTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_pool_inst._parse_attributes()
self.assertEqual('1.0.2', self.storage_pool_inst.redfish_version) self.assertEqual('1.0.2', self.storage_pool_inst.redfish_version)
self.assertEqual('Base storage pool', self.assertEqual('Base storage pool',
self.storage_pool_inst.description) self.storage_pool_inst.description)
@ -210,7 +209,6 @@ class StoragePoolCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_pool_col._parse_attributes()
self.assertEqual('1.0.2', self.storage_pool_col.redfish_version) self.assertEqual('1.0.2', self.storage_pool_col.redfish_version)
self.assertEqual('StoragePools Collection', self.assertEqual('StoragePools Collection',
self.storage_pool_col.name) self.storage_pool_col.name)
@ -226,18 +224,26 @@ class StoragePoolCollectionTestCase(testtools.TestCase):
mock_storage_pool.assert_called_once_with( mock_storage_pool.assert_called_once_with(
self.storage_pool_col._conn, self.storage_pool_col._conn,
'/redfish/v1/StorageServices/NVMeoE1/StoragePools/1', '/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) @mock.patch.object(storage_pool, 'StoragePool', autospec=True)
def test_get_members(self, mock_storage_pool): def test_get_members(self, mock_storage_pool):
members = self.storage_pool_col.get_members() members = self.storage_pool_col.get_members()
calls = [ calls = [
mock.call(self.storage_pool_col._conn, mock.call(
'/redfish/v1/StorageServices/NVMeoE1/StoragePools/1', self.storage_pool_col._conn,
redfish_version=self.storage_pool_col.redfish_version), '/redfish/v1/StorageServices/NVMeoE1/StoragePools/1',
mock.call(self.storage_pool_col._conn, redfish_version=self.storage_pool_col.redfish_version,
'/redfish/v1/StorageServices/NVMeoE1/StoragePools/2', registries=None,
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,
registries=None,
)
] ]
mock_storage_pool.assert_has_calls(calls) mock_storage_pool.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -40,7 +40,6 @@ class StorageServiceTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_inst._parse_attributes()
self.assertEqual('1.0.2', self.storage_service_inst.redfish_version) self.assertEqual('1.0.2', self.storage_service_inst.redfish_version)
self.assertEqual('Storage Service description', self.assertEqual('Storage Service description',
self.storage_service_inst.description) self.storage_service_inst.description)
@ -291,7 +290,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2') self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_col._parse_attributes()
self.assertEqual('1.0.2', self.storage_service_col.redfish_version) self.assertEqual('1.0.2', self.storage_service_col.redfish_version)
self.assertEqual('Storage Services Collection', self.assertEqual('Storage Services Collection',
self.storage_service_col.name) self.storage_service_col.name)
@ -305,7 +303,9 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
mock_storage_service.assert_called_once_with( mock_storage_service.assert_called_once_with(
self.storage_service_col._conn, self.storage_service_col._conn,
'/redfish/v1/StorageServices/NVMeoE1', '/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) @mock.patch.object(storage_service, 'StorageService', autospec=True)
def test_get_members(self, mock_storage_service): def test_get_members(self, mock_storage_service):
@ -313,6 +313,8 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
mock_storage_service.assert_called_once_with( mock_storage_service.assert_called_once_with(
self.storage_service_col._conn, self.storage_service_col._conn,
'/redfish/v1/StorageServices/NVMeoE1', '/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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -39,7 +39,6 @@ class StorageServiceTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.volume_inst._parse_attributes()
self.assertEqual('1.0.2', self.volume_inst.redfish_version) self.assertEqual('1.0.2', self.volume_inst.redfish_version)
self.assertEqual('Volume description', self.volume_inst.description) self.assertEqual('Volume description', self.volume_inst.description)
self.assertEqual('1', self.volume_inst.identity) self.assertEqual('1', self.volume_inst.identity)
@ -91,7 +90,7 @@ class StorageServiceTestCase(testtools.TestCase):
self.volume_inst.json.pop('Actions') self.volume_inst.json.pop('Actions')
self.assertRaisesRegex( self.assertRaisesRegex(
exceptions.MissingAttributeError, 'attribute Actions', exceptions.MissingAttributeError, 'attribute Actions',
self.volume_inst._parse_attributes) self.volume_inst.refresh)
def test_update_volume(self): def test_update_volume(self):
self.volume_inst.update(bootable=True) self.volume_inst.update(bootable=True)
@ -228,7 +227,6 @@ class VolumeCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.volume_col._parse_attributes()
self.assertEqual('1.0.2', self.volume_col.redfish_version) self.assertEqual('1.0.2', self.volume_col.redfish_version)
self.assertEqual('Volume Collection', self.assertEqual('Volume Collection',
self.volume_col.name) self.volume_col.name)
@ -242,7 +240,9 @@ class VolumeCollectionTestCase(testtools.TestCase):
mock_volume.assert_called_once_with( mock_volume.assert_called_once_with(
self.volume_col._conn, self.volume_col._conn,
'/redfish/v1/StorageServices/NVMeoE1/Volumes/1', '/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) @mock.patch.object(volume, 'Volume', autospec=True)
def test_get_members(self, mock_volume): def test_get_members(self, mock_volume):
@ -250,7 +250,9 @@ class VolumeCollectionTestCase(testtools.TestCase):
mock_volume.assert_called_once_with( mock_volume.assert_called_once_with(
self.volume_col._conn, self.volume_col._conn,
'/redfish/v1/StorageServices/NVMeoE1/Volumes/1', '/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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -34,7 +34,6 @@ class VolumeMetricsTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.volume_metrics_inst._parse_attributes()
self.assertEqual('Volume Metrics', self.volume_metrics_inst.name) self.assertEqual('Volume Metrics', self.volume_metrics_inst.name)
self.assertEqual('Metrics', self.volume_metrics_inst.identity) self.assertEqual('Metrics', self.volume_metrics_inst.identity)
self.assertEqual('Metrics for Volume 1', self.assertEqual('Metrics for Volume 1',

View File

@ -34,7 +34,6 @@ class EthernetInterface(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test_parse_attributes(self): def test_parse_attributes(self):
self.ethernet_interface_inst._parse_attributes()
self.assertEqual("LAN1", self.ethernet_interface_inst.identity) self.assertEqual("LAN1", self.ethernet_interface_inst.identity)
self.assertEqual("Ethernet Interface", self.assertEqual("Ethernet Interface",
self.ethernet_interface_inst.name) self.ethernet_interface_inst.name)
@ -124,7 +123,6 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.ethernet_interface_col._parse_attributes()
self.assertEqual('1.0.2', self.ethernet_interface_col.redfish_version) self.assertEqual('1.0.2', self.ethernet_interface_col.redfish_version)
self.assertEqual( self.assertEqual(
('/redfish/v1/Systems/System1/EthernetInterfaces/LAN1',), ('/redfish/v1/Systems/System1/EthernetInterfaces/LAN1',),
@ -137,7 +135,8 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
mock_ethernet_interface.assert_called_once_with( mock_ethernet_interface.assert_called_once_with(
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
'/redfish/v1/Systems/System1/EthernetInterfaces/LAN1', '/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) @mock.patch.object(ethernet_interface, 'EthernetInterface', autospec=True)
@ -147,7 +146,9 @@ class EthernetInterfaceCollectionTestCase(testtools.TestCase):
mock.call( mock.call(
self.ethernet_interface_col._conn, self.ethernet_interface_col._conn,
'/redfish/v1/Systems/System1/EthernetInterfaces/LAN1', '/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) mock_ethernet_interface.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -99,7 +99,6 @@ class SystemCollectionTestCase(testtools.TestCase):
redfish_version='1.1.0') redfish_version='1.1.0')
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_col._parse_attributes()
self.assertEqual('1.1.0', self.system_col.redfish_version) self.assertEqual('1.1.0', self.system_col.redfish_version)
self.assertEqual(('/redfish/v1/Systems/System1', self.assertEqual(('/redfish/v1/Systems/System1',
'/redfish/v1/Systems/System2'), '/redfish/v1/Systems/System2'),
@ -112,18 +111,26 @@ class SystemCollectionTestCase(testtools.TestCase):
mock_system.assert_called_once_with( mock_system.assert_called_once_with(
self.system_col._conn, self.system_col._conn,
'/redfish/v1/Systems/System1', '/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) @mock.patch.object(system, 'System', autospec=True)
def test_get_members(self, mock_system): def test_get_members(self, mock_system):
members = self.system_col.get_members() members = self.system_col.get_members()
calls = [ calls = [
mock.call(self.system_col._conn, mock.call(
'/redfish/v1/Systems/System1', self.system_col._conn,
redfish_version=self.system_col.redfish_version), '/redfish/v1/Systems/System1',
mock.call(self.system_col._conn, redfish_version=self.system_col.redfish_version,
'/redfish/v1/Systems/System2', registries=None,
redfish_version=self.system_col.redfish_version) ),
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) mock_system.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -47,7 +47,6 @@ class RSDLibV2_3TestCase(testtools.TestCase):
self.rsd = v2_3.RSDLibV2_3(self.conn) self.rsd = v2_3.RSDLibV2_3(self.conn)
def test__parse_attributes(self): def test__parse_attributes(self):
self.rsd._parse_attributes()
self.assertEqual("2.3.0", self.rsd._rsd_api_version) self.assertEqual("2.3.0", self.rsd._rsd_api_version)
self.assertEqual("1.1.0", self.rsd._redfish_version) self.assertEqual("1.1.0", self.rsd._redfish_version)
self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path)

View File

@ -37,7 +37,6 @@ class EndpointTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_inst._parse_attributes()
self.assertEqual('1.0.2', self.endpoint_inst.redfish_version) self.assertEqual('1.0.2', self.endpoint_inst.redfish_version)
self.assertEqual('Fabric Endpoint', self.assertEqual('Fabric Endpoint',
self.endpoint_inst.description) self.endpoint_inst.description)
@ -116,7 +115,6 @@ class EndpointCollectionTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.endpoint_col._parse_attributes()
self.assertEqual('1.0.2', self.endpoint_col.redfish_version) self.assertEqual('1.0.2', self.endpoint_col.redfish_version)
self.assertEqual('Endpoint Collection', self.assertEqual('Endpoint Collection',
self.endpoint_col.name) self.endpoint_col.name)
@ -131,18 +129,26 @@ class EndpointCollectionTestCase(testtools.TestCase):
mock_endpoint.assert_called_once_with( mock_endpoint.assert_called_once_with(
self.endpoint_col._conn, self.endpoint_col._conn,
'/redfish/v1/Fabrics/NVMeoE/Endpoints/1', '/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) @mock.patch.object(endpoint, 'Endpoint', autospec=True)
def test_get_members(self, mock_endpoint): def test_get_members(self, mock_endpoint):
members = self.endpoint_col.get_members() members = self.endpoint_col.get_members()
calls = [ calls = [
mock.call(self.endpoint_col._conn, mock.call(
'/redfish/v1/Fabrics/NVMeoE/Endpoints/1', self.endpoint_col._conn,
redfish_version=self.endpoint_col.redfish_version), '/redfish/v1/Fabrics/NVMeoE/Endpoints/1',
mock.call(self.endpoint_col._conn, redfish_version=self.endpoint_col.redfish_version,
'/redfish/v1/Fabrics/NVMeoE/Endpoints/2', registries=None,
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,
registries=None,
)
] ]
mock_endpoint.assert_has_calls(calls) mock_endpoint.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -38,7 +38,6 @@ class FabricTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_inst._parse_attributes()
self.assertEqual('1.0.2', self.fabric_inst.redfish_version) self.assertEqual('1.0.2', self.fabric_inst.redfish_version)
self.assertEqual('NVMeoE', self.fabric_inst.identity) self.assertEqual('NVMeoE', self.fabric_inst.identity)
self.assertEqual(None, self.fabric_inst.name) 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') self.conn, '/redfish/v1/Fabrics', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.fabric_col._parse_attributes()
self.assertEqual('1.0.2', self.fabric_col.redfish_version) self.assertEqual('1.0.2', self.fabric_col.redfish_version)
self.assertEqual('Fabric Collection', self.assertEqual('Fabric Collection',
self.fabric_col.name) self.fabric_col.name)
@ -187,13 +185,17 @@ class FabricCollectionTestCase(testtools.TestCase):
self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE') self.fabric_col.get_member('/redfish/v1/Fabrics/NVMeoE')
mock_fabric.assert_called_once_with( mock_fabric.assert_called_once_with(
self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', 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) @mock.patch.object(fabric, 'Fabric', autospec=True)
def test_get_members(self, mock_fabric): def test_get_members(self, mock_fabric):
members = self.fabric_col.get_members() members = self.fabric_col.get_members()
mock_fabric.assert_called_once_with( mock_fabric.assert_called_once_with(
self.fabric_col._conn, '/redfish/v1/Fabrics/NVMeoE', 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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -37,7 +37,6 @@ class NodeTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_inst._parse_attributes()
self.assertEqual(True, self.node_inst.clear_tpm_on_delete) self.assertEqual(True, self.node_inst.clear_tpm_on_delete)
self.assertEqual( self.assertEqual(
'OverwritePCD', 'OverwritePCD',
@ -266,7 +265,6 @@ class NodeCollectionTestCase(testtools.TestCase):
self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2') self.conn, '/redfish/v1/Nodes', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.node_col._parse_attributes()
self.assertEqual('1.0.2', self.node_col.redfish_version) self.assertEqual('1.0.2', self.node_col.redfish_version)
self.assertEqual('Composed Node Collection', self.node_col.name) self.assertEqual('Composed Node Collection', self.node_col.name)
self.assertEqual(('/redfish/v1/Nodes/1',), self.assertEqual(('/redfish/v1/Nodes/1',),
@ -277,14 +275,18 @@ class NodeCollectionTestCase(testtools.TestCase):
self.node_col.get_member('/redfish/v1/Nodes/1') self.node_col.get_member('/redfish/v1/Nodes/1')
mock_node.assert_called_once_with( mock_node.assert_called_once_with(
self.node_col._conn, '/redfish/v1/Nodes/1', 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) @mock.patch.object(node, 'Node', autospec=True)
def test_get_members(self, mock_node): def test_get_members(self, mock_node):
members = self.node_col.get_members() members = self.node_col.get_members()
mock_node.assert_called_once_with( mock_node.assert_called_once_with(
self.node_col._conn, '/redfish/v1/Nodes/1', 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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -39,7 +39,6 @@ class CapacitySourceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.capacity_sources_inst._parse_attributes()
self.assertEqual("1.0.2", self.capacity_sources_inst.redfish_version) self.assertEqual("1.0.2", self.capacity_sources_inst.redfish_version)
self.assertEqual( self.assertEqual(
"Volume capacity source", self.capacity_sources_inst.description "Volume capacity source", self.capacity_sources_inst.description

View File

@ -37,7 +37,6 @@ class StorageServiceTestCase(testtools.TestCase):
redfish_version='1.0.2') redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_inst._parse_attributes()
self.assertEqual('1.0.2', self.storage_service_inst.redfish_version) self.assertEqual('1.0.2', self.storage_service_inst.redfish_version)
self.assertEqual('Storage Service description', self.assertEqual('Storage Service description',
self.storage_service_inst.description) self.storage_service_inst.description)
@ -117,7 +116,6 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2') self.conn, '/redfish/v1/StorageServices', redfish_version='1.0.2')
def test__parse_attributes(self): def test__parse_attributes(self):
self.storage_service_col._parse_attributes()
self.assertEqual('1.0.2', self.storage_service_col.redfish_version) self.assertEqual('1.0.2', self.storage_service_col.redfish_version)
self.assertEqual('Storage Services Collection', self.assertEqual('Storage Services Collection',
self.storage_service_col.name) self.storage_service_col.name)
@ -131,7 +129,9 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
mock_storage_service.assert_called_once_with( mock_storage_service.assert_called_once_with(
self.storage_service_col._conn, self.storage_service_col._conn,
'/redfish/v1/StorageServices/NVMeoE1', '/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) @mock.patch.object(storage_service, 'StorageService', autospec=True)
def test_get_members(self, mock_storage_service): def test_get_members(self, mock_storage_service):
@ -139,6 +139,7 @@ class StorageServiceCollectionTestCase(testtools.TestCase):
mock_storage_service.assert_called_once_with( mock_storage_service.assert_called_once_with(
self.storage_service_col._conn, self.storage_service_col._conn,
'/redfish/v1/StorageServices/NVMeoE1', '/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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -39,7 +39,6 @@ class StorageServiceTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.volume_inst._parse_attributes()
self.assertEqual("1.0.2", self.volume_inst.redfish_version) self.assertEqual("1.0.2", self.volume_inst.redfish_version)
self.assertEqual("Volume description", self.volume_inst.description) self.assertEqual("Volume description", self.volume_inst.description)
self.assertEqual("1", self.volume_inst.identity) self.assertEqual("1", self.volume_inst.identity)
@ -187,7 +186,6 @@ class VolumeCollectionTestCase(testtools.TestCase):
) )
def test__parse_attributes(self): def test__parse_attributes(self):
self.volume_col._parse_attributes()
self.assertEqual("1.0.2", self.volume_col.redfish_version) self.assertEqual("1.0.2", self.volume_col.redfish_version)
self.assertEqual("Volume Collection", self.volume_col.name) self.assertEqual("Volume Collection", self.volume_col.name)
self.assertEqual( self.assertEqual(
@ -204,6 +202,7 @@ class VolumeCollectionTestCase(testtools.TestCase):
self.volume_col._conn, self.volume_col._conn,
"/redfish/v1/StorageServices/NVMeoE1/Volumes/1", "/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) @mock.patch.object(volume, "Volume", autospec=True)
@ -213,6 +212,7 @@ class VolumeCollectionTestCase(testtools.TestCase):
self.volume_col._conn, self.volume_col._conn,
"/redfish/v1/StorageServices/NVMeoE1/Volumes/1", "/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.assertIsInstance(members, list)
self.assertEqual(1, len(members)) self.assertEqual(1, len(members))

View File

@ -36,7 +36,6 @@ class ProcessorTestCase(testtools.TestCase):
redfish_version='1.1.0') redfish_version='1.1.0')
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_inst._parse_attributes()
self.assertEqual('1.1.0', self.processor_inst.redfish_version) self.assertEqual('1.1.0', self.processor_inst.redfish_version)
self.assertEqual('CPU1', self.processor_inst.identity) self.assertEqual('CPU1', self.processor_inst.identity)
self.assertEqual('Processor', self.processor_inst.name) self.assertEqual('Processor', self.processor_inst.name)
@ -301,7 +300,6 @@ class ProcessorCollectionTestCase(testtools.TestCase):
redfish_version='1.1.0') redfish_version='1.1.0')
def test__parse_attributes(self): def test__parse_attributes(self):
self.processor_col._parse_attributes()
self.assertEqual('1.1.0', self.processor_col.redfish_version) self.assertEqual('1.1.0', self.processor_col.redfish_version)
self.assertEqual(('/redfish/v1/Systems/System1/Processors/CPU1', self.assertEqual(('/redfish/v1/Systems/System1/Processors/CPU1',
'/redfish/v1/Systems/System1/Processors/FPGA1'), '/redfish/v1/Systems/System1/Processors/FPGA1'),
@ -314,7 +312,9 @@ class ProcessorCollectionTestCase(testtools.TestCase):
mock_system.assert_called_once_with( mock_system.assert_called_once_with(
self.processor_col._conn, self.processor_col._conn,
'/redfish/v1/Systems/System1/Processors/CPU1', '/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) @mock.patch.object(processor, 'Processor', autospec=True)
def test_get_members(self, mock_system): def test_get_members(self, mock_system):
@ -322,10 +322,12 @@ class ProcessorCollectionTestCase(testtools.TestCase):
calls = [ calls = [
mock.call(self.processor_col._conn, mock.call(self.processor_col._conn,
'/redfish/v1/Systems/System1/Processors/CPU1', '/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, mock.call(self.processor_col._conn,
'/redfish/v1/Systems/System1/Processors/FPGA1', '/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) mock_system.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -94,7 +94,6 @@ class SystemCollectionTestCase(testtools.TestCase):
redfish_version='1.1.0') redfish_version='1.1.0')
def test__parse_attributes(self): def test__parse_attributes(self):
self.system_col._parse_attributes()
self.assertEqual('1.1.0', self.system_col.redfish_version) self.assertEqual('1.1.0', self.system_col.redfish_version)
self.assertEqual(('/redfish/v1/Systems/System1', self.assertEqual(('/redfish/v1/Systems/System1',
'/redfish/v1/Systems/System2'), '/redfish/v1/Systems/System2'),
@ -107,18 +106,26 @@ class SystemCollectionTestCase(testtools.TestCase):
mock_system.assert_called_once_with( mock_system.assert_called_once_with(
self.system_col._conn, self.system_col._conn,
'/redfish/v1/Systems/System1', '/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) @mock.patch.object(system, 'System', autospec=True)
def test_get_members(self, mock_system): def test_get_members(self, mock_system):
members = self.system_col.get_members() members = self.system_col.get_members()
calls = [ calls = [
mock.call(self.system_col._conn, mock.call(
'/redfish/v1/Systems/System1', self.system_col._conn,
redfish_version=self.system_col.redfish_version), '/redfish/v1/Systems/System1',
mock.call(self.system_col._conn, redfish_version=self.system_col.redfish_version,
'/redfish/v1/Systems/System2', registries=None,
redfish_version=self.system_col.redfish_version) ),
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) mock_system.assert_has_calls(calls)
self.assertIsInstance(members, list) self.assertIsInstance(members, list)

View File

@ -46,7 +46,6 @@ class RSDLibV2_3TestCase(testtools.TestCase):
self.rsd = v2_4.RSDLibV2_4(self.conn) self.rsd = v2_4.RSDLibV2_4(self.conn)
def test__parse_attributes(self): def test__parse_attributes(self):
self.rsd._parse_attributes()
self.assertEqual("2.4.0", self.rsd._rsd_api_version) self.assertEqual("2.4.0", self.rsd._rsd_api_version)
self.assertEqual("1.5.0", self.rsd._redfish_version) self.assertEqual("1.5.0", self.rsd._redfish_version)
self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path) self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path)

View File

@ -39,7 +39,6 @@ class RSDLibTestCase(testtools.TestCase):
password='bar', verify=True) password='bar', verify=True)
def test__parse_attributes(self): def test__parse_attributes(self):
self.rsd._parse_attributes()
self.assertEqual("2.1.0", self.rsd._rsd_api_version) self.assertEqual("2.1.0", self.rsd._rsd_api_version)
self.assertEqual("1.0.2", self.rsd._redfish_version) self.assertEqual("1.0.2", self.rsd._redfish_version)