Added a warning message for the invalid role-specific parameters
When a parameter is not supported as role-specific input in the service implementation, then a warning will be shown during the deployment. Depends-On: Ie0abc345cea4a69b19b2ea760a29a2cab61c1ceb Change-Id: Id2799babe496e742e1e47dfc2b2d1cf1dee61071
This commit is contained in:
parent
fedd1b26f8
commit
8f37a1e4ab
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Added a warning message if user has provided an invalid role-specific
|
||||
parameter in the environment file.
|
|
@ -110,22 +110,31 @@ def check_deprecated_parameters(clients, container):
|
|||
|
||||
deprecated_params = []
|
||||
unused_params = []
|
||||
invalid_role_specific_params = []
|
||||
for message in messages:
|
||||
if message['status'] == 'SUCCESS':
|
||||
for param in message.get('deprecated', []):
|
||||
if param.get('user_defined'):
|
||||
deprecated_params.append(param['parameter'])
|
||||
unused_params = message.get('unused', [])
|
||||
invalid_role_specific_params = message.get(
|
||||
'invalid_role_specific', [])
|
||||
|
||||
if deprecated_params:
|
||||
print('WARNING: Following parameters are deprecated and still '
|
||||
print('WARNING: Following parameter(s) are deprecated and still '
|
||||
'defined. Deprecated parameters will be removed soon!')
|
||||
print('\n'.join([' {}'.format(param)
|
||||
for param in deprecated_params]))
|
||||
|
||||
if unused_params:
|
||||
print('WARNING: Following parameters are defined but not used in '
|
||||
'plan. Could be possible that parameter is valid but '
|
||||
print('WARNING: Following parameter(s) are defined but not used '
|
||||
'in plan. Could be possible that parameter is valid but '
|
||||
'currently not used.')
|
||||
print('\n'.join([' {}'.format(param)
|
||||
for param in unused_params]))
|
||||
|
||||
if invalid_role_specific_params:
|
||||
print('WARNING: Following parameter(s) are not supported as '
|
||||
'role-specific inputs.')
|
||||
print('\n'.join([' {}'.format(param)
|
||||
for param in invalid_role_specific_params]))
|
||||
|
|
Loading…
Reference in New Issue