Exemple #1
0
 def setUp(self):
     super(MessageRegistryFileCollectionTestCase, self).setUp()
     self.conn = mock.Mock()
     with open('sushy/tests/unit/json_samples/'
               'message_registry_file_collection.json') as f:
         self.conn.get.return_value.json.return_value = json.load(f)
     self.reg_file_col =\
         message_registry_file.MessageRegistryFileCollection(
             self.conn, '/redfish/v1/Registries',
             redfish_version='1.0.2')
Exemple #2
0
    def _get_registry_collection(self):
        """Get MessageRegistryFileCollection object

        This resource is optional and can be empty.

        :returns: MessageRegistryFileCollection object
            or None if Registries not provided
        """

        if self._registries_path:
            return message_registry_file.MessageRegistryFileCollection(
                self._conn,
                self._registries_path,
                redfish_version=self.redfish_version)