public OperationFuture<Group> defineGroupHierarchy(DataCenter dataCenter, GroupHierarchyConfig config) {
        checkNotNull(dataCenter, "DataCenter must be not null");
        checkNotNull(config, "GroupHierarchyConfig must be not null");

        String parentGroupId = dataCenterService.findByRef(dataCenter).getGroup().getId();

        GroupMetadata rootGroup = findGroup(config, parentGroupId);

        if (rootGroup == null) {
            rootGroup = findByRef(create(converter.createGroupConfig(config, parentGroupId)).getResult());
        }

        createSubgroups(config, rootGroup.getId());

        return createServers(config, rootGroup.getId());
    }
public OperationFuture < Group > defineGroupHierarchy ( DataCenter dataCenter , GroupHierarchyConfig config ) { checkNotNull ( dataCenter , "DataCenter must be not null" ) ; checkNotNull ( config , "GroupHierarchyConfig must be not null" ) ; String parentGroupId = dataCenterService . findByRef ( dataCenter ) . getGroup ( ) . getId ( ) ; GroupMetadata rootGroup = findGroup ( config , parentGroupId ) ; if ( rootGroup == null ) { rootGroup = findByRef ( create ( converter . createGroupConfig ( config , parentGroupId ) ) . getResult ( ) ) ; } createSubgroups ( config , rootGroup . getId ( ) ) ; return createServers ( config , rootGroup . getId ( ) ) ; }
Create group hierarchy based on {@link GroupHierarchyConfig} instance
Existing groups are not override!

@param dataCenter datacenter in which will be created group hierarchy
@param config group hierarchy config
@return OperationFuture wrapper for parent Group