← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1815476] Re: Flavor attribute 'swap' returns unicode'' instead of int 0

 

Handled as part of https://blueprints.launchpad.net/nova/+spec/api-
consistency-cleanup

** Changed in: nova
       Status: In Progress => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1815476

Title:
  Flavor attribute 'swap' returns unicode'' instead of int 0

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Description
  ===========
  When a flavor is created in Horizon with 'Swap Disk (MB)' -> 0.
  Nova python API returns unicode'' on flavor.swap attribute.

  When swap disk is changed to 10.
  API returns -> int 10 instead of unicode.

  Steps to reproduce
  ==================
  - In horizon create a new flavor with swap disk 0
  - connect to the nova python API.

  fl = nova.flavors.find(name="your flavor")
  print fl.swap
  print(type(fl.swap))

  output:

  <type 'unicode'>

  
  Expected result
  ===============
  int 0

  Actual result
  =============
  unicode ''

  
  Environment
  ===========

  
  ubuntu@juju-5dc387-0-lxd-6:~$ nova-manage --version
  15.1.5

  ubuntu@juju-5dc387-0-lxd-6:~$ dpkg -l | grep nova
  ii  nova-api-os-compute              2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - OpenStack Compute API frontend
  ii  nova-common                      2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - common files
  ii  nova-conductor                   2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - conductor service
  ii  nova-consoleauth                 2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - Console Authenticator
  ii  nova-novncproxy                  2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - NoVNC proxy
  ii  nova-placement-api               2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - placement API frontend
  ii  nova-scheduler                   2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute - virtual machine scheduler
  ii  python-nova                      2:15.1.5-0ubuntu1~cloud0                   all          OpenStack Compute Python libraries

  
  xx@xx-dev:~/Documents$ openstack --version
  openstack 3.14.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1815476/+subscriptions


References