if (options.getManualIp() != null && !options.getManualIp().isEmpty()) {
jvmOptsBuilder.append(" -D" + ZkDefs.MANUAL_IP + "=" + options.getManualIp());
}
DataStore dataStore = fabricService.get().adapt(DataStore.class);
ProfileService profileService = fabricService.get().adapt(ProfileService.class);
for (Map.Entry<String, String> dataStoreEntries : options.getDataStoreProperties().entrySet()) {
String key = dataStoreEntries.getKey();
String value = dataStoreEntries.getValue();
jvmOptsBuilder.append(" -D" + Constants.DATASTORE_PID + "." + key + "=" + value);
}
Profile profile = parent.getVersion().getRequiredProfile("default");
Profile effectiveProfile = Profiles.getEffectiveProfile(fabricService.get(), profileService.getOverlayProfile(profile));
String featuresUrls = collectionAsString(effectiveProfile.getRepositories());
Set<String> features = new LinkedHashSet<String>();
features.add("fabric-core");
//features.addAll(defaultProfile.getFeatures());
String containerName = options.getName();
PortService portService = fabricService.get().getPortService();
Set<Integer> usedPorts = portService.findUsedPortByHost(parent);
CreateChildContainerMetadata metadata = new CreateChildContainerMetadata();
metadata.setCreateOptions(options);
metadata.setContainerName(containerName);
int minimumPort = parent.getMinimumPort();
int maximumPort = parent.getMaximumPort();
dataStore.setContainerAttribute(containerName, DataStore.ContainerAttribute.PortMin, String.valueOf(minimumPort));
dataStore.setContainerAttribute(containerName, DataStore.ContainerAttribute.PortMax, String.valueOf(maximumPort));
inheritAddresses(fabricService.get(), parent.getId(), containerName, options);
//We are creating a container instance, just for the needs of port registration.
Container child = new ContainerImpl(parent, containerName, fabricService.get()) {
@Override