From 885b37c80ecdae308289cc2e5c2a29dc66710487 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Thu, 11 Aug 2016 23:07:46 +0200 Subject: Pass ServiceNetMap to services This will be needed to pick the network where the service has to bind to from within the service template. Change-Id: I52652e1ad8c7b360efd2c7af199e35932aaaea8c --- tools/yaml-validate.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/yaml-validate.py') diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index c93c84bc..2a6c4b3b 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -39,6 +39,13 @@ def validate_service(filename, tpl): print('ERROR: service_name should match file name for service: %s.' % filename) return 1 + if 'parameters' in tpl: + required_params = ['EndpointMap', 'ServiceNetMap'] + for param in required_params: + if param not in tpl['parameters']: + print('ERROR: parameter %s is required for %s.' + % (param, filename)) + return 1 return 0 -- cgit 1.2.3-korg