Sfoglia il codice sorgente

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
(cherry picked from commit 8f37a1e4ab)
changes/32/697632/2
Saravanan KR 2 anni fa
parent
commit
ace8494a49
2 ha cambiato i file con 15 aggiunte e 1 eliminazioni
  1. +5
    -0
      releasenotes/notes/role-specific-warning-63ce21643d51236c.yaml
  2. +10
    -1
      tripleoclient/workflows/parameters.py

+ 5
- 0
releasenotes/notes/role-specific-warning-63ce21643d51236c.yaml Vedi File

@@ -0,0 +1,5 @@
---
features:
- |
Added a warning message if user has provided an invalid role-specific
parameter in the environment file.

+ 10
- 1
tripleoclient/workflows/parameters.py Vedi File

@@ -112,15 +112,18 @@ 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]))
@@ -137,3 +140,9 @@ def check_deprecated_parameters(clients, container):
'may be valid but not in use due to the service or '
'deployment configuration.'
' {unused_join}'.format(unused_join=unused_join))

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…
Annulla
Salva