Merge "Fix fleet in board creation."

changes/06/607906/1
Zuul 4 years ago committed by Gerrit Code Review
commit 4ed0623dcf
  1. 2
      iotronicclient/v1/board.py
  2. 6
      iotronicclient/v1/board_shell.py

@ -29,7 +29,7 @@ class Board(base.Resource):
class BoardManager(base.CreateManager):
resource_class = Board
_creation_attributes = ['name', 'code', 'type', 'location', 'mobile',
'extra']
'fleet', 'extra']
_resource_name = 'boards'
def list(self, status=None, marker=None, limit=None,

@ -154,6 +154,10 @@ def do_board_list(cc, args):
'altitude',
metavar='<altitude>',
help="Altitude of the board ")
@cliutils.arg(
'--fleet',
metavar='<fleet>',
help="Fleet of the board.")
@cliutils.arg(
'--mobile',
dest='mobile',
@ -168,7 +172,7 @@ def do_board_list(cc, args):
"Can be specified multiple times.")
def do_board_create(cc, args):
"""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()
if k in field_list and not (v is None))

Loading…
Cancel
Save