diff --git a/apps_schema/features/node.py b/apps_schema/features/node.py index d556442..b3c1ad5 100644 --- a/apps_schema/features/node.py +++ b/apps_schema/features/node.py @@ -1,15 +1,9 @@ -from apps_schema.attrs import IntegerSchema, StringSchema +from apps_schema.attrs import StringSchema from .base import BaseFeature class DefinitionNodeIPFeature(BaseFeature): - NAME = 'definitions/node_ip' + NAME = 'definitions/node_bind_ip' VALID_SCHEMAS = [StringSchema] - - -class ValidationNodePortFeature(BaseFeature): - - NAME = 'validations/node_port' - VALID_SCHEMAS = [IntegerSchema] diff --git a/catalog_reader/questions.py b/catalog_reader/questions.py index fc76381..12a6440 100644 --- a/catalog_reader/questions.py +++ b/catalog_reader/questions.py @@ -57,8 +57,11 @@ def normalize_question(question: dict, version_data: dict, context: dict) -> Non 'enum': [{'value': t, 'description': f'{t!r} timezone'} for t in sorted(context['timezones'])], 'default': context['system.general.config']['timezone'] }) - elif ref == 'definitions/nodeIP': - data['default'] = context['node_ip'] + elif ref == 'definitions/node_bind_ip': + data.update({ + 'default': '0.0.0.0', + 'enum': [{'value': i, 'description': f'{i!r} IP Address'} for i in context['ip_choices']], + }) elif ref == 'definitions/certificate': get_cert_ca_options(schema, data, {'value': None, 'description': 'No Certificate'}) data['enum'] += [