index++;
if(model.hasChild(next)) {
model = model.getChild(next);
} else {
final PathAddress subAddress = pathAddr.subAddress(0, index);
final ImmutableManagementResourceRegistration registration = context.getResourceRegistration().getSubModel(subAddress);
if(registration != null) {
// If the target is a registered proxy return immediately
boolean remote = registration.isRemote();
if(remote && ! iterator.hasNext()) {
break out;
}
// Create the proxy op
final PathAddress newAddress = pathAddr.subAddress(index);
final ModelNode newOperation = operation.clone();
newOperation.get(OP_ADDR).set(subAddress.toModelNode());
newOperation.get(VALUE).set(newAddress.toModelNode());
// On the DC the host=master is not a proxy but the validate-address is registered at the root
// Otherwise delegate to the proxy handler
final OperationStepHandler proxyHandler = registration.getOperationHandler(PathAddress.EMPTY_ADDRESS, OPERATION_NAME);
if(proxyHandler != null) {
context.addStep(newOperation, proxyHandler, OperationContext.Stage.IMMEDIATE);
context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
return;
}