From 3ad0dc17e7e5cd2de62f736db100a3fe6a38d928 Mon Sep 17 00:00:00 2001 From: Yuxing Jiang Date: Fri, 2 Apr 2021 14:05:57 -0400 Subject: [PATCH] Accept additional attributes in addrpool-add CLI This commit adds additional attributes to enhance the current addrpool-add CLI. With this change, the addrpool-add CLI can create the addrpool with additional values including: 'floating_address', 'controller0_address', 'controller1_address' and 'gateway_address'. Test: Fresh install on an AIOSX, add addrpool with or without these attributes successfully by system addrpool command. Story: 2008774 Task: 42206 Signed-off-by: Yuxing Jiang Change-Id: I80955180e90accdcb6ce0c65dded2986f4a9c8ec --- .../cgtsclient/v1/address_pool_shell.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sysinv/cgts-client/cgts-client/cgtsclient/v1/address_pool_shell.py b/sysinv/cgts-client/cgts-client/cgtsclient/v1/address_pool_shell.py index be486ed6b2..ad6cb372cc 100644 --- a/sysinv/cgts-client/cgts-client/cgtsclient/v1/address_pool_shell.py +++ b/sysinv/cgts-client/cgts-client/cgtsclient/v1/address_pool_shell.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2015 Wind River Systems, Inc. +# Copyright (c) 2015-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -88,10 +88,23 @@ def _get_range_tuples(data): @utils.arg('--order', metavar='', help="The allocation order within the start/end range") +@utils.arg('--floating-address', + metavar='', + help="The floating address") +@utils.arg('--controller0-address', + metavar='', + help="The address of controller-0") +@utils.arg('--controller1-address', + metavar='', + help="The address of controller-1") +@utils.arg('--gateway-address', + metavar='', + help="The gateway address") def do_addrpool_add(cc, args): """Add an IP address pool.""" - field_list = ['name', 'network', 'prefix', 'order', 'ranges'] + field_list = ['name', 'network', 'prefix', 'order', 'ranges', 'floating_address', + 'controller0_address', 'controller1_address', 'gateway_address'] # Prune input fields down to required/expected values data = dict((k, v) for (k, v) in vars(args).items()