Add attribute 'disabled' for service-list

The magnum service has 'disabled' attribute,
but it isn't provided for command 'service-list'.

Change-Id: I2ed3a60fd0c1607fd4a9e03afe1e714d23f5d4f9
(cherry picked from commit 644bf34fae)
This commit is contained in:
coldmoment 2017-07-17 19:05:41 +08:00 committed by Madhuri Kumari
parent fed947d400
commit d46fce8fd5
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ from wsme import types as wtypes
from magnum.api.controllers import base from magnum.api.controllers import base
from magnum.api.controllers.v1 import collection from magnum.api.controllers.v1 import collection
from magnum.api.controllers.v1 import types
from magnum.api import expose from magnum.api import expose
from magnum.api import servicegroup as svcgrp_api from magnum.api import servicegroup as svcgrp_api
from magnum.common import policy from magnum.common import policy
@ -40,7 +41,7 @@ class MagnumService(base.APIBase):
report_count = wsme.wsattr(wtypes.IntegerType(minimum=0)) report_count = wsme.wsattr(wtypes.IntegerType(minimum=0))
"""The number of times the heartbeat was reported """ """The number of times the heartbeat was reported """
# disabled = wsme.wsattr(wtypes.BoolType(default=False)) disabled = wsme.wsattr(types.boolean, default=False)
"""If the service is 'disabled' administratively """ """If the service is 'disabled' administratively """
disabled_reason = wtypes.StringType(min_length=0, max_length=255) disabled_reason = wtypes.StringType(min_length=0, max_length=255)