All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ligoj.app.plugin.prov.ProvisioningService Maven / Gradle / Ivy

The newest version!
/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.app.plugin.prov;

import java.util.Optional;

import org.ligoj.app.plugin.prov.model.VmOs;

/**
 * Provisioning contract.
 */
public interface ProvisioningService {

	/**
	 * Return the OS to lookup from the queried OS.
	 *
	 * @param os The required OS.
	 * @return The OS used in the lookup.
	 */
	default VmOs getCatalogOs(VmOs os) {
		return Optional.ofNullable(os).map(VmOs::toPricingOs).orElse(os);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy