Пример #1
0
 def setUp(self):
     super(StorageCollectionTestCase, self).setUp()
     self.conn = mock.Mock()
     with open('sushy/tests/unit/json_samples/'
               'storage_collection.json') as f:
         self.conn.get.return_value.json.return_value = json.load(f)
     self.stor_col = storage.StorageCollection(
         self.conn, '/redfish/v1/Systems/437XR1138R2/Storage',
         redfish_version='1.0.2')
Пример #2
0
    def storage(self):
        """A collection of storage subsystems associated with system.

        This returns a reference to `StorageCollection` instance.
        A storage subsystem represents a set of storage controllers (physical
        or virtual) and the resources such as drives and volumes that can be
        accessed from that subsystem.

        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 'Storage/@odata.id' field
            is missing.
        :returns: `StorageCollection` instance
        """
        return sys_storage.StorageCollection(
            self._conn, utils.get_sub_resource_path_by(self, "Storage"),
            redfish_version=self.redfish_version)