code: private static DirectoryGrouping resolveDirectoryGrouping(final ModelNode model, final ExpressionResolver expressionResolver) {
          try {
              return DirectoryGrouping.forName(HostResourceDefinition.DIRECTORY_GROUPING.resolveModelAttribute(expressionResolver, model).asString());
          } catch (OperationFailedException e) {
              throw new IllegalStateException(e);
          }
      }
docs: Returns the value of found in the model.
  
  @param model the model that contains the key and value.
  @param expressionResolver the expression resolver to use to resolve expressions
  
  @return the directory grouping found in the model.
  
  @throws IllegalArgumentException if the {@link org.jboss.as.controller.descriptions.ModelDescriptionConstants#DIRECTORY_GROUPING directory grouping}
  was not found in the model.