Merge "Fix fleet in board creation."
This commit is contained in:
commit
4ed0623dcf
@ -29,7 +29,7 @@ class Board(base.Resource):
|
|||||||
class BoardManager(base.CreateManager):
|
class BoardManager(base.CreateManager):
|
||||||
resource_class = Board
|
resource_class = Board
|
||||||
_creation_attributes = ['name', 'code', 'type', 'location', 'mobile',
|
_creation_attributes = ['name', 'code', 'type', 'location', 'mobile',
|
||||||
'extra']
|
'fleet', 'extra']
|
||||||
_resource_name = 'boards'
|
_resource_name = 'boards'
|
||||||
|
|
||||||
def list(self, status=None, marker=None, limit=None,
|
def list(self, status=None, marker=None, limit=None,
|
||||||
|
@ -154,6 +154,10 @@ def do_board_list(cc, args):
|
|||||||
'altitude',
|
'altitude',
|
||||||
metavar='<altitude>',
|
metavar='<altitude>',
|
||||||
help="Altitude of the board ")
|
help="Altitude of the board ")
|
||||||
|
@cliutils.arg(
|
||||||
|
'--fleet',
|
||||||
|
metavar='<fleet>',
|
||||||
|
help="Fleet of the board.")
|
||||||
@cliutils.arg(
|
@cliutils.arg(
|
||||||
'--mobile',
|
'--mobile',
|
||||||
dest='mobile',
|
dest='mobile',
|
||||||
@ -168,7 +172,7 @@ def do_board_list(cc, args):
|
|||||||
"Can be specified multiple times.")
|
"Can be specified multiple times.")
|
||||||
def do_board_create(cc, args):
|
def do_board_create(cc, args):
|
||||||
"""Register a new board with the Iotronic service."""
|
"""Register a new board with the Iotronic service."""
|
||||||
field_list = ['name', 'code', 'type', 'mobile', 'extra']
|
field_list = ['name', 'code', 'type', 'mobile', 'fleet', 'extra']
|
||||||
|
|
||||||
fields = dict((k, v) for (k, v) in vars(args).items()
|
fields = dict((k, v) for (k, v) in vars(args).items()
|
||||||
if k in field_list and not (v is None))
|
if k in field_list and not (v is None))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user