def setUp(self): super(SimpleStorageCollectionTestCase, self).setUp() self.conn = mock.Mock() with open('sushy/tests/unit/json_samples/' 'simple_storage_collection.json') as f: self.conn.get.return_value.json.return_value = json.load(f) self.simpl_stor_col = simple_storage.SimpleStorageCollection( self.conn, '/redfish/v1/Systems/437XR1138R2/SimpleStorage', redfish_version='1.0.2')
def simple_storage(self): """A collection of simple storage associated with system. This returns a reference to `SimpleStorageCollection` instance. SimpleStorage represents the properties of a storage controller and its directly-attached devices. It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale. :raises: MissingAttributeError if 'SimpleStorage/@odata.id' field is missing. :returns: `SimpleStorageCollection` instance """ return sys_simple_storage.SimpleStorageCollection( self._conn, utils.get_sub_resource_path_by(self, "SimpleStorage"), redfish_version=self.redfish_version)