Display flavor-ephemeral in trove flavor-list command

This commit adds ephemeral column to flavor-list

Change-Id: I537bc2f3578e1e99b22f701f70ab8d96fec8908e
Closes-Bug:1617980
This commit is contained in:
jiansong 2016-08-23 20:53:47 -07:00 committed by amrith
parent 2808e1af46
commit 469bf6a647
7 changed files with 23 additions and 4 deletions

View File

@ -1,5 +1,5 @@
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 238
Content-Length: 254
Date: Mon, 18 Mar 2013 19:09:17 GMT

View File

@ -1,5 +1,6 @@
{
"flavor": {
"ephemeral": 0,
"id": 1,
"links": [
{

View File

@ -1,5 +1,5 @@
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3050
Content-Length: 3258
Date: Mon, 18 Mar 2013 19:09:17 GMT

View File

@ -1,6 +1,7 @@
{
"flavors": [
{
"ephemeral": 0,
"id": 1,
"links": [
{
@ -19,6 +20,7 @@
"disk":0
},
{
"ephemeral": 0,
"id": 2,
"links": [
{
@ -37,6 +39,7 @@
"disk":20
},
{
"ephemeral": 0,
"id": 3,
"links": [
{
@ -55,6 +58,7 @@
"disk":40
},
{
"ephemeral": 0,
"id": 4,
"links": [
{
@ -73,6 +77,7 @@
"disk":80
},
{
"ephemeral": 0,
"id": 5,
"links": [
{
@ -91,6 +96,7 @@
"disk":160
},
{
"ephemeral": 0,
"id": 6,
"links": [
{
@ -109,6 +115,7 @@
"disk":0
},
{
"ephemeral": 0,
"id": 7,
"links": [
{
@ -127,6 +134,7 @@
"disk":0
},
{
"ephemeral": 0,
"id": 8,
"links": [
{
@ -145,6 +153,7 @@
"disk":2
},
{
"ephemeral": 0,
"id": 9,
"links": [
{
@ -163,6 +172,7 @@
"disk":10
},
{
"ephemeral": 0,
"id": 10,
"links": [
{
@ -181,6 +191,7 @@
"disk":2
},
{
"ephemeral": 1,
"id": 11,
"links": [
{
@ -199,6 +210,7 @@
"disk":0
},
{
"ephemeral": 2,
"id": 12,
"links": [
{
@ -217,6 +229,7 @@
"disk":20
},
{
"ephemeral": 1,
"id": null,
"links": [
{

View File

@ -0,0 +1,4 @@
---
other:
- Add ephemeral column in flavor-list (Bug 1617980)

View File

@ -44,6 +44,7 @@ class FlavorView(object):
'ram': self.flavor.ram,
'vcpus': self.flavor.vcpus,
'disk': self.flavor.disk,
'ephemeral': self.flavor.ephemeral,
'str_id': str(self.flavor.id),
}

View File

@ -145,7 +145,7 @@ class Flavors(object):
@test
def test_flavor_list_attrs(self):
allowed_attrs = ['id', 'name', 'ram', 'vcpus', 'disk', 'links',
'local_storage', 'str_id']
'ephemeral', 'local_storage', 'str_id']
flavors = self.rd_client.flavors.list()
attrcheck = AttrCheck()
for flavor in flavors:
@ -158,7 +158,7 @@ class Flavors(object):
@test
def test_flavor_get_attrs(self):
allowed_attrs = ['id', 'name', 'ram', 'vcpus', 'disk', 'links',
'local_storage', 'str_id']
'ephemeral', 'local_storage', 'str_id']
flavor = self.rd_client.flavors.get(1)
attrcheck = AttrCheck()
flavor_dict = flavor._info