diff --git a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/providers/openstack/OpenstackBakeryDefaultsValidator.java b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/providers/openstack/OpenstackBakeryDefaultsValidator.java index 2d1af9b336..a46227319b 100644 --- a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/providers/openstack/OpenstackBakeryDefaultsValidator.java +++ b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/providers/openstack/OpenstackBakeryDefaultsValidator.java @@ -43,6 +43,7 @@ public void validate(ConfigProblemSetBuilder p, OpenstackBakeryDefaults n) { DaemonTaskHandler.message("Validating " + n.getNodeName() + " with " + OpenstackBakeryDefaultsValidator.class.getSimpleName()); String authUrl = n.getAuthUrl(); + String domainName = n.getDomainName(); String networkId = n.getNetworkId(); String floatingIpPool = n.getFloatingIpPool(); String securityGroups = n.getSecurityGroups(); @@ -53,6 +54,7 @@ public void validate(ConfigProblemSetBuilder p, OpenstackBakeryDefaults n) { List baseImages = n.getBaseImages(); if (StringUtils.isEmpty(authUrl) && + StringUtils.isEmpty(domainName) && StringUtils.isEmpty(networkId) && StringUtils.isEmpty(floatingIpPool) && StringUtils.isEmpty(securityGroups) && @@ -68,6 +70,10 @@ public void validate(ConfigProblemSetBuilder p, OpenstackBakeryDefaults n) { p.addProblem(Problem.Severity.ERROR, "No auth url supplied for openstack bakery defaults."); } + if (StringUtils.isEmpty(domainName)) { + p.addProblem(Problem.Severity.ERROR, "No domain name supplied for openstack bakery defaults"); + } + if (StringUtils.isEmpty(networkId)) { p.addProblem(Problem.Severity.ERROR, "No network id supplied for openstack bakery defaults."); }