summaryrefslogtreecommitdiff
path: root/src/buildstream/sandbox
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-03 18:01:30 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:03 +0000
commit8c9f41922ad16f8a031ac612bb35e493e8581380 (patch)
treecebc4afe2d0238033362905a99400d4d2824d7dc /src/buildstream/sandbox
parentd8466183f77c75bbd7ad27c7cbf5e58189945be1 (diff)
downloadbuildstream-8c9f41922ad16f8a031ac612bb35e493e8581380.tar.gz
_yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'
- adapt all call sites to use the new API
Diffstat (limited to 'src/buildstream/sandbox')
-rw-r--r--src/buildstream/sandbox/_sandboxremote.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py
index d0e641e56..ca3c5c3d9 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -127,7 +127,7 @@ class SandboxRemote(Sandbox):
service_keys = ['execution-service', 'storage-service', 'action-cache-service']
- _yaml.node_validate(remote_config, ['url', *service_keys])
+ remote_config.validate_keys(['url', *service_keys])
exec_config = require_node(remote_config, 'execution-service')
storage_config = require_node(remote_config, 'storage-service')
@@ -135,10 +135,10 @@ class SandboxRemote(Sandbox):
tls_keys = ['client-key', 'client-cert', 'server-cert']
- _yaml.node_validate(exec_config, ['url', 'instance-name', *tls_keys])
- _yaml.node_validate(storage_config, ['url', 'instance-name', *tls_keys])
+ exec_config.validate_keys(['url', 'instance-name', *tls_keys])
+ storage_config.validate_keys(['url', 'instance-name', *tls_keys])
if action_config:
- _yaml.node_validate(action_config, ['url', 'instance-name', *tls_keys])
+ action_config.validate_keys(['url', 'instance-name', *tls_keys])
# Maintain some backwards compatibility with older configs, in which
# 'url' was the only valid key for remote-execution: