How to use the redfish.rest.v1.RestRequest function in redfish

To help you get started, we’ve selected a few redfish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HewlettPackard / python-ilorest-library-old / src / redfish / ris / rmc_helper.py View on Github external
login_data.get('session_location'))

                    if u'selector' in client:
                        rmc_client.selector = client['selector']

                    if u'filter_attr' in client:
                        rmc_client.filter_attr = client['filter_attr']

                    if u'filter_value' in client:
                        rmc_client.filter_value = client['filter_value']

                    getdata = client['get']
                    rmc_client._get_cache = dict()

                    for key in getdata.keys():
                        restreq = redfish.rest.v1.RestRequest(\
                                                        method='GET', path=key)

                        getdata[key]['restreq'] = restreq
                        rmc_client._get_cache[key] = (\
                                  redfish.rest.v1.StaticRestResponse(\
                                                                **getdata[key]))

                    rmc_client._monolith = RisMonolith(rmc_client)
                    rmc_client._monolith.load_from_dict(client['monolith'])
                    self._rmc._rmc_clients.append(rmc_client)
            except BaseException, excp:
                self._rmc.warn(u'Unable to read cache data %s' % excp)