Get throws exception when system memory is null

Bug #1720443 reported by Nate Potter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sushy
Fix Released
High
Nate Potter

Bug Description

It is possible for the value of MemorySummary/TotalSystemMemoryGiB to have a null value [1], but currently if the value is of NoneType, it can't be converted to int by its adapter, so an exception is thrown when it shouldn't be. Sushy should handle both cases.

[1] http://redfish.dmtf.org/schemas/ComputerSystem.v1_4_0.json

Nate Potter (ntpttr)
description: updated
Revision history for this message
Nate Potter (ntpttr) wrote :
Changed in sushy:
status: New → In Progress
assignee: nobody → Nate Potter (ntpttr)
Dmitry Tantsur (divius)
Changed in sushy:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sushy (master)

Reviewed: https://review.openstack.org/508615
Committed: https://git.openstack.org/cgit/openstack/sushy/commit/?id=2aa31ddf4f90517695831379eee919bbf72d4ff7
Submitter: Jenkins
Branch: master

commit 2aa31ddf4f90517695831379eee919bbf72d4ff7
Author: Nate Potter <email address hidden>
Date: Fri Sep 29 14:31:01 2017 -0700

    Add int_or_none adapter function

    Add a function that allows a value to either be translated
    to an int or left as None if the json value is null to account
    for null values without throwing an error.

    Change-Id: I03c76d01740cfb36648f09112611111a3b316467
    Closes-bug: #1720443

Changed in sushy:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.