def setUp(self):
        super(UpdateServiceTestCase, self).setUp()
        self.conn = mock.Mock()
        with open('sushy/tests/unit/json_samples/updateservice.json') as f:
            self.conn.get.return_value.json.return_value = json.load(f)

        self.upd_serv = updateservice.UpdateService(
            self.conn,
            '/redfish/v1/UpdateService/UpdateService',
            redfish_version='1.3.0')
Exemple #2
0
    def get_update_service(self):
        """Get the UpdateService object

        :returns: The UpdateService object
        """
        if not self._update_service_path:
            raise exceptions.MissingAttributeError(
                attribute='UpdateService/@odata.id', resource=self._path)

        return updateservice.UpdateService(
            self._conn, self._update_service_path,
            redfish_version=self.redfish_version)