Esempio n. 1
0
 def setUp(self):
     super(ProcessorCollectionTestCase, self).setUp()
     self.conn = mock.Mock()
     with open('sushy/tests/unit/json_samples/'
               'processor_collection.json') as f:
         self.conn.get.return_value.json.return_value = json.load(f)
     self.sys_processor_col = processor.ProcessorCollection(
         self.conn, '/redfish/v1/Systems/437XR1138R2/Processors',
         redfish_version='1.0.2')
Esempio n. 2
0
    def processors(self):
        """Property to reference `ProcessorCollection` instance

        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.
        """
        return processor.ProcessorCollection(
            self._conn, self._get_processor_collection_path(),
            redfish_version=self.redfish_version)
Esempio n. 3
0
    def processors(self):
        """Property to provide reference to `ProcessorCollection` instance

        It is calculated once when the first time it is queried. On refresh,
        this property gets reset.
        """
        if self._processors is None:
            self._processors = processor.ProcessorCollection(
                self._conn,
                self._get_processor_collection_path(),
                redfish_version=self.redfish_version)

        return self._processors