diff --git a/coordinator/build.gradle b/coordinator/build.gradle index 0d9489b..74b5fb4 100644 --- a/coordinator/build.gradle +++ b/coordinator/build.gradle @@ -29,6 +29,7 @@ dependencies { implementation "org.eclipse.jgit:org.eclipse.jgit:5.5.1.201910021850-r" implementation "com.fasterxml.jackson.core:jackson-databind:2.9.9" implementation "org.eclipse.xtend:org.eclipse.xtend.lib:2.18.0" + implementation "org.apache.httpcomponents:httpclient:4.5.9" runtime "commons-beanutils:commons-beanutils:1.9.3" runtime "org.apache.logging.log4j:log4j-core:2.12.0" runtime "org.apache.logging.log4j:log4j-jcl:2.12.0" diff --git a/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/CamClient.java b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/CamClient.java new file mode 100644 index 0000000..146fdb8 --- /dev/null +++ b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/CamClient.java @@ -0,0 +1,687 @@ +package com.rigiresearch.middleware.coordinator; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import lombok.RequiredArgsConstructor; +import org.apache.commons.configuration2.Configuration; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.conn.socket.LayeredConnectionSocketFactory; +import org.apache.http.conn.ssl.NoopHostnameVerifier; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.ssl.SSLContextBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * HTTP client for interacting with IBM CAM. + * TODO Use the refresh token + * FIXME See {@link #initClient()} + * @author Miguel Jimenez (miguel@uvic.ca) + * @version $Id$ + * @since 0.1.0 + */ +@RequiredArgsConstructor +@SuppressWarnings({ + "checkstyle:ClassDataAbstractionCoupling", + "PMD.AvoidDuplicateLiterals" +}) +public final class CamClient { + + /** + * The tenant id. + */ + public static final String TENANT_ID = "tenantId"; + + /** + * The ICP team. + */ + public static final String ICP_TEAM = "ace_orgGuid"; + + /** + * The ICP namespace. + */ + public static final String ICP_NAMESPACE = "cloudOE_spaceGuid"; + + /** + * The logger. + */ + private static final Logger LOGGER = + LoggerFactory.getLogger(CamClient.class); + + /** + * A JSON object mapper. + */ + private static final ObjectMapper MAPPER = new ObjectMapper(); + + /** + * An insecure HTTP client. + * FIXME Change HTTP client initialization. + */ + private static final CloseableHttpClient CLIENT = CamClient.initClient(); + + /** + * Initial capcity for maps/collections. + */ + private static final int INITIAL_CAPACITY = 10; + + /** + * HTTP 200 status code. + */ + private static final int OKAY = 200; + + /** + * Charset UTF-8. + */ + private static final String UTF_8 = "UTF-8"; + + /** + * JSON content type. + */ + private static final String JSON = "application/json"; + + /** + * The property name for the access token. + */ + private static final String ACCESS_TOKEN = "cam.auth.token"; + + /** + * The access token's expiration time. + */ + private static final String ACCESS_TOKEN_EXP = "cam.auth.token.expiration"; + + /** + * The type of access token. + */ + private static final String ACCESS_TOKEN_TYPE = "cam.auth.token.type"; + + /** + * The property name for CAM's URL. + */ + private static final String CAM_URL = "cam.url"; + + /** + * The properties configuration. + */ + private final Configuration config; + + /** + * Initializes an HTTP client that does not check SSL certificates. + * FIXME This is done to bypass security checks for CAM servers. + * This is very insecure! + * Adapted from: + * - https://stackoverflow.com/a/19518383/738968 + * - https://stackoverflow.com/a/19519566/738968 + * @return An HTTP client + */ + private static CloseableHttpClient initClient() { + final SSLContextBuilder builder = new SSLContextBuilder(); + try { + // builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); + builder.loadTrustMaterial(null, (chain, type) -> true); + final LayeredConnectionSocketFactory factory = + new SSLConnectionSocketFactory( + builder.build(), + NoopHostnameVerifier.INSTANCE + ); + return HttpClients.custom().setSSLSocketFactory(factory).build(); + } catch (final NoSuchAlgorithmException | KeyStoreException + | KeyManagementException exception) { + throw new IllegalStateException(exception); + } + } + + /** + * Configures this client. + * @return This client + */ + public CamClient setup() { + this.authenticate(); + // Perform the request 10s before the token expires + final long secs = 10L; + final long delay = this.config.getLong(CamClient.ACCESS_TOKEN_EXP) - secs; + Executors.newScheduledThreadPool(1) + .scheduleAtFixedRate(this::authenticate, delay, delay, TimeUnit.SECONDS); + CamClient.LOGGER.debug("Scheduled authentication for CAM. Exp. time is {}s", delay); + return this; + } + + /** + * Requests an authentication token. + */ + public void authenticate() { + final HttpPost request = new HttpPost(this.config.getString("cam.auth.url")); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", "application/x-www-form-urlencoded"); + request.setHeader("charset", CamClient.UTF_8); + try { + request.setEntity( + new StringEntity( + String.format( + "grant_type=password&username=%s&password=%s&scope=openid", + this.config.getString("cam.user"), + this.config.getString("cam.password") + ) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + if (code == CamClient.OKAY) { + CamClient.LOGGER.info( + "Collected authentication token (CAM)" + ); + final JsonNode node = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + this.config.setProperty( + CamClient.ACCESS_TOKEN, + node.get("access_token").textValue() + ); + this.config.setProperty( + CamClient.ACCESS_TOKEN_EXP, + node.get("expires_in").longValue() + ); + this.config.setProperty( + CamClient.ACCESS_TOKEN_TYPE, + node.get("token_type").textValue() + ); + CamClient.LOGGER.debug( + "Collected {} token {} (CAM)", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ); + } else { + CamClient.LOGGER.error("Unexpected response code {} (#authenticate)", code); + } + } catch (final IOException exception) { + CamClient.LOGGER.error("Authentication error (CAM)", exception); + } + } + + /** + * Requests CAM the tenant id, ICP team and ICP namespace. + * @return A map with the collected values + * @throws IOException If there's an I/O error + */ + public Map requestParameters() throws IOException { + final Map map = new HashMap<>(CamClient.INITIAL_CAPACITY); + final HttpGet request = new HttpGet( + String.format( + "%s/cam/tenant/api/v1/tenants/getTenantOnPrem", + this.config.getString(CamClient.CAM_URL) + ) + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + if (code == CamClient.OKAY) { + final JsonNode node = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + map.put(CamClient.TENANT_ID, node.get("id").textValue()); + JsonNode namespace = null; + // TODO Don't use the default namespace but let the user specify it + for (final JsonNode tmp : node.get("namespaces")) { + if ("default".equals(tmp.get("uid").textValue())) { + namespace = tmp; + break; + } + } + map.put(CamClient.ICP_TEAM, namespace.get("teamId").textValue()); + map.put(CamClient.ICP_NAMESPACE, namespace.get("uid").textValue()); + } else { + CamClient.LOGGER.error("Unexpected response code {} (#requestParameters)", code); + } + CamClient.LOGGER.debug("Collected CAM parameters {}", map); + return map; + } + + /** + * Creates a Terraform template using HCL as format. + * @param repository The (remote) repository URL + * @param token The personal access token + * @param branch The repository branch containing the CAM template and the + * Terraform files + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws URISyntaxException If there's an error building the request URI + * @throws IOException If there's an I/O error + */ + @SuppressWarnings({ + "checkstyle:ExecutableStatementCount", + "checkstyle:ParameterNumber" + }) + public JsonNode createTemplate(final String repository, final String token, + final String branch, final Map params) + throws URISyntaxException, IOException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/templates/createFromSource", + this.config.getString(CamClient.CAM_URL) + ) + ); + final HttpPost request = new HttpPost( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final ObjectNode input = CamClient.MAPPER.createObjectNode(); + final ObjectNode source = CamClient.MAPPER.createObjectNode(); + final ObjectNode github = CamClient.MAPPER.createObjectNode(); + input.set("template_type", CamClient.MAPPER.valueToTree("Terraform")); + input.set("template_format", CamClient.MAPPER.valueToTree("HCL")); + github.set("url", CamClient.MAPPER.valueToTree(repository)); + github.set("token", CamClient.MAPPER.valueToTree(token)); + github.set("dir", CamClient.MAPPER.valueToTree("")); + github.set("ref", CamClient.MAPPER.valueToTree(branch)); + source.set("github", github); + input.set("template_source", source); + request.setEntity( + new StringEntity( + CamClient.MAPPER.writeValueAsString(input), + CamClient.UTF_8 + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + if (code != CamClient.OKAY) { + CamClient.LOGGER.error("Unexpected response code {} (#createTemplate)", code); + } + return body; + } + + /** + * Finds templates matching with a given repository. + * @param repository The (remote) repository URL + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body for the matching templates or empty if no + * template matches the given repository URL + * @throws URISyntaxException If there's an error building the request URI + * @throws IOException If there's an I/O error + */ + public ArrayNode templatesForRepository(final String repository, + final Map params) throws URISyntaxException, IOException { + final ArrayNode elements = CamClient.MAPPER.createArrayNode(); + final URI base = new URI( + String.format( + "%s/cam/api/v1/templates", + this.config.getString(CamClient.CAM_URL) + ) + ); + final HttpGet request = new HttpGet( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + if (code == CamClient.OKAY) { + final JsonNode node = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + for (final JsonNode template : node) { + // TODO Validate that template_provider is vSphere? + final JsonNode url = + template.at("/manifest/template_source/github/url"); + if (!url.isMissingNode() && url.textValue().equals(repository)) { + elements.add(template); + } + } + } else { + CamClient.LOGGER.error( + "Unexpected response code {} (#templatesForRepository)", + code + ); + } + return elements; + } + + /** + * Creates a Stack. + * @param name The stack's name + * @param description A description + * @param template The template id + * @param connection The connection id + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws IOException If there's an I/O error + * @throws URISyntaxException If there's an error building the request URI + */ + @SuppressWarnings({ + "checkstyle:ParameterNumber", + "PMD.UseObjectForClearerAPI" + }) + public JsonNode createStack(final String name, final String description, + final String template, final String connection, + final Map params) throws IOException, URISyntaxException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/stacks", + this.config.getString(CamClient.CAM_URL) + ) + ); + final HttpPost request = new HttpPost( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final ObjectNode input = CamClient.MAPPER.createObjectNode(); + final ArrayNode connections = CamClient.MAPPER.createArrayNode(); + input.set("name", CamClient.MAPPER.valueToTree(name)); + input.set("description", CamClient.MAPPER.valueToTree(description)); + input.set("templateId", CamClient.MAPPER.valueToTree(template)); + connections.add(connection); + input.set("cloud_connection_ids", connections); + request.setEntity( + new StringEntity( + CamClient.MAPPER.writeValueAsString(input), + CamClient.UTF_8 + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + if (code != CamClient.OKAY) { + CamClient.LOGGER.error("Unexpected response code {} (#createStack)", code); + } + return body; + } + + /** + * Performs a Plan action on a particular stack. + * @param stack The stack's id + * @param values The stack's parameter values + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws IOException If there's an I/O error + * @throws URISyntaxException If there's an error building the request URI + */ + public JsonNode performPlan(final String stack, + final Map values, final Map params) + throws IOException, URISyntaxException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/stacks/%s/plan", + this.config.getString(CamClient.CAM_URL), + stack + ) + ); + final HttpPost request = new HttpPost( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final ObjectNode input = CamClient.MAPPER.createObjectNode(); + final ArrayNode value = CamClient.MAPPER.createArrayNode(); + for (final Map.Entry entry : values.entrySet()) { + final ObjectNode item = CamClient.MAPPER.createObjectNode(); + item.set("name", CamClient.MAPPER.valueToTree(entry.getKey())); + item.set("value", CamClient.MAPPER.valueToTree(entry.getValue())); + value.add(item); + } + input.set("parameters", value); + request.setEntity( + new StringEntity( + CamClient.MAPPER.writeValueAsString(input), + CamClient.UTF_8 + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + if (code != CamClient.OKAY) { + CamClient.LOGGER.error("Unexpected response code {} (#performPlan)", code); + } + return body; + } + + /** + * Performs an Apply action on a particular stack. + * @param stack The stack's id + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws IOException If there's an I/O error + * @throws URISyntaxException If there's an error building the request URI + */ + public JsonNode performApply(final String stack, + final Map params) throws IOException, URISyntaxException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/stacks/%s/apply", + this.config.getString(CamClient.CAM_URL), + stack + ) + ); + final HttpPost request = new HttpPost( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("Content-Type", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + if (code != CamClient.OKAY) { + CamClient.LOGGER.error("Unexpected response code {} (#performApply)", code); + } + return body; + } + + /** + * Retrieves information about a Stack. + * @param stack The stack's id + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws URISyntaxException If there's an error building the request URI + * @throws IOException If there's an I/O error + */ + public JsonNode retrieveStack(final String stack, + final Map params) throws URISyntaxException, IOException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/stacks/%s/retrieve", + this.config.getString(CamClient.CAM_URL), + stack + ) + ); + final HttpPost request = new HttpPost( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + if (code != CamClient.OKAY) { + CamClient.LOGGER.error("Unexpected response code {} (#retrieveStack)", code); + } + return body; + } + + /** + * Retrieves a list of stacks for a particular template. + * @param template The template's id + * @param params Request parameters (tenant id, ICP team & namespace) + * @return The response's body + * @throws URISyntaxException If there's an error building the request URI + * @throws IOException If there's an I/O error + */ + public ArrayNode stacksForTemplate(final String template, + final Map params) throws URISyntaxException, IOException { + final URI base = new URI( + String.format( + "%s/cam/api/v1/stacks", + this.config.getString(CamClient.CAM_URL) + ) + ); + final HttpGet request = new HttpGet( + new URIBuilder() + .setScheme(base.getScheme()) + .setHost(base.getHost()) + .setPort(base.getPort()) + .setPath(base.getPath()) + .addParameter(CamClient.TENANT_ID, params.get(CamClient.TENANT_ID)) + .addParameter(CamClient.ICP_TEAM, params.get(CamClient.ICP_TEAM)) + .addParameter(CamClient.ICP_NAMESPACE, params.get(CamClient.ICP_NAMESPACE)) + .build() + ); + request.setHeader("Accept", CamClient.JSON); + request.setHeader("charset", CamClient.UTF_8); + request.setHeader( + "Authorization", + String.format( + "%s %s", + this.config.getString(CamClient.ACCESS_TOKEN_TYPE), + this.config.getString(CamClient.ACCESS_TOKEN) + ) + ); + final CloseableHttpResponse response = CamClient.CLIENT.execute(request); + final int code = response.getStatusLine().getStatusCode(); + final JsonNode body = + CamClient.MAPPER.readTree(response.getEntity().getContent()); + final ArrayNode elements = CamClient.MAPPER.createArrayNode(); + if (code == CamClient.OKAY) { + for (final JsonNode tmp : body) { + if (tmp.get("templateId").textValue().equals(template)) { + elements.add(tmp); + } + } + } else { + CamClient.LOGGER.error( + "Unexpected response code {} (#stacksForTemplate)", + code + ); + } + return elements; + } + +} diff --git a/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/EvolutionCoordination.java b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/EvolutionCoordination.java index 22840bb..1a4fa60 100644 --- a/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/EvolutionCoordination.java +++ b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/EvolutionCoordination.java @@ -2,11 +2,15 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; import com.rigiresearch.middleware.metamodels.SerializationParser; import com.rigiresearch.middleware.metamodels.hcl.Specification; import com.rigiresearch.middleware.notations.hcl.parsing.HclParsingException; import java.io.IOException; import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; import org.apache.commons.configuration2.Configuration; import org.apache.commons.text.StringEscapeUtils; import org.eclipse.emf.common.util.URI; @@ -21,6 +25,7 @@ * @version $Id$ * @since 0.1.0 */ +@SuppressWarnings("PMD.AvoidDuplicateLiterals") public final class EvolutionCoordination { /** @@ -34,11 +39,21 @@ public final class EvolutionCoordination { */ private static final ObjectMapper MAPPER = new ObjectMapper(); + /** + * The properties configuration. + */ + private final Configuration config; + /** * A repository of Terraform templates. */ private final TerraformRepository repository; + /** + * An API client for IBM CAM. + */ + private final CamClient client; + /** * An Ecore serialization parser. */ @@ -53,10 +68,12 @@ public final class EvolutionCoordination { */ public EvolutionCoordination(final Configuration config) throws IOException, GitAPIException, URISyntaxException { + this.config = config; this.repository = new TerraformRepository( new URIish(config.getString("coordinator.repository.url")), config.getString("coordinator.repository.token") ); + this.client = new CamClient(this.config).setup(); this.serialization = new SerializationParser(); } @@ -79,10 +96,7 @@ public void runtimeUpdate(final String body) throws GitAPIException { this.repository.update(specification); } if (vals != null) { - EvolutionCoordination.LOGGER.info( - "New values received: {}", - EvolutionCoordination.MAPPER.writeValueAsString(vals) - ); + this.updateStack(vals); } } catch (final IOException exception) { EvolutionCoordination.LOGGER.error( @@ -99,4 +113,105 @@ public void runtimeUpdate(final String body) throws GitAPIException { } } + /** + * Updates (or creates) a CAM stack for the current repository and given + * values. + * TODO improve this method + * @param values The stack's parameter values + */ + @SuppressWarnings({ + "checkstyle:CyclomaticComplexity", + "checkstyle:ExecutableStatementCount", + "checkstyle:NPathComplexity", + "PMD.NPathComplexity", + "PMD.CyclomaticComplexity" + }) + private void updateStack(final JsonNode values) { + try { + final Map params = this.client.requestParameters(); + final ArrayNode templates = this.client.templatesForRepository( + this.config.getString("coordinator.repository.url"), + params + ); + final String branch = + this.repository.getBranch().getName().replace("refs/heads/", ""); + JsonNode template = null; + if (templates.size() > 0) { + for (final JsonNode tmp : templates) { + final JsonNode ref = tmp.at("/manifest/template_source/github/ref"); + if (!ref.isMissingNode() && ref.textValue().equals(branch)) { + template = tmp; + break; + } + } + } + if (template == null) { + template = this.client.createTemplate( + this.config.getString("coordinator.repository.url"), + this.config.getString("coordinator.repository.token"), + branch, + params + ); + EvolutionCoordination.LOGGER.debug( + "Created template {}", + template.get("name").textValue() + ); + } else { + EvolutionCoordination.LOGGER.debug( + "Using template {}", + template.get("name").textValue() + ); + } + final ArrayNode stacks = + this.client.stacksForTemplate(template.get("id").textValue(), params); + final JsonNode stack; + if (stacks.size() > 0) { + // TODO Which stack should I use? I'm taking the first one always + stack = this.client.retrieveStack( + stacks.get(0).get("id").textValue(), + params + ); + } else { + stack = this.client.createStack( + String.format("%s-imported", template.get("name").textValue()), + "Imported resources from VMware vSphere", + template.get("id").textValue(), + this.config.getString("cam.vsphere.connection"), + params + ); + } + final Map vals = new HashMap<>(values.size() + 1); + // FIXME Since this is the first Plan, the stack requires a value for all vars + vals.put("allow_unverified_ssl", "true"); + final Iterator fields = values.fieldNames(); + while (fields.hasNext()) { + final String field = fields.next(); + vals.put(field, values.get(field).textValue()); + } + final String stackid = stack.at("/id").textValue(); + JsonNode plan = + this.client.performPlan(stackid, vals, params); + EvolutionCoordination.LOGGER.info("Performed a Terraform plan"); + if ("PLAN".equals(plan.at("/action").textValue()) + && "IN_PROGRESS".equals(plan.at("/status").textValue())) { + final long delay = 3000L; + do { + EvolutionCoordination.LOGGER.debug("Waiting for Plan to finish"); + Thread.sleep(delay); + plan = this.client.retrieveStack(stackid, params); + } while ("PLAN".equals(plan.at("/action").textValue()) + && "IN_PROGRESS".equals(plan.at("/status").textValue())); + } + // TODO import VMs + EvolutionCoordination.LOGGER.info("TODO Perform a Terraform import"); + if ("SUCCESS_WITH_CHANGES".equals(plan.at("/status").textValue())) { + // TODO Apply + EvolutionCoordination.LOGGER.info("TODO Perform a Terraform apply"); + // this.client.performApply(stackid, params); + } + } catch (final IOException | URISyntaxException | InterruptedException exception) { + EvolutionCoordination.LOGGER.error("Error updating the stack", exception); + } + } + } diff --git a/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/TerraformRepository.java b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/TerraformRepository.java index b902a0b..6ecf054 100644 --- a/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/TerraformRepository.java +++ b/coordinator/src/main/java/com/rigiresearch/middleware/coordinator/TerraformRepository.java @@ -19,6 +19,7 @@ import java.util.Collection; import java.util.Comparator; import java.util.Map; +import lombok.Getter; import org.eclipse.emf.common.util.URI; import org.eclipse.jgit.api.CreateBranchCommand; import org.eclipse.jgit.api.Git; @@ -77,6 +78,7 @@ public final class TerraformRepository { /** * The current branch. */ + @Getter private Ref branch; /** diff --git a/coordinator/src/main/resources/coordinator.properties b/coordinator/src/main/resources/coordinator.properties index 3d10a7f..b7f28b0 100644 --- a/coordinator/src/main/resources/coordinator.properties +++ b/coordinator/src/main/resources/coordinator.properties @@ -1,3 +1,9 @@ coordinator.port=${env:COORDINATOR_PORT} coordinator.repository.url=${env:REPOSITORY_URL} coordinator.repository.token=${env:REPOSITORY_TOKEN} + +cam.user=${env:CAM_USER} +cam.password=${env:CAM_PASSWORD} +cam.url=https://${env:CAM_HOST}:${env:CAM_PORT} +cam.auth.url=https://${env:CAM_HOST}:${env:CAM_AUTH_PORT}/idprovider/v1/auth/identitytoken +cam.vsphere.connection=${env:CAM_VSPHERE_CONNECTION} diff --git a/coordinator/src/test/java/com/rigiresearch/middleware/coordinator/package-info.java b/coordinator/src/test/java/com/rigiresearch/middleware/coordinator/package-info.java new file mode 100644 index 0000000..079d677 --- /dev/null +++ b/coordinator/src/test/java/com/rigiresearch/middleware/coordinator/package-info.java @@ -0,0 +1,7 @@ +/** + * Contains tests for the corresponding main package. + * @author Miguel Jimenez (miguel@uvic.ca) + * @version $Id$ + * @since 0.1.0 + */ +package com.rigiresearch.middleware.coordinator; diff --git a/historian.runtime/src/main/java/com/rigiresearch/middleware/historian/runtime/Request.java b/historian.runtime/src/main/java/com/rigiresearch/middleware/historian/runtime/Request.java index 5480220..ef84fb4 100644 --- a/historian.runtime/src/main/java/com/rigiresearch/middleware/historian/runtime/Request.java +++ b/historian.runtime/src/main/java/com/rigiresearch/middleware/historian/runtime/Request.java @@ -30,7 +30,7 @@ /** * A data collector. - * @author Miguel Jimenez (miguel@leslumier.es) + * @author Miguel Jimenez (miguel@uvic.ca) * @version $Id$ * @since 0.1.0 */ @@ -44,6 +44,12 @@ public final class Request { private static final Logger LOGGER = LoggerFactory.getLogger(Request.class); + /** + * An HTTP client. + */ + private static final CloseableHttpClient CLIENT = + HttpClients.createDefault(); + /** * The default buffer size. */ @@ -91,13 +97,12 @@ public Request withCredentials(final String username, final String password) { */ public CloseableHttpResponse response() throws IOException { final URI uri = this.uri(this.url); - final CloseableHttpClient client = HttpClients.createDefault(); final CloseableHttpResponse response; if (this.provider == null) { final HttpUriRequest request = new HttpGet(uri); this.parameters(Input.Location.HEADER) .forEach(p -> request.addHeader(p.getName(), p.getValue())); - response = client.execute(request); + response = Request.CLIENT.execute(request); } else { final HttpRequest request = new HttpPost(uri); this.parameters(Input.Location.HEADER) @@ -106,7 +111,7 @@ public CloseableHttpResponse response() throws IOException { context.setCredentialsProvider(this.provider); final HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()); - response = client.execute(host, request, context); + response = Request.CLIENT.execute(host, request, context); } Request.LOGGER.debug("{}", uri); return response; diff --git a/vmware.hcl.agent/src/dist/lib/config/vcenter.json b/vmware.hcl.agent/src/dist/lib/config/vcenter.json new file mode 100644 index 0000000..e830472 --- /dev/null +++ b/vmware.hcl.agent/src/dist/lib/config/vcenter.json @@ -0,0 +1,10992 @@ +{ + "swagger": "2.0", + "info": { + "description": "VMware vCenter Server provides a centralized platform for managing your VMware vSphere environments", + "title": "vcenter", + "termsOfService": "http://swagger.io/terms/", + "version": "2.0.0" + }, + "host": "localhost", + "securityDefinitions": { + "basic_auth": { + "type": "basic" + }, + "api_key": { + "type": "apiKey", + "name": "vmware-api-session-id", + "in": "header" + } + }, + "security": [ + { + "api_key": [] + } + ], + "basePath": "/rest", + "tags": [], + "schemes": [ + "https", + "http" + ], + "produces": [ + "application/json" + ], + "paths": { + "/com/vmware/vcenter/inventory/datastore": { + "post": { + "tags": [ + "inventory/datastore" + ], + "summary": "Returns datastore information for the specified datastores. The key in the {@term result} {@term map} is the datastore identifier and the value in the {@term map} is the datastore information.", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.inventory.datastore_find" + } + }, + { + "name": "~action", + "in": "query", + "description": "~action=find", + "required": true, + "type": "string", + "enum": [ + "find" + ] + } + ], + "responses": { + "200": { + "description": "Datastore information for the specified datastores. The key in the {@term result} {@term map} is the datastore identifier and the value in the {@term map} is the datastore information.", + "schema": { + "$ref": "#/definitions/vcenter.inventory.datastore.find_result" + } + }, + "404": { + "description": "if no datastore can be found for one or more of the datastore identifiers in {@param.name datastores}", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "findVcenterInventoryDatastore" + } + }, + "/com/vmware/vcenter/inventory/network": { + "post": { + "tags": [ + "inventory/network" + ], + "summary": "Returns network information for the specified vCenter Server networks. The key in the {@term result} {@term map} is the network identifier and the value in the {@term map} is the network information.", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.inventory.network_find" + } + }, + { + "name": "~action", + "in": "query", + "description": "~action=find", + "required": true, + "type": "string", + "enum": [ + "find" + ] + } + ], + "responses": { + "200": { + "description": "Network information for the specified vCenter Server networks. The key in the {@term result} {@term map} is the network identifier and the value in the {@term map} is the network information.", + "schema": { + "$ref": "#/definitions/vcenter.inventory.network.find_result" + } + }, + "404": { + "description": "if no datastore can be found for one or more of the vCenter Server network identifiers in {@param.name networks}", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "findVcenterInventoryNetwork" + } + }, + "/com/vmware/vcenter/iso/image/id:{library_item}": { + "post": { + "tags": [ + "iso/image" + ], + "summary": "Mounts an ISO image from a content library on a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "library_item", + "description": "The identifier of the library item having the ISO image to mount on the virtual machine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.iso.image_mount" + } + }, + { + "name": "~action", + "in": "query", + "description": "~action=mount", + "required": true, + "type": "string", + "enum": [ + "mount" + ] + } + ], + "responses": { + "200": { + "description": "The identifier of the newly created virtual CD-ROM backed by the specified ISO image.", + "schema": { + "$ref": "#/definitions/vcenter.iso.image.mount_result" + } + }, + "404": { + "description": "If either {@param.name vm} or the {@param.name libraryItem} is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "400": { + "description": "", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "mountVcenterIsoImage" + } + }, + "/com/vmware/vcenter/iso/image/id:{vm}": { + "post": { + "tags": [ + "iso/image" + ], + "summary": "Unmounts a previously mounted CD-ROM using an ISO image as a backing.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "The identifier of the virtual machine from which to unmount the virtual CD-ROM." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.iso.image_unmount" + } + }, + { + "name": "~action", + "in": "query", + "description": "~action=unmount", + "required": true, + "type": "string", + "enum": [ + "unmount" + ] + } + ], + "responses": { + "200": { + "description": "" + }, + "404": { + "description": "If the virtual machine identified by {@param.name vm} is not found or the {@param.name cdrom} does not identify a virtual CD-ROM in the virtual machine.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "400": { + "description": "When the operation is not allowed on the virtual machine in its current state.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_allowed_in_current_state_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "unmountVcenterIsoImage" + } + }, + "/com/vmware/vcenter/ovf/capability/id:{server_guid}": { + "get": { + "tags": [ + "ovf/capability" + ], + "summary": "Returns information about the capability of the given vCenter server.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "server_guid", + "description": "Target vCenter server GUID" + } + ], + "responses": { + "200": { + "description": "{@term CapabilityInfo} of the given server.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.capability_result" + } + }, + "400": { + "description": "If the given vCenter server GUID is invalid, or does not match available vCenter servers.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.invalid_argument_error" + } + } + }, + "operationId": "getVcenterOvfCapability" + } + }, + "/com/vmware/vcenter/ovf/export-flag": { + "get": { + "tags": [ + "ovf/export_flag" + ], + "summary": "Returns information about the supported export flags by the server.

The supported flags are:

PRESERVE_MAC
Include MAC addresses for network adapters.
EXTRA_CONFIG
Include extra configuration in OVF export.

Future server versions might support additional flags.", + "parameters": [], + "responses": { + "200": { + "description": "A {@term list} of supported export flags.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.export_flag.list_result" + } + } + }, + "operationId": "listVcenterOvfExportFlag" + } + }, + "/com/vmware/vcenter/ovf/import-flag": { + "get": { + "tags": [ + "ovf/import_flag" + ], + "summary": "Returns information about the import flags supported by the deployment platform.

The supported flags are:

LAX
Lax mode parsing of the OVF descriptor.

Future server versions might support additional flags.", + "parameters": [ + { + "type": "string", + "in": "query", + "name": "rp", + "description": "The identifier of resource pool target for retrieving the import flag(s).", + "required": true + } + ], + "responses": { + "200": { + "description": "A {@term list} of supported import flags.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.import_flag.list_result" + } + }, + "404": { + "description": "If the resource pool associated with {@param.name rp} does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + } + }, + "operationId": "listVcenterOvfImportFlag" + } + }, + "/com/vmware/vcenter/ovf/library-item": { + "post": { + "tags": [ + "ovf/library_item" + ], + "summary": "Creates a library item in content library from a virtual machine or virtual appliance.

This {@term operation} creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this {@term operation}, the original content is overwritten.

", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item_create" + } + } + ], + "responses": { + "200": { + "description": "Information about the success or failure of the {@term operation}, along with the details of the result or failure.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item.create_result" + } + }, + "400": { + "description": "if the specified virtual machine or virtual appliance is busy.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_busy_error" + } + }, + "404": { + "description": "if the virtual machine or virtual appliance specified by {@param.name source} does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterOvfLibraryItem" + } + }, + "/com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}": { + "post": { + "tags": [ + "ovf/library_item" + ], + "summary": "Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance.

This {@term operation} deploys an OVF package which is stored in the library item specified by {@param.name ovfLibraryItemId}. It uses the deployment specification in {@param.name deploymentSpec} to deploy the OVF package to the location specified by {@param.name target}.

", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "ovf_library_item_id", + "description": "Identifier of the content library item containing the OVF package to be deployed." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item_deploy" + } + }, + { + "name": "~action", + "in": "query", + "description": "~action=deploy", + "required": true, + "type": "string", + "enum": [ + "deploy" + ] + } + ], + "responses": { + "200": { + "description": "Information about the success or failure of the {@term operation}, along with the details of the result or failure.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item.deploy_result" + } + }, + "400": { + "description": "if there was an error accessing the OVF package stored in the library item specified by {@param.name ovfLibraryItemId}.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the library item specified by {@param.name ovfLibraryItemId} does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "403": { + "description": "if you do not have all of the privileges described as follows :
  • {@term Operation} execution requires VirtualMachine.Config.AddNewDisk if the OVF descriptor has a disk drive (type 17) section.
  • {@term Operation} execution requires VirtualMachine.Config.AdvancedConfig if the OVF descriptor has an ExtraConfig section.
  • {@term Operation} execution requires Extension.Register for specified resource group if the OVF descriptor has a vServiceDependency section.
  • {@term Operation} execution requires Network.Assign for target network if specified.
  • {@term Operation} execution requires Datastore.AllocateSpace for target datastore if specified.
", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "deployVcenterOvfLibraryItem" + } + }, + "/com/vmware/vcenter/ovf/library-item/id:{ovf_library_item_id}?~action=filter": { + "post": { + "tags": [ + "ovf/library_item" + ], + "summary": "Queries an OVF package stored in content library to retrieve information to use when deploying the package. See {@link #deploy}.

This {@term operation} retrieves information from the descriptor of the OVF package stored in the library item specified by {@param.name ovfLibraryItemId}. The information returned by the {@term operation} can be used to populate the deployment specification (see {@link ResourcePoolDeploymentSpec} when deploying the OVF package to the deployment target specified by {@param.name target}.

", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "ovf_library_item_id", + "description": "Identifier of the content library item containing the OVF package to query." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item_filter" + } + } + ], + "responses": { + "200": { + "description": "Information that can be used to populate the deployment specification (see {@link ResourcePoolDeploymentSpec}) when deploying the OVF package to the deployment target specified by {@param.name target}.", + "schema": { + "$ref": "#/definitions/vcenter.ovf.library_item.filter_result" + } + }, + "400": { + "description": "if there was an error accessing the OVF package at the specified {@param.name ovfLibraryItemId}.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the library item specified by {@param.name ovfLibraryItemId} does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "filterVcenterOvfLibraryItem" + } + }, + "/vcenter/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the Cluster.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.clusters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of clusters that can match the filter.\nIf unset or empty, clusters with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that clusters must have to match the filter (see Cluster.Info.name).\nIf unset or empty, clusters with any name match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the cluster for the cluster to match the filter.\nIf unset or empty, clusters in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the cluster for the cluster to match the filter.\nIf unset or empty, clusters in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the clusters matching the Cluster.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.cluster.list_result" + } + }, + "400": { + "description": "if more than 1000 clusters match the Cluster.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterCluster" + } + }, + "/vcenter/cluster/{cluster}": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Retrieves information about the cluster corresponding to cluster.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "cluster", + "description": "Identifier of the cluster.\nThe parameter must be an identifier for the resource type: ClusterComputeResource." + } + ], + "responses": { + "200": { + "description": "The Cluster.Info instances that corresponds to the cluster.", + "schema": { + "$ref": "#/definitions/vcenter.cluster_result" + } + }, + "404": { + "description": "if there is no cluster associated with cluster in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the session id is missing from the request or the corresponding session object cannot be found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't not have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterCluster" + } + }, + "/vcenter/datacenter": { + "post": { + "tags": [ + "datacenter" + ], + "summary": "Create a new datacenter in the vCenter inventory", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.datacenter_create" + } + } + ], + "responses": { + "200": { + "description": "The identifier of the newly created datacenter\nThe result will be an identifier for the resource type: Datacenter.", + "schema": { + "$ref": "#/definitions/vcenter.datacenter.create_result" + } + }, + "400": { + "description": "if the datacenter name is empty or invalid as per the underlying implementation.\nif the folder is not specified and the system cannot choose a suitable one.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.invalid_argument_error" + } + }, + "404": { + "description": "if the datacenter folder cannot be found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterDatacenter" + }, + "get": { + "tags": [ + "datacenter" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the Datacenter.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of datacenters that can match the filter.\nIf unset or empty, datacenters with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that datacenters must have to match the filter (see Datacenter.Info.name).\nIf unset or empty, datacenters with any name match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the datacenters for the datacenter to match the filter.\nIf unset or empty, datacenters in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the datacenters matching the Datacenter.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.datacenter.list_result" + } + }, + "400": { + "description": "if more than 1000 datacenters match the Datacenter.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterDatacenter" + } + }, + "/vcenter/datacenter/{datacenter}": { + "get": { + "tags": [ + "datacenter" + ], + "summary": "Retrieves information about the datacenter corresponding to datacenter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "datacenter", + "description": "Identifier of the datacenter.\nThe parameter must be an identifier for the resource type: Datacenter." + } + ], + "responses": { + "200": { + "description": "The Datacenter.Info instances that corresponds to the datacenter.", + "schema": { + "$ref": "#/definitions/vcenter.datacenter_result" + } + }, + "400": { + "description": "if the system reports an error while responding to the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.error_error" + } + }, + "404": { + "description": "if there is no datacenter associated with datacenter in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterDatacenter" + }, + "delete": { + "tags": [ + "datacenter" + ], + "summary": "Delete an empty datacenter from the vCenter Server", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "datacenter", + "description": "Identifier of the datacenter to be deleted.\nThe parameter must be an identifier for the resource type: Datacenter." + }, + { + "required": false, + "type": "boolean", + "in": "query", + "name": "force", + "description": "If true, delete the datacenter even if it is not empty.\nIf unset a ResourceInUse error will be reported if the datacenter is not empty. This is the equivalent of passing the value false." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the datacenter associated with datacenter is not empty.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_in_use_error" + } + }, + "404": { + "description": "if there is no datacenter associated with datacenter in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterDatacenter" + } + }, + "/vcenter/datastore": { + "get": { + "tags": [ + "datastore" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) datastores in vCenter matching the Datastore.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.datastores", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of datastores that can match the filter.\nIf unset or empty, datastores with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datastore. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datastore." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that datastores must have to match the filter (see Datastore.Info.name).\nIf unset or empty, datastores with any name match the filter." + }, + { + "in": "query", + "name": "filter.types", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "VMFS", + "NFS", + "NFS41", + "CIFS", + "VSAN", + "VFFS", + "VVOL" + ] + }, + "description": "Types that datastores must have to match the filter (see Datastore.Summary.type).\nIf unset or empty, datastores with any type match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the datastore for the datastore to match the filter.\nIf unset or empty, datastores in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the datastore for the datastore to match the filter.\nIf unset or empty, datastores in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the datastores matching the Datastore.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.datastore.list_result" + } + }, + "400": { + "description": "if more than 1000 datastores match the Datastore.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterDatastore" + } + }, + "/vcenter/datastore/{datastore}": { + "get": { + "tags": [ + "datastore" + ], + "summary": "Retrieves information about the datastore indicated by datastore.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "datastore", + "description": "Identifier of the datastore for which information should be retrieved.\nThe parameter must be an identifier for the resource type: Datastore." + } + ], + "responses": { + "200": { + "description": "information about the datastore.", + "schema": { + "$ref": "#/definitions/vcenter.datastore_result" + } + }, + "404": { + "description": "if the datastore indicated by datastore does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterDatastore" + } + }, + "/vcenter/folder": { + "get": { + "tags": [ + "folder" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the Folder.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of folders that can match the filter.\nIf unset or empty, folders with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that folders must have to match the filter (see Folder.Summary.name).\nIf unset or empty, folders with any name match the filter." + }, + { + "in": "query", + "name": "filter.type", + "type": "string", + "enum": [ + "DATACENTER", + "DATASTORE", + "HOST", + "NETWORK", + "VIRTUAL_MACHINE" + ], + "description": "The Folder.Type enumerated type defines the type of a vCenter Server folder. The type of a folder determines what what kinds of children can be contained in the folder." + }, + { + "in": "query", + "name": "filter.parent_folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the folder for the folder to match the filter.\nIf unset or empty, folder in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the folder for the folder to match the filter.\nIf unset or empty, folder in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the folders matching the Folder.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.folder.list_result" + } + }, + "400": { + "description": "if more than 1000 folders match the Folder.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterFolder" + } + }, + "/vcenter/host": { + "post": { + "tags": [ + "host" + ], + "summary": "Add a new standalone host in the vCenter inventory. The newly connected host will be in connected state. The vCenter Server will verify the SSL certificate before adding the host to its inventory. In the case where the SSL certificate cannot be verified because the Certificate Authority is not recognized or the certificate is self signed, the vCenter Server will fall back to thumbprint verification mode as defined by Host.CreateSpec.ThumbprintVerification.", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.host_create" + } + } + ], + "responses": { + "200": { + "description": "The newly created identifier of the host in vCenter.\nThe result will be an identifier for the resource type: HostSystem.", + "schema": { + "$ref": "#/definitions/vcenter.host.create_result" + } + }, + "400": { + "description": "if the software version on the host is not supported.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "401": { + "description": "if the user name or password for the administration account on the host are invalid.\nif the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterHost" + }, + "get": { + "tags": [ + "host" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) hosts in vCenter matching the Host.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.hosts", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of hosts that can match the filter.\nIf unset or empty, hosts with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that hosts must have to match the filter (see Host.Summary.name).\nIf unset or empty, hosts with any name match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + }, + { + "in": "query", + "name": "filter.standalone", + "type": "boolean", + "description": "If true, only hosts that are not part of a cluster can match the filter, and if false, only hosts that are are part of a cluster can match the filter.\nIf unset Hosts can match filter independent of whether they are part of a cluster or not. If this field is true and Host.FilterSpec.clusters os not empty, no hosts will match the filter." + }, + { + "in": "query", + "name": "filter.clusters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Clusters that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any cluster and hosts that are not in a cluster match the filter. If this field is not empty and Host.FilterSpec.standalone is true, no hosts will match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource." + }, + { + "in": "query", + "name": "filter.connection_states", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "CONNECTED", + "DISCONNECTED", + "NOT_RESPONDING" + ] + }, + "description": "Connection states that a host must be in to match the filter (see Host.Summary.connection-state.\nIf unset or empty, hosts in any connection state match the filter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the hosts matching the Host.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.host.list_result" + } + }, + "400": { + "description": "if more than 1000 hosts match the Host.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterHost" + } + }, + "/vcenter/host/{host}": { + "delete": { + "tags": [ + "host" + ], + "summary": "Remove a standalone host from the vCenter Server.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "host", + "description": "Identifier of the host to be deleted.\nThe parameter must be an identifier for the resource type: HostSystem." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the host associated with host is in a vCenter cluster", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_in_use_error" + } + }, + "404": { + "description": "if there is no host associated with host in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterHost" + } + }, + "/vcenter/host/{host}/connect": { + "post": { + "tags": [ + "host" + ], + "summary": "Connect to the host corresponding to host previously added to the vCenter server.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "host", + "description": "Identifier of the host to be reconnected.\nThe parameter must be an identifier for the resource type: HostSystem." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the system reports an error while responding to the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.error_error" + } + }, + "404": { + "description": "if there is no host associated with host in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterHost" + } + }, + "/vcenter/host/{host}/disconnect": { + "post": { + "tags": [ + "host" + ], + "summary": "Disconnect the host corresponding to host from the vCenter server", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "host", + "description": "Identifier of the host to be disconnected.\nThe parameter must be an identifier for the resource type: HostSystem." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the system reports an error while responding to the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.error_error" + } + }, + "404": { + "description": "if there is no host associated with host in the system.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterHost" + } + }, + "/vcenter/network": { + "get": { + "tags": [ + "network" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) networks in vCenter matching the Network.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.networks", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of networks that can match the filter.\nIf unset or empty, networks with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Network. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Network." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that networks must have to match the filter (see Network.Summary.name).\nIf unset or empty, networks with any name match the filter." + }, + { + "in": "query", + "name": "filter.types", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "STANDARD_PORTGROUP", + "DISTRIBUTED_PORTGROUP", + "OPAQUE_NETWORK" + ] + }, + "description": "Types that networks must have to match the filter (see Network.Summary.type).\nIf unset, networks with any type match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the network for the network to match the filter.\nIf unset or empty, networks in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the network for the network to match the filter.\nIf unset or empty, networks in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the networks matching the Network.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.network.list_result" + } + }, + "400": { + "description": "if more than 1000 networks match the Network.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterNetwork" + } + }, + "/vcenter/resource-pool": { + "get": { + "tags": [ + "resource_pool" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) resource pools in vCenter matching the ResourcePool.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.resource_pools", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of resource pools that can match the filter.\nIf unset or empty, resource pools with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that resource pools must have to match the filter (see ResourcePool.Info.name).\nIf unset or empty, resource pools with any name match the filter." + }, + { + "in": "query", + "name": "filter.parent_resource_pools", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Resource pools that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any resource pool match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + }, + { + "in": "query", + "name": "filter.hosts", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Hosts that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any host match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem." + }, + { + "in": "query", + "name": "filter.clusters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Clusters that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any cluster match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the resource pools matching the ResourcePool.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.resource_pool.list_result" + }, + "examples": { + "application/json": { + "value": [ + { + "name": "Resources", + "resource_pool": "resgroup-1" + }, + { + "name": "ethantao", + "resource_pool": "resgroup-2" + } + ] + } + } + }, + "400": { + "description": "if more than 1000 resource pools match the ResourcePool.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterResourcePool" + } + }, + "/vcenter/resource-pool/{resource_pool}": { + "get": { + "tags": [ + "resource_pool" + ], + "summary": "Retrieves information about the resource pool indicated by resourcePool.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "resource_pool", + "description": "Identifier of the resource pool for which information should be retrieved.\nThe parameter must be an identifier for the resource type: ResourcePool." + } + ], + "responses": { + "200": { + "description": "information about the resource pool.", + "schema": { + "$ref": "#/definitions/vcenter.resource_pool_result" + } + }, + "404": { + "description": "if the resource pool indicated by resourcePool does not exist.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterResourcePool" + } + }, + "/vcenter/vm": { + "post": { + "tags": [ + "VM" + ], + "summary": "Creates a virtual machine.", + "parameters": [ + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.VM_create" + } + } + ], + "responses": { + "200": { + "description": "ID of newly-created virtual machine.\nThe result will be an identifier for the resource type: VirtualMachine.", + "schema": { + "$ref": "#/definitions/vcenter.VM.create_result" + } + }, + "400": { + "description": "if VM.CreateSpec.guest-os is not supported for the requested virtual hardware version and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if any of the resources specified in spec could not be found", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVm" + }, + "get": { + "tags": [ + "VM" + ], + "summary": "Returns information about at most 1000 visible (subject to permission checks) virtual machines in vCenter matching the VM.FilterSpec.", + "parameters": [ + { + "in": "query", + "name": "filter.vms", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Identifiers of virtual machines that can match the filter.\nIf unset or empty, virtual machines with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: VirtualMachine." + }, + { + "in": "query", + "name": "filter.names", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Names that virtual machines must have to match the filter (see VM.Info.name).\nIf unset or empty, virtual machines with any name match the filter." + }, + { + "in": "query", + "name": "filter.folders", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Folders that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder." + }, + { + "in": "query", + "name": "filter.datacenters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Datacenters that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter." + }, + { + "in": "query", + "name": "filter.hosts", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Hosts that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines on any host match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem." + }, + { + "in": "query", + "name": "filter.clusters", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Clusters that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any cluster match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource." + }, + { + "in": "query", + "name": "filter.resource_pools", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "Resource pools that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any resource pool match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool." + }, + { + "in": "query", + "name": "filter.power_states", + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string", + "enum": [ + "POWERED_OFF", + "POWERED_ON", + "SUSPENDED" + ] + }, + "description": "Power states that a virtual machine must be in to match the filter (see Power.Info.state.\nIf unset or empty, virtual machines in any power state match the filter." + } + ], + "responses": { + "200": { + "description": "Commonly used information about the virtual machines matching the VM.FilterSpec.", + "schema": { + "$ref": "#/definitions/vcenter.VM.list_result" + }, + "examples": { + "application/json": { + "value": [ + { + "cpu_count": 2, + "memory_size_MiB": 2048, + "name": "test-vm-1", + "power_state": "POWERED_ON", + "vm": "vm-1" + }, + { + "cpu_count": 4, + "memory_size_MiB": 8192, + "name": "test-vm-2", + "power_state": "POWERED_ON", + "vm": "vm-2" + } + ] + } + } + }, + "400": { + "description": "if more than 1000 virtual machines match the VM.FilterSpec.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVm" + } + }, + "/vcenter/vm/{vm}": { + "get": { + "tags": [ + "VM" + ], + "summary": "Returns information about a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.VM_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVm" + }, + "delete": { + "tags": [ + "VM" + ], + "summary": "Deletes a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVm" + } + }, + "/vcenter/vm/{vm}/hardware": { + "get": { + "tags": [ + "vm/hardware" + ], + "summary": "Returns the virtual hardware settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Virtual hardware settings of the virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardware" + }, + "patch": { + "tags": [ + "vm/hardware" + ], + "summary": "Updates the virtual hardware settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardware" + } + }, + "/vcenter/vm/{vm}/hardware/action/upgrade": { + "post": { + "tags": [ + "vm/hardware" + ], + "summary": "Upgrades the virtual machine to a newer virtual hardware version.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware_upgrade" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "upgradeVcenterVmHardwareAction" + } + }, + "/vcenter/vm/{vm}/hardware/adapter/sata": { + "post": { + "tags": [ + "vm/hardware/adapter/sata" + ], + "summary": "Adds a virtual SATA adapter to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual SATA adapter identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.SataAdapter.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.create_result" + } + }, + "400": { + "description": "if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareAdapterSata" + }, + "get": { + "tags": [ + "vm/hardware/adapter/sata" + ], + "summary": "Returns commonly used information about the virtual SATA adapters belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual SATA adapters.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareAdapterSata" + } + }, + "/vcenter/vm/{vm}/hardware/adapter/sata/{adapter}": { + "get": { + "tags": [ + "vm/hardware/adapter/sata" + ], + "summary": "Returns information about a virtual SATA adapter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "adapter", + "description": "Virtual SATA adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SataAdapter." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual SATA adapter.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual SATA adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareAdapterSata" + }, + "delete": { + "tags": [ + "vm/hardware/adapter/sata" + ], + "summary": "Removes a virtual SATA adapter from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "adapter", + "description": "Virtual SATA adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SataAdapter." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual SATA adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareAdapterSata" + } + }, + "/vcenter/vm/{vm}/hardware/adapter/scsi": { + "post": { + "tags": [ + "vm/hardware/adapter/scsi" + ], + "summary": "Adds a virtual SCSI adapter to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual SCSI adapter identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.create_result" + } + }, + "400": { + "description": "if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareAdapterScsi" + }, + "get": { + "tags": [ + "vm/hardware/adapter/scsi" + ], + "summary": "Returns commonly used information about the virtual SCSI adapters belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual SCSI adapters.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareAdapterScsi" + } + }, + "/vcenter/vm/{vm}/hardware/adapter/scsi/{adapter}": { + "get": { + "tags": [ + "vm/hardware/adapter/scsi" + ], + "summary": "Returns information about a virtual SCSI adapter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "adapter", + "description": "Virtual SCSI adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual SCSI adapter.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual SCSI adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareAdapterScsi" + }, + "patch": { + "tags": [ + "vm/hardware/adapter/scsi" + ], + "summary": "Updates the configuration of a virtual SCSI adapter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "adapter", + "description": "Virtual SCSI adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual SCSI adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareAdapterScsi" + }, + "delete": { + "tags": [ + "vm/hardware/adapter/scsi" + ], + "summary": "Removes a virtual SCSI adapter from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "adapter", + "description": "Virtual SCSI adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual SCSI adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareAdapterScsi" + } + }, + "/vcenter/vm/{vm}/hardware/boot": { + "get": { + "tags": [ + "vm/hardware/boot" + ], + "summary": "Returns the boot-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Boot-related settings of the virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.boot_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareBoot" + }, + "patch": { + "tags": [ + "vm/hardware/boot" + ], + "summary": "Updates the boot-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.boot_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareBoot" + } + }, + "/vcenter/vm/{vm}/hardware/boot/device": { + "put": { + "tags": [ + "vm/hardware/boot/device" + ], + "summary": "Sets the virtual devices that will be used to boot the virtual machine. The virtual machine will check the devices in order, attempting to boot from each, until the virtual machine boots successfully. If the list is empty, the virtual machine will use a default boot sequence. There should be no more than one instance of Device.Entry for a given device type except ETHERNET in the list.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device_set" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found, or if any of the specified virtual devices is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "setVcenterVmHardwareBootDevice" + }, + "get": { + "tags": [ + "vm/hardware/boot/device" + ], + "summary": "Returns an ordered list of boot devices for the virtual machine. If the list is empty, the virtual machine uses a default boot sequence.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Ordered list of configured boot devices.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareBootDevice" + } + }, + "/vcenter/vm/{vm}/hardware/cdrom": { + "post": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Adds a virtual CD-ROM device to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual CD-ROM device identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.Cdrom.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.create_result" + } + }, + "400": { + "description": "if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareCdrom" + }, + "get": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Returns commonly used information about the virtual CD-ROM devices belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual CD-ROM devices.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareCdrom" + } + }, + "/vcenter/vm/{vm}/hardware/cdrom/{cdrom}": { + "get": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Returns information about a virtual CD-ROM device.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "cdrom", + "description": "Virtual CD-ROM device identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Cdrom." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual CD-ROM device.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual CD-ROM device is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareCdrom" + }, + "patch": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Updates the configuration of a virtual CD-ROM device.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "cdrom", + "description": "Virtual CD-ROM device identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Cdrom." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual CD-ROM device is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareCdrom" + }, + "delete": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Removes a virtual CD-ROM device from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "cdrom", + "description": "Virtual CD-ROM device identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Cdrom." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual CD-ROM device is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareCdrom" + } + }, + "/vcenter/vm/{vm}/hardware/cdrom/{cdrom}/connect": { + "post": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Connects a virtual CD-ROM device of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. \n For a powered-off virtual machine, the Cdrom.update operation may be used to configure the virtual CD-ROM device to start in the connected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "cdrom", + "description": "Virtual CD-ROM device identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Cdrom." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual CD-ROM device is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterVmHardwareCdrom" + } + }, + "/vcenter/vm/{vm}/hardware/cdrom/{cdrom}/disconnect": { + "post": { + "tags": [ + "vm/hardware/cdrom" + ], + "summary": "Disconnects a virtual CD-ROM device of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the CD-ROM device is not connected to its backing resource. \n For a powered-off virtual machine, the Cdrom.update operation may be used to configure the virtual CD-ROM device to start in the disconnected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "cdrom", + "description": "Virtual CD-ROM device identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Cdrom." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual CD-ROM device is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterVmHardwareCdrom" + } + }, + "/vcenter/vm/{vm}/hardware/cpu": { + "get": { + "tags": [ + "vm/hardware/cpu" + ], + "summary": "Returns the CPU-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "CPU-related settings of the virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cpu_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareCpu" + }, + "patch": { + "tags": [ + "vm/hardware/cpu" + ], + "summary": "Updates the CPU-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.cpu_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareCpu" + } + }, + "/vcenter/vm/{vm}/hardware/disk": { + "post": { + "tags": [ + "vm/hardware/disk" + ], + "summary": "Adds a virtual disk to the virtual machine. While adding the virtual disk, a new VMDK file may be created or an existing VMDK file may be used to back the virtual disk.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.disk_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual disk identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.Disk.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.create_result" + } + }, + "400": { + "description": "if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareDisk" + }, + "get": { + "tags": [ + "vm/hardware/disk" + ], + "summary": "Returns commonly used information about the virtual disks belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about the virtual disks.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareDisk" + } + }, + "/vcenter/vm/{vm}/hardware/disk/{disk}": { + "get": { + "tags": [ + "vm/hardware/disk" + ], + "summary": "Returns information about a virtual disk.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "disk", + "description": "Virtual disk identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Disk." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual disk.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.disk_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual disk is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareDisk" + }, + "patch": { + "tags": [ + "vm/hardware/disk" + ], + "summary": "Updates the configuration of a virtual disk. An update operation can be used to detach the existing VMDK file and attach another VMDK file to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "disk", + "description": "Virtual disk identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Disk." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.disk_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual disk is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareDisk" + }, + "delete": { + "tags": [ + "vm/hardware/disk" + ], + "summary": "Removes a virtual disk from the virtual machine. This operation does not destroy the VMDK file that backs the virtual disk. It only detaches the VMDK file from the virtual machine. Once detached, the VMDK file will not be destroyed when the virtual machine to which it was associated is deleted.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "disk", + "description": "Virtual disk identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Disk." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual disk is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareDisk" + } + }, + "/vcenter/vm/{vm}/hardware/ethernet": { + "post": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Adds a virtual Ethernet adapter to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual Ethernet adapter identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.Ethernet.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.create_result" + } + }, + "400": { + "description": "if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unsupported_error" + } + }, + "404": { + "description": "if the virtual machine or network backing is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareEthernet" + }, + "get": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Returns commonly used information about the virtual Ethernet adapters belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual Ethernet adapters.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareEthernet" + } + }, + "/vcenter/vm/{vm}/hardware/ethernet/{nic}": { + "get": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Returns information about a virtual Ethernet adapter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "nic", + "description": "Virtual Ethernet adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Ethernet." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual Ethernet adapter.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual Ethernet adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareEthernet" + }, + "patch": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Updates the configuration of a virtual Ethernet adapter.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "nic", + "description": "Virtual Ethernet adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Ethernet." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine, virtual Ethernet adapter, or backing network is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareEthernet" + }, + "delete": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Removes a virtual Ethernet adapter from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "nic", + "description": "Virtual Ethernet adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Ethernet." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual Ethernet adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareEthernet" + } + }, + "/vcenter/vm/{vm}/hardware/ethernet/{nic}/connect": { + "post": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Connects a virtual Ethernet adapter of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. \n For a powered-off virtual machine, the Ethernet.update operation may be used to configure the virtual Ethernet adapter to start in the connected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "nic", + "description": "Virtual Ethernet adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Ethernet." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual Ethernet adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterVmHardwareEthernet" + } + }, + "/vcenter/vm/{vm}/hardware/ethernet/{nic}/disconnect": { + "post": { + "tags": [ + "vm/hardware/ethernet" + ], + "summary": "Disconnects a virtual Ethernet adapter of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the Ethernet adapter is not connected to its backing resource. \n For a powered-off virtual machine, the Ethernet.update operation may be used to configure the virtual Ethernet adapter to start in the disconnected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "nic", + "description": "Virtual Ethernet adapter identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Ethernet." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual Ethernet adapter is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterVmHardwareEthernet" + } + }, + "/vcenter/vm/{vm}/hardware/floppy": { + "post": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Adds a virtual floppy drive to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual floppy drive identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.Floppy.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.create_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareFloppy" + }, + "get": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Returns commonly used information about the virtual floppy drives belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual floppy drives.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareFloppy" + } + }, + "/vcenter/vm/{vm}/hardware/floppy/{floppy}": { + "get": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Returns information about a virtual floppy drive.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "floppy", + "description": "Virtual floppy drive identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Floppy." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual floppy drive.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual floppy drive is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareFloppy" + }, + "patch": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Updates the configuration of a virtual floppy drive.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "floppy", + "description": "Virtual floppy drive identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Floppy." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual floppy drive is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareFloppy" + }, + "delete": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Removes a virtual floppy drive from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "floppy", + "description": "Virtual floppy drive identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Floppy." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual floppy drive is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareFloppy" + } + }, + "/vcenter/vm/{vm}/hardware/floppy/{floppy}/connect": { + "post": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Connects a virtual floppy drive of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. \n For a powered-off virtual machine, the Floppy.update operation may be used to configure the virtual floppy drive to start in the connected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "floppy", + "description": "Virtual floppy drive identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Floppy." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual floppy drive is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterVmHardwareFloppy" + } + }, + "/vcenter/vm/{vm}/hardware/floppy/{floppy}/disconnect": { + "post": { + "tags": [ + "vm/hardware/floppy" + ], + "summary": "Disconnects a virtual floppy drive of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the floppy drive is not connected to its backing resource. \n For a powered-off virtual machine, the Floppy.update operation may be used to configure the virtual floppy floppy to start in the disconnected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "floppy", + "description": "Virtual floppy drive identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.Floppy." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual floppy drive is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterVmHardwareFloppy" + } + }, + "/vcenter/vm/{vm}/hardware/memory": { + "get": { + "tags": [ + "vm/hardware/memory" + ], + "summary": "Returns the memory-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Memory-related settings of the virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.memory_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareMemory" + }, + "patch": { + "tags": [ + "vm/hardware/memory" + ], + "summary": "Updates the memory-related settings of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.memory_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareMemory" + } + }, + "/vcenter/vm/{vm}/hardware/parallel": { + "post": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Adds a virtual parallel port to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual parallel port identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.ParallelPort.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.create_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareParallel" + }, + "get": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Returns commonly used information about the virtual parallel ports belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual parallel ports.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareParallel" + } + }, + "/vcenter/vm/{vm}/hardware/parallel/{port}": { + "get": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Returns information about a virtual parallel port.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual parallel port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual parallel port.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual parallel port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareParallel" + }, + "patch": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Updates the configuration of a virtual parallel port.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual parallel port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual parallel port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareParallel" + }, + "delete": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Removes a virtual parallel port from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual parallel port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual parallel port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareParallel" + } + }, + "/vcenter/vm/{vm}/hardware/parallel/{port}/connect": { + "post": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Connects a virtual parallel port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. \n For a powered-off virtual machine, the Parallel.update operation may be used to configure the virtual parallel port to start in the connected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual parallel port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual parallel port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterVmHardwareParallel" + } + }, + "/vcenter/vm/{vm}/hardware/parallel/{port}/disconnect": { + "post": { + "tags": [ + "vm/hardware/parallel" + ], + "summary": "Disconnects a virtual parallel port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the parallel port is not connected to its backing. \n For a powered-off virtual machine, the Parallel.update operation may be used to configure the virtual parallel port to start in the disconnected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual parallel port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual parallel port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterVmHardwareParallel" + } + }, + "/vcenter/vm/{vm}/hardware/serial": { + "post": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Adds a virtual serial port to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.serial_create" + } + } + ], + "responses": { + "200": { + "description": "Virtual serial port identifier.\nThe result will be an identifier for the resource type: vcenter.vm.hardware.SerialPort.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.create_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "createVcenterVmHardwareSerial" + }, + "get": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Returns commonly used information about the virtual serial ports belonging to the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "List of commonly used information about virtual serial ports.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.list_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "listVcenterVmHardwareSerial" + } + }, + "/vcenter/vm/{vm}/hardware/serial/{port}": { + "get": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Returns information about a virtual serial port.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual serial port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SerialPort." + } + ], + "responses": { + "200": { + "description": "Information about the specified virtual serial port.", + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.serial_result" + } + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual serial port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmHardwareSerial" + }, + "patch": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Updates the configuration of a virtual serial port.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual serial port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SerialPort." + }, + { + "in": "body", + "name": "request_body", + "required": true, + "schema": { + "$ref": "#/definitions/vcenter.vm.hardware.serial_update" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual serial port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "updateVcenterVmHardwareSerial" + }, + "delete": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Removes a virtual serial port from the virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual serial port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SerialPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual serial port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "deleteVcenterVmHardwareSerial" + } + }, + "/vcenter/vm/{vm}/hardware/serial/{port}/connect": { + "post": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Connects a virtual serial port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system. \n For a powered-off virtual machine, the Serial.update operation may be used to configure the virtual serial port to start in the connected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual serial port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SerialPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual serial port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "connectVcenterVmHardwareSerial" + } + }, + "/vcenter/vm/{vm}/hardware/serial/{port}/disconnect": { + "post": { + "tags": [ + "vm/hardware/serial" + ], + "summary": "Disconnects a virtual serial port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the serial port is not connected to its backing. \n For a powered-off virtual machine, the Serial.update operation may be used to configure the virtual serial port to start in the disconnected state when the virtual machine is powered on.\n", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + }, + { + "type": "string", + "required": true, + "in": "path", + "name": "port", + "description": "Virtual serial port identifier.\nThe parameter must be an identifier for the resource type: vcenter.vm.hardware.SerialPort." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine's configuration state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine or virtual serial port is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "disconnectVcenterVmHardwareSerial" + } + }, + "/vcenter/vm/{vm}/power": { + "get": { + "tags": [ + "vm/power" + ], + "summary": "Returns the power state information of a virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "Power state information for the specified virtual machine.", + "schema": { + "$ref": "#/definitions/vcenter.vm.power_result" + } + }, + "400": { + "description": "if the virtual machine's configuration or execution state cannot be accessed.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "operationId": "getVcenterVmPower" + } + }, + "/vcenter/vm/{vm}/power/reset": { + "post": { + "tags": [ + "vm/power" + ], + "summary": "Resets a powered-on virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine is performing another operation", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_busy_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "resetVcenterVmPower" + } + }, + "/vcenter/vm/{vm}/power/start": { + "post": { + "tags": [ + "vm/power" + ], + "summary": "Powers on a powered-off or suspended virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine is performing another operation.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_busy_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "startVcenterVmPower" + } + }, + "/vcenter/vm/{vm}/power/stop": { + "post": { + "tags": [ + "vm/power" + ], + "summary": "Powers off a powered-on or suspended virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine is performing another operation.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_busy_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "stopVcenterVmPower" + } + }, + "/vcenter/vm/{vm}/power/suspend": { + "post": { + "tags": [ + "vm/power" + ], + "summary": "Suspends a powered-on virtual machine.", + "parameters": [ + { + "type": "string", + "required": true, + "in": "path", + "name": "vm", + "description": "Virtual machine identifier.\nThe parameter must be an identifier for the resource type: VirtualMachine." + } + ], + "responses": { + "200": { + "description": "" + }, + "400": { + "description": "if the virtual machine is performing another operation.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.resource_busy_error" + } + }, + "404": { + "description": "if the virtual machine is not found.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.not_found_error" + } + }, + "503": { + "description": "if the system is unable to communicate with a service to complete the request.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable_error" + } + }, + "401": { + "description": "if the user can not be authenticated.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated_error" + } + }, + "403": { + "description": "if the user doesn't have the required privileges.", + "schema": { + "$ref": "#/definitions/vapi.std.errors.unauthorized_error" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "suspendVcenterVmPower" + } + } + }, + "definitions": { + "vapi.std.errors.already_exists": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.already_exists_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.already_exists" + } + } + }, + "vapi.std.errors.already_in_desired_state": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.already_in_desired_state_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.already_in_desired_state" + } + } + }, + "vapi.std.errors.error": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.error_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.error" + } + } + }, + "vapi.std.errors.invalid_argument": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.invalid_argument_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.invalid_argument" + } + } + }, + "vapi.std.errors.invalid_element_type": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.invalid_element_type_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.invalid_element_type" + } + } + }, + "vapi.std.errors.not_allowed_in_current_state": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.not_allowed_in_current_state_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.not_allowed_in_current_state" + } + } + }, + "vapi.std.errors.not_found": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.not_found_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.not_found" + } + } + }, + "vapi.std.errors.resource_busy": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.resource_busy_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.resource_busy" + } + } + }, + "vapi.std.errors.resource_in_use": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.resource_in_use_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.resource_in_use" + } + } + }, + "vapi.std.errors.resource_inaccessible": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.resource_inaccessible_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.resource_inaccessible" + } + } + }, + "vapi.std.errors.service_unavailable": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.service_unavailable_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.service_unavailable" + } + } + }, + "vapi.std.errors.unable_to_allocate_resource": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.unable_to_allocate_resource_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.unable_to_allocate_resource" + } + } + }, + "vapi.std.errors.unauthenticated": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.unauthenticated_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.unauthenticated" + } + } + }, + "vapi.std.errors.unauthorized": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.unauthorized_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.unauthorized" + } + } + }, + "vapi.std.errors.unsupported": { + "type": "object", + "properties": { + "messages": { + "description": "Stack of one or more localizable messages for human {@term error} consumers.

The message at the top of the stack (first in the list) describes the {@term error} from the perspective of the {@term operation} the client invoked. Each subsequent message in the stack describes the \"cause\" of the prior message.", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "data": { + "description": "Data to facilitate clients responding to the {@term operation} reporting a standard {@term error} to indicating that it was unable to complete successfully.

{@term Operations} may provide data that clients can use when responding to {@term errors}. Since the data that clients need may be specific to the context of the {@term operation} reporting the {@term error}, different {@term operations} that report the same {@term error} may provide different data in the {@term error}. The documentation for each each {@term operation} will describe what, if any, data it provides for each {@term error} it reports. The {@link ArgumentLocations}, {@link FileLocations}, and {@link TransientIndication} {@term structures} are intended as possible values for this {@term field}. {@link vapi.std.DynamicID} may also be useful as a value for this {@term field} (although that is not its primary purpose). Some {@term services} may provide their own specific {@term structures} for use as the value of this {@term field} when reporting {@term errors} from their {@term operations}.", + "type": "object" + } + }, + "required": [ + "messages" + ] + }, + "vapi.std.errors.unsupported_error": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vapi.std.errors.unsupported" + } + } + }, + "vapi.std.localizable_message": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the localizable string or message template.

This identifier is typically used to retrieve a locale-specific string or message template from a message catalog.", + "type": "string" + }, + "default_message": { + "description": "The value of this localizable string or message template in the {@code en_US} (English) locale. If {@link #id} refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog.", + "type": "string" + }, + "args": { + "description": "Arguments to be substituted into a message template.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "default_message", + "args" + ] + }, + "vcenter.VM.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.VM.create_spec": { + "type": "object", + "properties": { + "guest_OS": { + "description": "Guest OS.", + "$ref": "#/definitions/vcenter.vm.guest_OS" + }, + "name": { + "description": "Virtual machine name.\nIf unset, a default name will be generated by the server.", + "type": "string" + }, + "placement": { + "description": "Virtual machine placement information.\nThis field is currently required. In the future, if this field is unset, the system will attempt to choose suitable resources on which to place the virtual machine.", + "$ref": "#/definitions/vcenter.VM.placement_spec" + }, + "hardware_version": { + "description": "Virtual hardware version.\nIf unset, defaults to the most recent version supported by the server.", + "$ref": "#/definitions/vcenter.vm.hardware.version" + }, + "boot": { + "description": "Boot configuration.\nIf unset, guest-specific default values will be used.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.create_spec" + }, + "boot_devices": { + "description": "Boot device configuration.\nIf unset, a server-specific boot sequence will be used.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.entry_create_spec" + } + }, + "cpu": { + "description": "CPU configuration.\nIf unset, guest-specific default values will be used.", + "$ref": "#/definitions/vcenter.vm.hardware.cpu.update_spec" + }, + "memory": { + "description": "Memory configuration.\nIf unset, guest-specific default values will be used.", + "$ref": "#/definitions/vcenter.vm.hardware.memory.update_spec" + }, + "disks": { + "description": "List of disks.\nIf unset, a single blank virtual disk of a guest-specific size will be created on the same storage as the virtual machine configuration, and will use a guest-specific host bus adapter type. If the guest-specific size is 0, no virtual disk will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.create_spec" + } + }, + "nics": { + "description": "List of Ethernet adapters.\nIf unset, no Ethernet adapters will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.create_spec" + } + }, + "cdroms": { + "description": "List of CD-ROMs.\nIf unset, no CD-ROM devices will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.create_spec" + } + }, + "floppies": { + "description": "List of floppy drives.\nIf unset, no floppy drives will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.create_spec" + } + }, + "parallel_ports": { + "description": "List of parallel ports.\nIf unset, no parallel ports will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.create_spec" + } + }, + "serial_ports": { + "description": "List of serial ports.\nIf unset, no serial ports will be created.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.create_spec" + } + }, + "sata_adapters": { + "description": "List of SATA adapters.\nIf unset, any adapters necessary to connect the virtual machine's storage devices will be created; this includes any devices that explicitly specify a SATA host bus adapter, as well as any devices that do not specify a host bus adapter if the guest's preferred adapter type is SATA.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.create_spec" + } + }, + "scsi_adapters": { + "description": "List of SCSI adapters.\nIf unset, any adapters necessary to connect the virtual machine's storage devices will be created; this includes any devices that explicitly specify a SCSI host bus adapter, as well as any devices that do not specify a host bus adapter if the guest's preferred adapter type is SCSI. The type of the SCSI adapter will be a guest-specific default type.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.create_spec" + } + } + }, + "required": [ + "guest_OS" + ] + }, + "vcenter.VM.filter_spec": { + "type": "object", + "properties": { + "vms": { + "description": "Identifiers of virtual machines that can match the filter.\nIf unset or empty, virtual machines with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: VirtualMachine.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that virtual machines must have to match the filter (see VM.Info.name).\nIf unset or empty, virtual machines with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "folders": { + "description": "Folders that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "hosts": { + "description": "Hosts that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines on any host match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "description": "Clusters that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any cluster match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "resource_pools": { + "description": "Resource pools that must contain the virtual machine for the virtual machine to match the filter.\nIf unset or empty, virtual machines in any resource pool match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "power_states": { + "description": "Power states that a virtual machine must be in to match the filter (see Power.Info.state.\nIf unset or empty, virtual machines in any power state match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/vcenter.vm.power.state" + } + } + } + }, + "vcenter.VM.info": { + "type": "object", + "properties": { + "guest_OS": { + "description": "Guest OS.", + "$ref": "#/definitions/vcenter.vm.guest_OS" + }, + "name": { + "description": "Virtual machine name.", + "type": "string" + }, + "power_state": { + "description": "Power state of the virtual machine.", + "$ref": "#/definitions/vcenter.vm.power.state" + }, + "hardware": { + "description": "Virtual hardware version information.", + "$ref": "#/definitions/vcenter.vm.hardware.info" + }, + "boot": { + "description": "Boot configuration.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.info" + }, + "boot_devices": { + "description": "Boot device configuration. If the list has no entries, a server-specific default boot sequence is used.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.entry" + } + }, + "cpu": { + "description": "CPU configuration.", + "$ref": "#/definitions/vcenter.vm.hardware.cpu.info" + }, + "memory": { + "description": "Memory configuration.", + "$ref": "#/definitions/vcenter.vm.hardware.memory.info" + }, + "disks": { + "description": "List of disks.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.Disk.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.info" + } + } + } + }, + "nics": { + "description": "List of Ethernet adapters.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.Ethernet. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.Ethernet.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.info" + } + } + } + }, + "cdroms": { + "description": "List of CD-ROMs.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.Cdrom. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.Cdrom.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.info" + } + } + } + }, + "floppies": { + "description": "List of floppy drives.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.Floppy. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.Floppy.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.info" + } + } + } + }, + "parallel_ports": { + "description": "List of parallel ports.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.ParallelPort.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.info" + } + } + } + }, + "serial_ports": { + "description": "List of serial ports.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.SerialPort. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.SerialPort.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.info" + } + } + } + }, + "sata_adapters": { + "description": "List of SATA adapters.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.SataAdapter. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.SataAdapter.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.info" + } + } + } + }, + "scsi_adapters": { + "description": "List of SCSI adapters.\nWhen clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.info" + } + } + } + } + }, + "required": [ + "guest_OS", + "name", + "power_state", + "hardware", + "boot", + "boot_devices", + "cpu", + "memory", + "disks", + "nics", + "cdroms", + "floppies", + "parallel_ports", + "serial_ports", + "sata_adapters", + "scsi_adapters" + ] + }, + "vcenter.VM.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.VM.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.VM.placement_spec": { + "type": "object", + "properties": { + "folder": { + "description": "Virtual machine folder into which the virtual machine should be placed.\nThis field is currently required. In the future, if this field is unset, the system will attempt to choose a suitable folder for the virtual machine; if a folder cannot be chosen, the virtual machine creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "resource_pool": { + "description": "Resource pool into which the virtual machine should be placed.\nThis field is currently required if both VM.PlacementSpec.host and VM.PlacementSpec.cluster are unset. In the future, if this field is unset, the system will attempt to choose a suitable resource pool for the virtual machine; if a resource pool cannot be chosen, the virtual machine creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool.", + "type": "string" + }, + "host": { + "description": "Host onto which the virtual machine should be placed. \n If VM.PlacementSpec.host and VM.PlacementSpec.resource-pool are both specified, VM.PlacementSpec.resource-pool must belong to VM.PlacementSpec.host. \n\n If VM.PlacementSpec.host and VM.PlacementSpec.cluster are both specified, VM.PlacementSpec.host must be a member of VM.PlacementSpec.cluster.\n\nThis field may be unset if VM.PlacementSpec.resource-pool or VM.PlacementSpec.cluster is specified. If unset, the system will attempt to choose a suitable host for the virtual machine; if a host cannot be chosen, the virtual machine creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem.", + "type": "string" + }, + "cluster": { + "description": "Cluster onto which the virtual machine should be placed. \n If VM.PlacementSpec.cluster and VM.PlacementSpec.resource-pool are both specified, VM.PlacementSpec.resource-pool must belong to VM.PlacementSpec.cluster. \n\n If VM.PlacementSpec.cluster and VM.PlacementSpec.host are both specified, VM.PlacementSpec.host must be a member of VM.PlacementSpec.cluster.\n\nIf VM.PlacementSpec.resource-pool or VM.PlacementSpec.host is specified, it is recommended that this field be unset.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.", + "type": "string" + }, + "datastore": { + "description": "Datastore on which the virtual machine's configuration state should be stored. This datastore will also be used for any virtual disks that are created as part of the virtual machine creation operation.\nThis field is currently required. In the future, if this field is unset, the system will attempt to choose suitable storage for the virtual machine; if storage cannot be chosen, the virtual machine creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.", + "type": "string" + } + } + }, + "vcenter.VM.summary": { + "type": "object", + "properties": { + "vm": { + "description": "Identifier of the virtual machine.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine.", + "type": "string" + }, + "name": { + "description": "Name of the Virtual machine.", + "type": "string" + }, + "power_state": { + "description": "Power state of the virtual machine.", + "$ref": "#/definitions/vcenter.vm.power.state" + }, + "cpu_count": { + "description": "Number of CPU cores.\nThis field will be unset if the virtual machine configuration is not available. For example, the configuration information would be unavailable if the server is unable to access the virtual machine files on disk, and is often also unavailable during the intial phases of virtual machine creation.", + "type": "integer", + "format": "int64" + }, + "memory_size_MiB": { + "description": "Memory size in mebibytes.\nThis field will be unset if the virtual machine configuration is not available. For example, the configuration information would be unavailable if the server is unable to access the virtual machine files on disk, and is often also unavailable during the intial phases of virtual machine creation.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "vm", + "name", + "power_state" + ] + }, + "vcenter.VM_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.VM.create_spec", + "description": "Virtual machine specification." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.VM_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.VM.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.cluster.filter_spec": { + "type": "object", + "properties": { + "clusters": { + "description": "Identifiers of clusters that can match the filter.\nIf unset or empty, clusters with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that clusters must have to match the filter (see Cluster.Info.name).\nIf unset or empty, clusters with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "folders": { + "description": "Folders that must contain the cluster for the cluster to match the filter.\nIf unset or empty, clusters in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the cluster for the cluster to match the filter.\nIf unset or empty, clusters in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.cluster.info": { + "type": "object", + "properties": { + "name": { + "description": "The name of the cluster", + "type": "string" + }, + "resource_pool": { + "description": "Identifier of the root resource pool of the cluster\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool.", + "type": "string" + } + }, + "required": [ + "name", + "resource_pool" + ] + }, + "vcenter.cluster.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.cluster.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.cluster.summary": { + "type": "object", + "properties": { + "cluster": { + "description": "Identifier of the cluster.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.", + "type": "string" + }, + "name": { + "description": "Name of the cluster.", + "type": "string" + }, + "ha_enabled": { + "description": "Flag indicating whether the vSphere HA feature is enabled for the cluster.", + "type": "boolean" + }, + "drs_enabled": { + "description": "Flag indicating whether the vSphere DRS service is enabled for the cluster.", + "type": "boolean" + } + }, + "required": [ + "cluster", + "name", + "ha_enabled", + "drs_enabled" + ] + }, + "vcenter.cluster_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.cluster.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.datacenter.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.datacenter.create_spec": { + "type": "object", + "properties": { + "name": { + "description": "The name of the datacenter to be created.", + "type": "string" + }, + "folder": { + "description": "Datacenter folder in which the new datacenter should be created.\nThis field is currently required. In the future, if this field is unset, the system will attempt to choose a suitable folder for the datacenter; if a folder cannot be chosen, the datacenter creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "vcenter.datacenter.filter_spec": { + "type": "object", + "properties": { + "datacenters": { + "description": "Identifiers of datacenters that can match the filter.\nIf unset or empty, datacenters with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that datacenters must have to match the filter (see Datacenter.Info.name).\nIf unset or empty, datacenters with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "folders": { + "description": "Folders that must contain the datacenters for the datacenter to match the filter.\nIf unset or empty, datacenters in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.datacenter.info": { + "type": "object", + "properties": { + "name": { + "description": "The name of the datacenter.", + "type": "string" + }, + "datastore_folder": { + "description": "The root datastore folder associated with the datacenter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "host_folder": { + "description": "The root host and cluster folder associated with the datacenter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "network_folder": { + "description": "The root network folder associated with the datacenter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "vm_folder": { + "description": "The root virtual machine folder associated with the datacenter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + } + }, + "required": [ + "name", + "datastore_folder", + "host_folder", + "network_folder", + "vm_folder" + ] + }, + "vcenter.datacenter.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.datacenter.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.datacenter.summary": { + "type": "object", + "properties": { + "datacenter": { + "description": "Identifier of the datacenter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datacenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datacenter.", + "type": "string" + }, + "name": { + "description": "Name of the datacenter.", + "type": "string" + } + }, + "required": [ + "datacenter", + "name" + ] + }, + "vcenter.datacenter_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.datacenter.create_spec", + "description": "Specification for the new datacenter to be created." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.datacenter_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.datacenter.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.datastore.filter_spec": { + "type": "object", + "properties": { + "datastores": { + "description": "Identifiers of datastores that can match the filter.\nIf unset or empty, datastores with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datastore. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datastore.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that datastores must have to match the filter (see Datastore.Info.name).\nIf unset or empty, datastores with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "types": { + "description": "Types that datastores must have to match the filter (see Datastore.Summary.type).\nIf unset or empty, datastores with any type match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/vcenter.datastore.type" + } + }, + "folders": { + "description": "Folders that must contain the datastore for the datastore to match the filter.\nIf unset or empty, datastores in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the datastore for the datastore to match the filter.\nIf unset or empty, datastores in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.datastore.info": { + "type": "object", + "properties": { + "name": { + "description": "Name of the datastore.", + "type": "string" + }, + "type": { + "description": "Type (Type) of the datastore.", + "$ref": "#/definitions/vcenter.datastore.type" + }, + "accessible": { + "description": "Whether or not this datastore is accessible.", + "type": "boolean" + }, + "free_space": { + "description": "Available space of this datastore, in bytes. \n The server periodically updates this value.\n\nThis field will be unset if the available space of this datastore is not known.", + "type": "integer", + "format": "int64" + }, + "multiple_host_access": { + "description": "Whether or not ore than one host in the datacenter has been configured with access to the datastore.", + "type": "boolean" + }, + "thin_provisioning_supported": { + "description": "Whether or not the datastore supports thin provisioning on a per file basis. When thin provisioning is used, backing storage is lazily allocated.", + "type": "boolean" + } + }, + "required": [ + "name", + "type", + "accessible", + "multiple_host_access", + "thin_provisioning_supported" + ] + }, + "vcenter.datastore.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.datastore.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.datastore.summary": { + "type": "object", + "properties": { + "datastore": { + "description": "Identifier of the datastore.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.", + "type": "string" + }, + "name": { + "description": "Name of the datastore.", + "type": "string" + }, + "type": { + "description": "Type (Type) of the datatore.", + "$ref": "#/definitions/vcenter.datastore.type" + }, + "free_space": { + "description": "Available space of this datastore, in bytes. \n The server periodically updates this value.\n\nThis field will be unset if the available space of this datastore is not known.", + "type": "integer", + "format": "int64" + }, + "capacity": { + "description": "Capacity of this datastore, in bytes. \n The server periodically updates this value.\n\nThis field will be unset if the capacity of this datastore is not known.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "datastore", + "name", + "type" + ] + }, + "vcenter.datastore.type": { + "type": "string", + "enum": [ + "VMFS", + "NFS", + "NFS41", + "CIFS", + "VSAN", + "VFFS", + "VVOL" + ] + }, + "vcenter.datastore_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.datastore.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.folder.filter_spec": { + "type": "object", + "properties": { + "folders": { + "description": "Identifiers of folders that can match the filter.\nIf unset or empty, folders with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that folders must have to match the filter (see Folder.Summary.name).\nIf unset or empty, folders with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "type": { + "description": "Type that folders must have to match the filter (see Folder.Summary.type).\nIf unset, folders with any type match the filter.", + "$ref": "#/definitions/vcenter.folder.type" + }, + "parent_folders": { + "description": "Folders that must contain the folder for the folder to match the filter.\nIf unset or empty, folder in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the folder for the folder to match the filter.\nIf unset or empty, folder in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.folder.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.folder.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.folder.summary": { + "type": "object", + "properties": { + "folder": { + "description": "Identifier of the folder.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "name": { + "description": "Name of the vCenter Server folder.", + "type": "string" + }, + "type": { + "description": "Type (Type) of the vCenter Server folder.", + "$ref": "#/definitions/vcenter.folder.type" + } + }, + "required": [ + "folder", + "name", + "type" + ] + }, + "vcenter.folder.type": { + "type": "string", + "description": "The Folder.Type enumerated type defines the type of a vCenter Server folder. The type of a folder determines what what kinds of children can be contained in the folder.", + "enum": [ + "DATACENTER", + "DATASTORE", + "HOST", + "NETWORK", + "VIRTUAL_MACHINE" + ] + }, + "vcenter.host.connection_state": { + "type": "string", + "enum": [ + "CONNECTED", + "DISCONNECTED", + "NOT_RESPONDING" + ] + }, + "vcenter.host.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.host.create_spec": { + "type": "object", + "properties": { + "hostname": { + "description": "The IP address or DNS resolvable name of the host.", + "type": "string" + }, + "port": { + "description": "The port of the host.\nIf unset, port 443 will be used.", + "type": "integer", + "format": "int64" + }, + "user_name": { + "description": "The administrator account on the host.", + "type": "string" + }, + "password": { + "description": "The password for the administrator account on the host.", + "type": "string", + "format": "password" + }, + "folder": { + "description": "Host and cluster folder in which the new standalone host should be created.\nThis field is currently required. In the future, if this field is unset, the system will attempt to choose a suitable folder for the host; if a folder cannot be chosen, the host creation operation will fail.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.", + "type": "string" + }, + "thumbprint_verification": { + "description": "Type of host's SSL certificate verification to be done.", + "$ref": "#/definitions/vcenter.host.create_spec.thumbprint_verification" + }, + "thumbprint": { + "description": "The thumbprint of the SSL certificate, which the host is expected to have. The thumbprint is always computed using the SHA1 hash and is the string representation of that hash in the format: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx where, 'x' represents a hexadecimal digit.\nThis field is optional and it is only relevant when the value of Host.CreateSpec.thumbprint-verification is THUMBPRINT.", + "type": "string" + }, + "force_add": { + "description": "Whether host should be added to the vCenter Server even if it is being managed by another vCenter Server. The original vCenterServer loses connection to the host.\nIf unset, forceAdd is default to false.", + "type": "boolean" + } + }, + "required": [ + "hostname", + "user_name", + "password", + "thumbprint_verification" + ] + }, + "vcenter.host.create_spec.thumbprint_verification": { + "type": "string", + "description": "The Host.CreateSpec.ThumbprintVerification enumerated type defines the thumbprint verification schemes for a host's SSL certificate.", + "enum": [ + "NONE", + "THUMBPRINT" + ] + }, + "vcenter.host.filter_spec": { + "type": "object", + "properties": { + "hosts": { + "description": "Identifiers of hosts that can match the filter.\nIf unset or empty, hosts with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that hosts must have to match the filter (see Host.Summary.name).\nIf unset or empty, hosts with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "folders": { + "description": "Folders that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "standalone": { + "description": "If true, only hosts that are not part of a cluster can match the filter, and if false, only hosts that are are part of a cluster can match the filter.\nIf unset Hosts can match filter independent of whether they are part of a cluster or not. If this field is true and Host.FilterSpec.clusters os not empty, no hosts will match the filter.", + "type": "boolean" + }, + "clusters": { + "description": "Clusters that must contain the hosts for the hosts to match the filter.\nIf unset or empty, hosts in any cluster and hosts that are not in a cluster match the filter. If this field is not empty and Host.FilterSpec.standalone is true, no hosts will match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "connection_states": { + "description": "Connection states that a host must be in to match the filter (see Host.Summary.connection-state.\nIf unset or empty, hosts in any connection state match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/vcenter.host.connection_state" + } + } + } + }, + "vcenter.host.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.host.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.host.power_state": { + "type": "string", + "description": "The Host.PowerState enumerated type defines the power states of a host.", + "enum": [ + "POWERED_ON", + "POWERED_OFF", + "STANDBY" + ] + }, + "vcenter.host.summary": { + "type": "object", + "properties": { + "host": { + "description": "Identifier of the host.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem.", + "type": "string" + }, + "name": { + "description": "Name of the host.", + "type": "string" + }, + "connection_state": { + "description": "Connection status of the host", + "$ref": "#/definitions/vcenter.host.connection_state" + }, + "power_state": { + "description": "Power state of the host\nThis field is optional and it is only relevant when the value of Host.Summary.connection-state is CONNECTED.", + "$ref": "#/definitions/vcenter.host.power_state" + } + }, + "required": [ + "host", + "name", + "connection_state" + ] + }, + "vcenter.host_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.host.create_spec", + "description": "Specification for the new host to be created." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.inventory.datastore.find_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.inventory.datastore.info" + } + } + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.inventory.datastore.info": { + "type": "object", + "properties": { + "type": { + "description": "Type of the datastore.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.inventory.datastore_find": { + "type": "object", + "properties": { + "datastores": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers of the datastores for which information will be returned." + } + }, + "required": [ + "datastores" + ] + }, + "vcenter.inventory.network.find_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.inventory.network.info" + } + } + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.inventory.network.info": { + "type": "object", + "properties": { + "type": { + "description": "Type of the vCenter Server network.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.inventory.network_find": { + "type": "object", + "properties": { + "networks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Identifiers of the vCenter Server networks for which information will be returned." + } + }, + "required": [ + "networks" + ] + }, + "vcenter.iso.image.mount_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.iso.image_mount": { + "type": "object", + "properties": { + "vm": { + "type": "string", + "description": "The identifier of the virtual machine where the specified ISO image will be mounted." + } + }, + "required": [ + "vm" + ] + }, + "vcenter.iso.image_unmount": { + "type": "object", + "properties": { + "cdrom": { + "type": "string", + "description": "The device identifier of the CD-ROM." + } + }, + "required": [ + "cdrom" + ] + }, + "vcenter.network.filter_spec": { + "type": "object", + "properties": { + "networks": { + "description": "Identifiers of networks that can match the filter.\nIf unset or empty, networks with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Network. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Network.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that networks must have to match the filter (see Network.Summary.name).\nIf unset or empty, networks with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "types": { + "description": "Types that networks must have to match the filter (see Network.Summary.type).\nIf unset, networks with any type match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/vcenter.network.type" + } + }, + "folders": { + "description": "Folders that must contain the network for the network to match the filter.\nIf unset or empty, networks in any folder match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the network for the network to match the filter.\nIf unset or empty, networks in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.network.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.network.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.network.summary": { + "type": "object", + "properties": { + "network": { + "description": "Identifier of the network.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Network. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Network.", + "type": "string" + }, + "name": { + "description": "Name of the network.", + "type": "string" + }, + "type": { + "description": "Type (Type) of the vCenter Server network.", + "$ref": "#/definitions/vcenter.network.type" + } + }, + "required": [ + "network", + "name", + "type" + ] + }, + "vcenter.network.type": { + "type": "string", + "enum": [ + "STANDARD_PORTGROUP", + "DISTRIBUTED_PORTGROUP", + "OPAQUE_NETWORK" + ] + }, + "vcenter.ovf.capability.capability_info": { + "type": "object", + "properties": { + "import_ova": { + "description": "Boolean flag to show whether or not import OVA template is supported.", + "type": "boolean" + }, + "export_ova": { + "description": "Boolean flag to show whether or not export OVA template is supported.", + "type": "boolean" + } + }, + "required": [ + "import_ova", + "export_ova" + ] + }, + "vcenter.ovf.capability_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.ovf.capability.capability_info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.ovf.disk_provisioning_type": { + "type": "string", + "description": "The {@name DiskProvisioningType} {@term enumerated type} defines the virtual disk provisioning types that can be set for a disk on the target platform.", + "enum": [ + "thin", + "thick", + "eagerZeroedThick" + ] + }, + "vcenter.ovf.export_flag.info": { + "type": "object", + "properties": { + "option": { + "description": "The name of the export flag that is supported by the server.", + "type": "string" + }, + "description": { + "description": "Localizable description of the export flag.", + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "required": [ + "option", + "description" + ] + }, + "vcenter.ovf.export_flag.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.export_flag.info" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.ovf.import_flag.info": { + "type": "object", + "properties": { + "option": { + "description": "The name of the import flag that is supported by the deployment platform.", + "type": "string" + }, + "description": { + "description": "Localizable description of the import flag.", + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "required": [ + "option", + "description" + ] + }, + "vcenter.ovf.import_flag.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.import_flag.info" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.ovf.library_item.create_result": { + "type": "object", + "properties": { + "succeeded": { + "description": "Whether the {@name LibraryItem#create} {@term operation} completed successfully.", + "type": "boolean" + }, + "ovf_library_item_id": { + "description": "Identifier of the created or updated library item.", + "type": "string" + }, + "error": { + "description": "Errors, warnings, and informational messages produced by the {@name LibraryItem#create} {@term operation}.", + "$ref": "#/definitions/vcenter.ovf.library_item.result_info" + } + }, + "required": [ + "succeeded" + ] + }, + "vcenter.ovf.library_item.create_spec": { + "type": "object", + "properties": { + "name": { + "description": "Name to use in the OVF descriptor stored in the library item.", + "type": "string" + }, + "description": { + "description": "Description to use in the OVF descriptor stored in the library item.", + "type": "string" + }, + "flags": { + "description": "Flags to use for OVF package creation. The supported flags can be obtained using {@link ExportFlag#list}.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "vcenter.ovf.library_item.create_target": { + "type": "object", + "properties": { + "library_id": { + "description": "Identifier of the library in which a new library item should be created. This {@term field} is not used if the {@name #libraryItemId} {@term field} is specified.", + "type": "string" + }, + "library_item_id": { + "description": "Identifier of the library item that should be should be updated.", + "type": "string" + } + } + }, + "vcenter.ovf.library_item.deploy_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.ovf.library_item.deployment_result" + } + }, + "required": [ + "value" + ] + }, + "vcenter.ovf.library_item.deployable_identity": { + "type": "object", + "properties": { + "type": { + "description": "Type of the deployable resource.", + "type": "string" + }, + "id": { + "description": "Identifier of the deployable resource.", + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + }, + "vcenter.ovf.library_item.deployment_result": { + "type": "object", + "properties": { + "succeeded": { + "description": "Whether the {@name LibraryItem#deploy} {@term operation} completed successfully.", + "type": "boolean" + }, + "resource_id": { + "description": "Identifier of the deployed resource entity.", + "$ref": "#/definitions/vcenter.ovf.library_item.deployable_identity" + }, + "error": { + "description": "Errors, warnings, and informational messages produced by the {@name LibraryItem#deploy} {@term operation}.", + "$ref": "#/definitions/vcenter.ovf.library_item.result_info" + } + }, + "required": [ + "succeeded" + ] + }, + "vcenter.ovf.library_item.deployment_target": { + "type": "object", + "properties": { + "resource_pool_id": { + "description": "Identifier of the resource pool to which the virtual machine or virtual appliance should be attached.", + "type": "string" + }, + "host_id": { + "description": "Identifier of the target host on which the virtual machine or virtual appliance will run. The target host must be a member of the cluster that contains the resource pool identified by {@link #resourcePoolId}.", + "type": "string" + }, + "folder_id": { + "description": "Identifier of the vCenter folder that should contain the virtual machine or virtual appliance. The folder must be virtual machine folder.", + "type": "string" + } + }, + "required": [ + "resource_pool_id" + ] + }, + "vcenter.ovf.library_item.filter_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.ovf.library_item.ovf_summary" + } + }, + "required": [ + "value" + ] + }, + "vcenter.ovf.library_item.ovf_summary": { + "type": "object", + "properties": { + "name": { + "description": "Default name for the virtual machine or virtual appliance.", + "type": "string" + }, + "annotation": { + "description": "Default annotation for the virtual machine or virtual appliance.", + "type": "string" + }, + "EULAs": { + "description": "End User License Agreements specified in the OVF descriptor. All end user license agreements must be accepted in order for the {@name LibraryItem#deploy} {@term operation} to succeed. See {@link ResourcePoolDeploymentSpec#acceptAllEula}.", + "type": "array", + "items": { + "type": "string" + } + }, + "networks": { + "description": "Section identifiers for sections of type ovf:NetworkSection in the OVF descriptor. These identifiers can be used as keys in {@link ResourcePoolDeploymentSpec#networkMappings}.", + "type": "array", + "items": { + "type": "string" + } + }, + "storage_groups": { + "description": "Section identifiers for sections of type vmw:StorageGroupSection in the OVF descriptor. These identifiers can be used as keys in {@link ResourcePoolDeploymentSpec#storageMappings}.", + "type": "array", + "items": { + "type": "string" + } + }, + "additional_params": { + "description": "Additional OVF parameters which can be specified for the deployment target. These OVF parameters can be inspected, optionally modified, and used as values in {@link ResourcePoolDeploymentSpec#additionalParameters} for the {@name LibraryItem#deploy} {@term operation}.", + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "EULAs" + ] + }, + "vcenter.ovf.library_item.resource_pool_deployment_spec": { + "type": "object", + "properties": { + "name": { + "description": "Name assigned to the deployed target virtual machine or virtual appliance.", + "type": "string" + }, + "annotation": { + "description": "Annotation assigned to the deployed target virtual machine or virtual appliance.", + "type": "string" + }, + "accept_all_EULA": { + "description": "Whether to accept all End User License Agreements. See {@link OvfSummary#eulas}.", + "type": "boolean" + }, + "network_mappings": { + "description": "Specification of the target network to use for sections of type ovf:NetworkSection in the OVF descriptor. The key in the {@term map} is the section identifier of the ovf:NetworkSection section in the OVF descriptor and the value is the target network to be used for deployment.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "storage_mappings": { + "description": "Specification of the target storage to use for sections of type vmw:StorageGroupSection in the OVF descriptor. The key in the {@term map} is the section identifier of the ovf:StorageGroupSection section in the OVF descriptor and the value is the target storage specification to be used for deployment. See {@link StorageGroupMapping}.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/vcenter.ovf.library_item.storage_group_mapping" + } + } + } + }, + "storage_provisioning": { + "description": "Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor.", + "$ref": "#/definitions/vcenter.ovf.disk_provisioning_type" + }, + "storage_profile_id": { + "description": "Default storage profile to use for all sections of type vmw:StorageSection in the OVF descriptor.", + "type": "string" + }, + "locale": { + "description": "The locale to use for parsing the OVF descriptor.", + "type": "string" + }, + "flags": { + "description": "Flags to be use for deployment. The supported flag values can be obtained using {@link ImportFlag#list}.", + "type": "array", + "items": { + "type": "string" + } + }, + "additional_parameters": { + "description": "Additional OVF parameters that may be needed for the deployment. Additional OVF parameters may be required by the OVF descriptor of the OVF package in the library item. Examples of OVF parameters that can be specified through this {@term field} include, but are not limited to:

  • {@link DeploymentOptionParams}
  • {@link ExtraConfigParams}
  • {@link IpAllocationParams}
  • {@link PropertyParams}
  • {@link ScaleOutParams}
  • {@link VcenterExtensionParams}
", + "type": "array", + "items": { + "type": "object" + } + }, + "default_datastore_id": { + "description": "Default datastore to use for all sections of type vmw:StorageSection in the OVF descriptor.", + "type": "string" + } + }, + "required": [ + "accept_all_EULA" + ] + }, + "vcenter.ovf.library_item.result_info": { + "type": "object", + "properties": { + "errors": { + "description": "Errors reported by the {@name LibraryItem#create} or {@name LibraryItem#deploy} {@term operation}. These errors would have prevented the {@name LibraryItem#create} or {@name LibraryItem#deploy} {@term operation} from completing successfully.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.ovf_error" + } + }, + "warnings": { + "description": "Warnings reported by the {@name LibraryItem#create} or {@name LibraryItem#deploy} {@term operation}. These warnings would not have prevented the {@name LibraryItem#create} or {@name LibraryItem#deploy} {@term operation} from completing successfully, but there might be issues that warrant attention.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.ovf_warning" + } + }, + "information": { + "description": "Information messages reported by the {@name LibraryItem#create} or {@name LibraryItem#deploy} {@term operation}. For example, a non-required parameter was ignored.", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.ovf_info" + } + } + }, + "required": [ + "errors", + "warnings", + "information" + ] + }, + "vcenter.ovf.library_item.storage_group_mapping": { + "type": "object", + "properties": { + "type": { + "description": "Type of storage deployment target to use for the vmw:StorageGroupSection section. The specified value must be {@link Type#DATASTORE} or {@link Type#STORAGE_PROFILE}.", + "$ref": "#/definitions/vcenter.ovf.library_item.storage_group_mapping.type" + }, + "datastore_id": { + "description": "Target datastore to be used for the storage group.", + "type": "string" + }, + "storage_profile_id": { + "description": "Target storage profile to be used for the storage group.", + "type": "string" + }, + "provisioning": { + "description": "Target provisioning type to use for the storage group.", + "$ref": "#/definitions/vcenter.ovf.disk_provisioning_type" + } + }, + "required": [ + "type" + ] + }, + "vcenter.ovf.library_item.storage_group_mapping.type": { + "type": "string", + "description": "The {@name Type} {@term enumerated type} defines the supported types of storage targets for sections of type vmw:StroageGroupSection in the OVF descriptor.", + "enum": [ + "DATASTORE", + "STORAGE_PROFILE" + ] + }, + "vcenter.ovf.library_item_create": { + "type": "object", + "properties": { + "client_token": { + "type": "string", + "description": "Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried." + }, + "source": { + "$ref": "#/definitions/vcenter.ovf.library_item.deployable_identity", + "description": "Identifier of the virtual machine or virtual appliance to use as the source." + }, + "target": { + "$ref": "#/definitions/vcenter.ovf.library_item.create_target", + "description": "Specification of the target content library and library item." + }, + "create_spec": { + "$ref": "#/definitions/vcenter.ovf.library_item.create_spec", + "description": "Information used to create the OVF package from the source virtual machine or virtual appliance." + } + }, + "required": [ + "source", + "target", + "create_spec" + ] + }, + "vcenter.ovf.library_item_deploy": { + "type": "object", + "properties": { + "client_token": { + "type": "string", + "description": "Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried." + }, + "target": { + "$ref": "#/definitions/vcenter.ovf.library_item.deployment_target", + "description": "Specification of the deployment target." + }, + "deployment_spec": { + "$ref": "#/definitions/vcenter.ovf.library_item.resource_pool_deployment_spec", + "description": "Specification of how the OVF package should be deployed to the target." + } + }, + "required": [ + "target", + "deployment_spec" + ] + }, + "vcenter.ovf.library_item_filter": { + "type": "object", + "properties": { + "target": { + "$ref": "#/definitions/vcenter.ovf.library_item.deployment_target", + "description": "Specification of the deployment target." + } + }, + "required": [ + "target" + ] + }, + "vcenter.ovf.ovf_error": { + "type": "object", + "properties": { + "category": { + "description": "The message category.", + "$ref": "#/definitions/vcenter.ovf.ovf_message.category" + }, + "issues": { + "description": "{@term List} of parse issues (see {@link ParseIssue}).", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.parse_issue" + } + }, + "name": { + "description": "The name of input parameter.", + "type": "string" + }, + "value": { + "description": "The value of input parameter.", + "type": "string" + }, + "message": { + "description": "A localizable message.", + "$ref": "#/definitions/vapi.std.localizable_message" + }, + "error": { + "description": "Represents a server {@link Error}.", + "type": "object" + } + }, + "required": [ + "category" + ] + }, + "vcenter.ovf.ovf_info": { + "type": "object", + "properties": { + "messages": { + "description": "A {@term list} of localizable messages (see {@link LocalizableMessage}).", + "type": "array", + "items": { + "$ref": "#/definitions/vapi.std.localizable_message" + } + } + }, + "required": [ + "messages" + ] + }, + "vcenter.ovf.ovf_message.category": { + "type": "string", + "description": "The {@name Category} {@term enumerated type} defines the categories of messages (see {@link OvfMessage}).", + "enum": [ + "VALIDATION", + "INPUT", + "SERVER" + ] + }, + "vcenter.ovf.ovf_warning": { + "type": "object", + "properties": { + "category": { + "description": "The message category.", + "$ref": "#/definitions/vcenter.ovf.ovf_message.category" + }, + "issues": { + "description": "{@term List} of parse issues (see {@link ParseIssue}).", + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.ovf.parse_issue" + } + }, + "name": { + "description": "The name of input parameter.", + "type": "string" + }, + "value": { + "description": "The value of input parameter.", + "type": "string" + }, + "message": { + "description": "A localizable message.", + "$ref": "#/definitions/vapi.std.localizable_message" + }, + "error": { + "description": "Represents a server {@link Error}.", + "type": "object" + } + }, + "required": [ + "category" + ] + }, + "vcenter.ovf.parse_issue": { + "type": "object", + "properties": { + "category": { + "description": "The category of the parse issue.", + "$ref": "#/definitions/vcenter.ovf.parse_issue.category" + }, + "file": { + "description": "The name of the file in which the parse issue was found.", + "type": "string" + }, + "line_number": { + "description": "The line number of the line in the file (see {@link #file}) where the parse issue was found (or -1 if not applicable).", + "type": "integer", + "format": "int64" + }, + "column_number": { + "description": "The position in the line (see {@link #lineNumber}) (or -1 if not applicable).", + "type": "integer", + "format": "int64" + }, + "message": { + "description": "A localizable message describing the parse issue.", + "$ref": "#/definitions/vapi.std.localizable_message" + } + }, + "required": [ + "category", + "file", + "line_number", + "column_number", + "message" + ] + }, + "vcenter.ovf.parse_issue.category": { + "type": "string", + "description": "The {@name Category} {@term enumerated type} defines the categories of issues that can be found when parsing files inside an OVF package (see {@link ParseIssue}) including OVF descriptor (which is an XML document), manifest and certificate files, or exporting an OVF package.", + "enum": [ + "VALUE_ILLEGAL", + "ATTRIBUTE_REQUIRED", + "ATTRIBUTE_ILLEGAL", + "ELEMENT_REQUIRED", + "ELEMENT_ILLEGAL", + "ELEMENT_UNKNOWN", + "SECTION_UNKNOWN", + "SECTION_RESTRICTION", + "PARSE_ERROR", + "GENERATE_ERROR", + "VALIDATION_ERROR", + "EXPORT_ERROR", + "INTERNAL_ERROR" + ] + }, + "vcenter.resource_pool.filter_spec": { + "type": "object", + "properties": { + "resource_pools": { + "description": "Identifiers of resource pools that can match the filter.\nIf unset or empty, resource pools with any identifier match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "names": { + "description": "Names that resource pools must have to match the filter (see ResourcePool.Info.name).\nIf unset or empty, resource pools with any name match the filter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "parent_resource_pools": { + "description": "Resource pools that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any resource pool match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenters": { + "description": "Datacenters that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any datacenter match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "hosts": { + "description": "Hosts that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any host match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "description": "Clusters that must contain the resource pool for the resource pool to match the filter.\nIf unset or empty, resource pools in any cluster match the filter.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "vcenter.resource_pool.info": { + "type": "object", + "properties": { + "name": { + "description": "Name of the vCenter Server resource pool.", + "type": "string" + }, + "resource_pools": { + "description": "Identifiers of the child resource pools contained in this resource pool.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ResourcePool.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "resource_pools" + ] + }, + "vcenter.resource_pool.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.resource_pool.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.resource_pool.summary": { + "type": "object", + "properties": { + "resource_pool": { + "description": "Identifier of the resource pool.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool.", + "type": "string" + }, + "name": { + "description": "Name of the resource pool.", + "type": "string" + } + }, + "required": [ + "resource_pool", + "name" + ] + }, + "vcenter.resource_pool_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.resource_pool.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.guest_OS": { + "type": "string", + "description": "The GuestOS enumerated type defines the valid guest operating system types used for configuring a virtual machine.", + "enum": [ + "DOS", + "WIN_31", + "WIN_95", + "WIN_98", + "WIN_ME", + "WIN_NT", + "WIN_2000_PRO", + "WIN_2000_SERV", + "WIN_2000_ADV_SERV", + "WIN_XP_HOME", + "WIN_XP_PRO", + "WIN_XP_PRO_64", + "WIN_NET_WEB", + "WIN_NET_STANDARD", + "WIN_NET_ENTERPRISE", + "WIN_NET_DATACENTER", + "WIN_NET_BUSINESS", + "WIN_NET_STANDARD_64", + "WIN_NET_ENTERPRISE_64", + "WIN_LONGHORN", + "WIN_LONGHORN_64", + "WIN_NET_DATACENTER_64", + "WIN_VISTA", + "WIN_VISTA_64", + "WINDOWS_7", + "WINDOWS_7_64", + "WINDOWS_7_SERVER_64", + "WINDOWS_8", + "WINDOWS_8_64", + "WINDOWS_8_SERVER_64", + "WINDOWS_9", + "WINDOWS_9_64", + "WINDOWS_9_SERVER_64", + "WINDOWS_HYPERV", + "FREEBSD", + "FREEBSD_64", + "REDHAT", + "RHEL_2", + "RHEL_3", + "RHEL_3_64", + "RHEL_4", + "RHEL_4_64", + "RHEL_5", + "RHEL_5_64", + "RHEL_6", + "RHEL_6_64", + "RHEL_7", + "RHEL_7_64", + "CENTOS", + "CENTOS_64", + "CENTOS_6", + "CENTOS_6_64", + "CENTOS_7", + "CENTOS_7_64", + "ORACLE_LINUX", + "ORACLE_LINUX_64", + "ORACLE_LINUX_6", + "ORACLE_LINUX_6_64", + "ORACLE_LINUX_7", + "ORACLE_LINUX_7_64", + "SUSE", + "SUSE_64", + "SLES", + "SLES_64", + "SLES_10", + "SLES_10_64", + "SLES_11", + "SLES_11_64", + "SLES_12", + "SLES_12_64", + "NLD_9", + "OES", + "SJDS", + "MANDRAKE", + "MANDRIVA", + "MANDRIVA_64", + "TURBO_LINUX", + "TURBO_LINUX_64", + "UBUNTU", + "UBUNTU_64", + "DEBIAN_4", + "DEBIAN_4_64", + "DEBIAN_5", + "DEBIAN_5_64", + "DEBIAN_6", + "DEBIAN_6_64", + "DEBIAN_7", + "DEBIAN_7_64", + "DEBIAN_8", + "DEBIAN_8_64", + "DEBIAN_9", + "DEBIAN_9_64", + "DEBIAN_10", + "DEBIAN_10_64", + "ASIANUX_3", + "ASIANUX_3_64", + "ASIANUX_4", + "ASIANUX_4_64", + "ASIANUX_5_64", + "ASIANUX_7_64", + "OPENSUSE", + "OPENSUSE_64", + "FEDORA", + "FEDORA_64", + "COREOS_64", + "VMWARE_PHOTON_64", + "OTHER_24X_LINUX", + "OTHER_24X_LINUX_64", + "OTHER_26X_LINUX", + "OTHER_26X_LINUX_64", + "OTHER_3X_LINUX", + "OTHER_3X_LINUX_64", + "OTHER_LINUX", + "GENERIC_LINUX", + "OTHER_LINUX_64", + "SOLARIS_6", + "SOLARIS_7", + "SOLARIS_8", + "SOLARIS_9", + "SOLARIS_10", + "SOLARIS_10_64", + "SOLARIS_11_64", + "OS2", + "ECOMSTATION", + "ECOMSTATION_2", + "NETWARE_4", + "NETWARE_5", + "NETWARE_6", + "OPENSERVER_5", + "OPENSERVER_6", + "UNIXWARE_7", + "DARWIN", + "DARWIN_64", + "DARWIN_10", + "DARWIN_10_64", + "DARWIN_11", + "DARWIN_11_64", + "DARWIN_12_64", + "DARWIN_13_64", + "DARWIN_14_64", + "DARWIN_15_64", + "DARWIN_16_64", + "VMKERNEL", + "VMKERNEL_5", + "VMKERNEL_6", + "VMKERNEL_65", + "OTHER", + "OTHER_64" + ] + }, + "vcenter.vm.hardware.adapter.sata.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.sata.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Adapter type.\nIf unset, a guest-specific default value will be used.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.type" + }, + "bus": { + "description": "SATA bus number.\nIf unset, the server will choose an available bus number; if none is available, the request will fail.", + "type": "integer", + "format": "int64" + }, + "pci_slot_number": { + "description": "Address of the SATA adapter on the PCI bus.\nIf unset, the server will choose an available address when the virtual machine is powered on.", + "type": "integer", + "format": "int64" + } + } + }, + "vcenter.vm.hardware.adapter.sata.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "type": { + "description": "Adapter type.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.type" + }, + "bus": { + "description": "SATA bus number.", + "type": "integer", + "format": "int64" + }, + "pci_slot_number": { + "description": "Address of the SATA adapter on the PCI bus.\nMay be unset if the virtual machine has never been powered on since the adapter was created.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "label", + "type", + "bus" + ] + }, + "vcenter.vm.hardware.adapter.sata.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.sata.summary": { + "type": "object", + "properties": { + "adapter": { + "description": "Identifier of the virtual SATA adapter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.SataAdapter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.SataAdapter.", + "type": "string" + } + }, + "required": [ + "adapter" + ] + }, + "vcenter.vm.hardware.adapter.sata.type": { + "type": "string", + "description": "The Sata.Type enumerated type defines the valid emulation types for a virtual SATA adapter.", + "enum": [ + "AHCI" + ] + }, + "vcenter.vm.hardware.adapter.sata_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.create_spec", + "description": "Specification for the new virtual SATA adapter." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.adapter.sata_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.sata.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.scsi.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.scsi.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Adapter type.\nIf unset, a guest-specific default value will be used.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.type" + }, + "bus": { + "description": "SCSI bus number.\nIf unset, the server will choose an available bus number; if none is available, the request will fail.", + "type": "integer", + "format": "int64" + }, + "pci_slot_number": { + "description": "Address of the SCSI adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added.\nIf unset, the server will choose an available address when the virtual machine is powered on.", + "type": "integer", + "format": "int64" + }, + "sharing": { + "description": "Bus sharing mode.\nIf unset, the adapter will default to NONE.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.sharing" + } + } + }, + "vcenter.vm.hardware.adapter.scsi.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "type": { + "description": "Adapter type.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.type" + }, + "scsi": { + "description": "Address of the SCSI adapter on the SCSI bus.", + "$ref": "#/definitions/vcenter.vm.hardware.scsi_address_info" + }, + "pci_slot_number": { + "description": "Address of the SCSI adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added.\nMay be unset if the virtual machine has never been powered on since the adapter was created.", + "type": "integer", + "format": "int64" + }, + "sharing": { + "description": "Bus sharing mode.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.sharing" + } + }, + "required": [ + "label", + "type", + "scsi", + "sharing" + ] + }, + "vcenter.vm.hardware.adapter.scsi.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.scsi.sharing": { + "type": "string", + "description": "The Scsi.Sharing enumerated type defines the valid bus sharing modes for a virtual SCSI adapter.", + "enum": [ + "NONE", + "VIRTUAL", + "PHYSICAL" + ] + }, + "vcenter.vm.hardware.adapter.scsi.summary": { + "type": "object", + "properties": { + "adapter": { + "description": "Identifier of the virtual SCSI adapter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.ScsiAdapter.", + "type": "string" + } + }, + "required": [ + "adapter" + ] + }, + "vcenter.vm.hardware.adapter.scsi.type": { + "type": "string", + "description": "The Scsi.Type enumerated type defines the valid emulation types for a virtual SCSI adapter.", + "enum": [ + "BUSLOGIC", + "LSILOGIC", + "LSILOGICSAS", + "PVSCSI" + ] + }, + "vcenter.vm.hardware.adapter.scsi.update_spec": { + "type": "object", + "properties": { + "sharing": { + "description": "Bus sharing mode. \n This field may only be modified if the virtual machine is not powered on.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.sharing" + } + } + }, + "vcenter.vm.hardware.adapter.scsi_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.create_spec", + "description": "Specification for the new virtual SCSI adapter." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.adapter.scsi_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.adapter.scsi_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.adapter.scsi.update_spec", + "description": "Specification for updating the virtual SCSI adapter." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.boot.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Firmware type to be used by the virtual machine.\nIf unset, defaults to value that is recommended for the guest OS and is supported for the virtual hardware version.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.type" + }, + "efi_legacy_boot": { + "description": "Flag indicating whether to use EFI legacy boot mode.\nIf unset, defaults to value that is recommended for the guest OS and is supported for the virtual hardware version.", + "type": "boolean" + }, + "network_protocol": { + "description": "Protocol to use when attempting to boot the virtual machine over the network.\nIf unset, defaults to a system defined default value.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.network_protocol" + }, + "delay": { + "description": "Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode.\nIf unset, default value is 0.", + "type": "integer", + "format": "int64" + }, + "retry": { + "description": "Flag indicating whether the virtual machine should automatically retry the boot process after a failure.\nIf unset, default value is false.", + "type": "boolean" + }, + "retry_delay": { + "description": "Delay in milliseconds before retrying the boot process after a failure; applicable only when Boot.Info.retry is true.\nIf unset, default value is 10000.", + "type": "integer", + "format": "int64" + }, + "enter_setup_mode": { + "description": "Flag indicating whether the firmware boot process should automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.boot.device.entry": { + "type": "object", + "properties": { + "type": { + "description": "Virtual device type.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.type" + }, + "nic": { + "description": "Virtual Ethernet device. Ethernet device to use as boot device for this entry.\nThis field is optional and it is only relevant when the value of Device.Entry.type is ETHERNET.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.Ethernet. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.Ethernet.", + "type": "string" + }, + "disks": { + "description": "Virtual disk device. List of virtual disks in boot order.\nThis field is optional and it is only relevant when the value of Device.Entry.type is DISK.\nWhen clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: vcenter.vm.hardware.Disk.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.boot.device.entry_create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Virtual Boot device type.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.type" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.boot.device.type": { + "type": "string", + "description": "The Device.Type enumerated type defines the valid device types that may be used as bootable devices.", + "enum": [ + "CDROM", + "DISK", + "ETHERNET", + "FLOPPY" + ] + }, + "vcenter.vm.hardware.boot.device_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.entry" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.boot.device_set": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.device.entry" + }, + "description": "Ordered list of boot devices." + } + }, + "required": [ + "devices" + ] + }, + "vcenter.vm.hardware.boot.info": { + "type": "object", + "properties": { + "type": { + "description": "Firmware type used by the virtual machine.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.type" + }, + "efi_legacy_boot": { + "description": "Flag indicating whether to use EFI legacy boot mode.\nThis field is optional and it is only relevant when the value of Boot.Info.type is EFI.", + "type": "boolean" + }, + "network_protocol": { + "description": "Protocol to use when attempting to boot the virtual machine over the network.\nThis field is optional and it is only relevant when the value of Boot.Info.type is EFI.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.network_protocol" + }, + "delay": { + "description": "Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode.", + "type": "integer", + "format": "int64" + }, + "retry": { + "description": "Flag indicating whether the virtual machine will automatically retry the boot process after a failure.", + "type": "boolean" + }, + "retry_delay": { + "description": "Delay in milliseconds before retrying the boot process after a failure; applicable only when Boot.Info.retry is true.", + "type": "integer", + "format": "int64" + }, + "enter_setup_mode": { + "description": "Flag indicating whether the firmware boot process will automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode.", + "type": "boolean" + } + }, + "required": [ + "type", + "delay", + "retry", + "retry_delay", + "enter_setup_mode" + ] + }, + "vcenter.vm.hardware.boot.network_protocol": { + "type": "string", + "description": "The Boot.NetworkProtocol enumerated type defines the valid network boot protocols supported when booting a virtual machine with EFI firmware over the network.", + "enum": [ + "IPV4", + "IPV6" + ] + }, + "vcenter.vm.hardware.boot.type": { + "type": "string", + "description": "The Boot.Type enumerated type defines the valid firmware types for a virtual machine.", + "enum": [ + "BIOS", + "EFI" + ] + }, + "vcenter.vm.hardware.boot.update_spec": { + "type": "object", + "properties": { + "type": { + "description": "Firmware type to be used by the virtual machine.\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.type" + }, + "efi_legacy_boot": { + "description": "Flag indicating whether to use EFI legacy boot mode.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "network_protocol": { + "description": "Protocol to use when attempting to boot the virtual machine over the network.\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.boot.network_protocol" + }, + "delay": { + "description": "Delay in milliseconds before beginning the firmware boot process when the virtual machine is powered on. This delay may be used to provide a time window for users to connect to the virtual machine console and enter BIOS setup mode.\nIf unset, the value is unchanged.", + "type": "integer", + "format": "int64" + }, + "retry": { + "description": "Flag indicating whether the virtual machine should automatically retry the boot process after a failure.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "retry_delay": { + "description": "Delay in milliseconds before retrying the boot process after a failure; applicable only when Boot.Info.retry is true.\nIf unset, the value is unchanged.", + "type": "integer", + "format": "int64" + }, + "enter_setup_mode": { + "description": "Flag indicating whether the firmware boot process should automatically enter setup mode the next time the virtual machine boots. Note that this flag will automatically be reset to false once the virtual machine enters setup mode.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.boot_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.boot_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.boot.update_spec", + "description": "Specification for updating the boot-related settings of the virtual machine." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.cdrom.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual CD-ROM device.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.backing_type" + }, + "iso_file": { + "description": "Path of the image file backing the virtual CD-ROM device.\nThis field is optional and it is only relevant when the value of Cdrom.BackingInfo.type is ISO_FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the host device backing the virtual CD-ROM device. \n\n\nThis field will be unset if Cdrom.BackingInfo.auto-detect is true and the virtual CD-ROM device is not connected or no suitable device is available on the host.", + "type": "string" + }, + "auto_detect": { + "description": "Flag indicating whether the virtual CD-ROM device is configured to automatically detect a suitable host device.\nThis field is optional and it is only relevant when the value of Cdrom.BackingInfo.type is HOST_DEVICE.", + "type": "boolean" + }, + "device_access_type": { + "description": "Access type for the device backing.\nThis field is optional and it is only relevant when the value of Cdrom.BackingInfo.type is one of HOST_DEVICE or CLIENT_DEVICE.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.device_access_type" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.cdrom.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual CD-ROM device.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.backing_type" + }, + "iso_file": { + "description": "Path of the image file that should be used as the virtual CD-ROM device backing.\nThis field is optional and it is only relevant when the value of Cdrom.BackingSpec.type is ISO_FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device that should be used as the virtual CD-ROM device backing.\nIf unset, the virtual CD-ROM device will be configured to automatically detect a suitable host device.", + "type": "string" + }, + "device_access_type": { + "description": "Access type for the device backing.\nIf unset, defaults to EMULATION.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.device_access_type" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.cdrom.backing_type": { + "type": "string", + "description": "The Cdrom.BackingType enumerated type defines the valid backing types for a virtual CD-ROM device.", + "enum": [ + "ISO_FILE", + "HOST_DEVICE", + "CLIENT_DEVICE" + ] + }, + "vcenter.vm.hardware.cdrom.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.cdrom.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Type of host bus adapter to which the device should be attached.\nIf unset, guest-specific default values will be used", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.host_bus_adapter_type" + }, + "ide": { + "description": "Address for attaching the device to a virtual IDE adapter.\nIf unset, the server will choose an available address; if none is available, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.ide_address_spec" + }, + "sata": { + "description": "Address for attaching the device to a virtual SATA adapter.\nIf unset, the server will choose an available address; if none is available, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.sata_address_spec" + }, + "backing": { + "description": "Physical resource backing for the virtual CD-ROM device.\nIf unset, defaults to automatic detection of a suitable host device.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nDefaults to false if unset.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nDefaults to false if unset.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.cdrom.device_access_type": { + "type": "string", + "description": "The Cdrom.DeviceAccessType enumerated type defines the valid device access types for a physical device packing of a virtual CD-ROM device.", + "enum": [ + "EMULATION", + "PASSTHRU", + "PASSTHRU_EXCLUSIVE" + ] + }, + "vcenter.vm.hardware.cdrom.host_bus_adapter_type": { + "type": "string", + "description": "The Cdrom.HostBusAdapterType enumerated type defines the valid types of host bus adapters that may be used for attaching a Cdrom to a virtual machine.", + "enum": [ + "IDE", + "SATA" + ] + }, + "vcenter.vm.hardware.cdrom.info": { + "type": "object", + "properties": { + "type": { + "description": "Type of host bus adapter to which the device is attached.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.host_bus_adapter_type" + }, + "label": { + "description": "Device label.", + "type": "string" + }, + "ide": { + "description": "Address of device attached to a virtual IDE adapter.\nThis field is optional and it is only relevant when the value of Cdrom.Info.type is IDE.", + "$ref": "#/definitions/vcenter.vm.hardware.ide_address_info" + }, + "sata": { + "description": "Address of device attached to a virtual SATA adapter.\nThis field is optional and it is only relevant when the value of Cdrom.Info.type is SATA.", + "$ref": "#/definitions/vcenter.vm.hardware.sata_address_info" + }, + "backing": { + "description": "Physical resource backing for the virtual CD-ROM device.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.backing_info" + }, + "state": { + "description": "Connection status of the virtual device.", + "$ref": "#/definitions/vcenter.vm.hardware.connection_state" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.", + "type": "boolean" + } + }, + "required": [ + "type", + "label", + "backing", + "state", + "start_connected", + "allow_guest_control" + ] + }, + "vcenter.vm.hardware.cdrom.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.cdrom.summary": { + "type": "object", + "properties": { + "cdrom": { + "description": "Identifier of the virtual CD-ROM device.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.Cdrom. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.Cdrom.", + "type": "string" + } + }, + "required": [ + "cdrom" + ] + }, + "vcenter.vm.hardware.cdrom.update_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual CD-ROM device. \n This field may only be modified if the virtual machine is not powered on or the virtual CD-ROM device is not connected.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.cdrom_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.create_spec", + "description": "Specification for the new virtual CD-ROM device." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.cdrom_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.cdrom_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.cdrom.update_spec", + "description": "Specification for updating the virtual CD-ROM device." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.connection_state": { + "type": "string", + "description": "The ConnectionState enumerated type defines the valid states for a removable device that is configured to be connected.", + "enum": [ + "CONNECTED", + "RECOVERABLE_ERROR", + "UNRECOVERABLE_ERROR", + "NOT_CONNECTED", + "UNKNOWN" + ] + }, + "vcenter.vm.hardware.cpu.info": { + "type": "object", + "properties": { + "count": { + "description": "Number of CPU cores.", + "type": "integer", + "format": "int64" + }, + "cores_per_socket": { + "description": "Number of CPU cores per socket.", + "type": "integer", + "format": "int64" + }, + "hot_add_enabled": { + "description": "Flag indicating whether adding CPUs while the virtual machine is running is enabled.", + "type": "boolean" + }, + "hot_remove_enabled": { + "description": "Flag indicating whether removing CPUs while the virtual machine is running is enabled.", + "type": "boolean" + } + }, + "required": [ + "count", + "cores_per_socket", + "hot_add_enabled", + "hot_remove_enabled" + ] + }, + "vcenter.vm.hardware.cpu.update_spec": { + "type": "object", + "properties": { + "count": { + "description": "New number of CPU cores. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. \n The supported range of CPU counts is constrained by the configured guest operating system and virtual hardware version of the virtual machine. \n\n If the virtual machine is running, the number of CPU cores may only be increased if Cpu.Info.hot-add-enabled is true, and may only be decreased if Cpu.Info.hot-remove-enabled is true.\n\nIf unset, the value is unchanged.", + "type": "integer", + "format": "int64" + }, + "cores_per_socket": { + "description": "New number of CPU cores per socket. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket.\nIf unset, the value is unchanged.", + "type": "integer", + "format": "int64" + }, + "hot_add_enabled": { + "description": "Flag indicating whether adding CPUs while the virtual machine is running is enabled. \n This field may only be modified if the virtual machine is powered off.\n\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "hot_remove_enabled": { + "description": "Flag indicating whether removing CPUs while the virtual machine is running is enabled. \n This field may only be modified if the virtual machine is powered off.\n\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.cpu_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.cpu.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.cpu_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.cpu.update_spec", + "description": "Specification for updating the CPU-related settings of the virtual machine." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.disk.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual disk.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.backing_type" + }, + "vmdk_file": { + "description": "Path of the VMDK file backing the virtual disk.\nThis field is optional and it is only relevant when the value of Disk.BackingInfo.type is VMDK_FILE.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.disk.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual disk.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.backing_type" + }, + "vmdk_file": { + "description": "Path of the VMDK file backing the virtual disk.\nThis field is optional and it is only relevant when the value of Disk.BackingSpec.type is VMDK_FILE.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.disk.backing_type": { + "type": "string", + "description": "The Disk.BackingType enumerated type defines the valid backing types for a virtual disk.", + "enum": [ + "VMDK_FILE" + ] + }, + "vcenter.vm.hardware.disk.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.disk.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Type of host bus adapter to which the device should be attached.\nIf unset, guest-specific default values will be used", + "$ref": "#/definitions/vcenter.vm.hardware.disk.host_bus_adapter_type" + }, + "ide": { + "description": "Address for attaching the device to a virtual IDE adapter.\nIf unset, the server will choose an available address; if none is available, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.ide_address_spec" + }, + "scsi": { + "description": "Address for attaching the device to a virtual SCSI adapter.\nIf unset, the server will choose an available address; if none is available, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.scsi_address_spec" + }, + "sata": { + "description": "Address for attaching the device to a virtual SATA adapter.\nIf unset, the server will choose an available address; if none is available, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.sata_address_spec" + }, + "backing": { + "description": "Existing physical resource backing for the virtual disk. Exactly one of Disk.CreateSpec.backing or Disk.CreateSpec.new-vmdk must be specified.\nIf unset, the virtual disk will not be connected to an existing backing.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.backing_spec" + }, + "new_vmdk": { + "description": "Specification for creating a new VMDK backing for the virtual disk. Exactly one of Disk.CreateSpec.backing or Disk.CreateSpec.new-vmdk must be specified.\nIf unset, a new VMDK backing will not be created.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.vmdk_create_spec" + } + } + }, + "vcenter.vm.hardware.disk.host_bus_adapter_type": { + "type": "string", + "description": "The Disk.HostBusAdapterType enumerated type defines the valid types of host bus adapters that may be used for attaching a virtual storage device to a virtual machine.", + "enum": [ + "IDE", + "SCSI", + "SATA" + ] + }, + "vcenter.vm.hardware.disk.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "type": { + "description": "Type of host bus adapter to which the device is attached.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.host_bus_adapter_type" + }, + "ide": { + "description": "Address of device attached to a virtual IDE adapter.\nWorkaround for PR1459646", + "$ref": "#/definitions/vcenter.vm.hardware.ide_address_info" + }, + "scsi": { + "description": "Address of device attached to a virtual SCSI adapter.\nWorkaround for PR1459646", + "$ref": "#/definitions/vcenter.vm.hardware.scsi_address_info" + }, + "sata": { + "description": "Address of device attached to a virtual SATA adapter.\nWorkaround for PR1459646", + "$ref": "#/definitions/vcenter.vm.hardware.sata_address_info" + }, + "backing": { + "description": "Physical resource backing for the virtual disk.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.backing_info" + }, + "capacity": { + "description": "Capacity of the virtual disk in bytes.\nIf unset, virtual disk is inaccessible or disk capacity is 0.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "label", + "type", + "backing" + ] + }, + "vcenter.vm.hardware.disk.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.disk.summary": { + "type": "object", + "properties": { + "disk": { + "description": "Identifier of the virtual Disk.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.Disk.", + "type": "string" + } + }, + "required": [ + "disk" + ] + }, + "vcenter.vm.hardware.disk.update_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual disk. \n This field may only be modified if the virtual machine is not powered on.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.disk.backing_spec" + } + } + }, + "vcenter.vm.hardware.disk.vmdk_create_spec": { + "type": "object", + "properties": { + "name": { + "description": "Base name of the VMDK file. The name should not include the '.vmdk' file extension.\nIf unset, a name (derived from the name of the virtual machine) will be chosen by the server.", + "type": "string" + }, + "capacity": { + "description": "Capacity of the virtual disk backing in bytes.\nIf unset, defaults to a guest-specific capacity.", + "type": "integer", + "format": "int64" + } + } + }, + "vcenter.vm.hardware.disk_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.create_spec", + "description": "Specification for the new virtual disk." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.disk_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.disk_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.disk.update_spec", + "description": "Specification for updating the virtual disk." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.ethernet.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual Ethernet adapter.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.backing_type" + }, + "network": { + "description": "Identifier of the network backing the virtual Ethernet adapter.\nIf unset, the identifier of the network backing could not be determined.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Network. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Network.", + "type": "string" + }, + "network_name": { + "description": "Name of the standard portgroup backing the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingInfo.type is STANDARD_PORTGROUP.", + "type": "string" + }, + "host_device": { + "description": "Name of the device backing the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingInfo.type is HOST_DEVICE.", + "type": "string" + }, + "distributed_switch_uuid": { + "description": "UUID of the distributed virtual switch that backs the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingInfo.type is DISTRIBUTED_PORTGROUP.", + "type": "string" + }, + "distributed_port": { + "description": "Key of the distributed virtual port that backs the virtual Ethernet adapter.\nThis field will be unset if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.", + "type": "string" + }, + "connection_cookie": { + "description": "Server-generated cookie that identifies the connection to the port. This ookie may be used to verify that the virtual machine is the rightful owner of the port.\nThis field will be unset if the virtual Ethernet device is not bound to a distributed virtual port; this can happen if the virtual machine is powered off or the virtual Ethernet device is not connected.", + "type": "integer", + "format": "int64" + }, + "opaque_network_type": { + "description": "Type of the opaque network that backs the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingInfo.type is OPAQUE_NETWORK.", + "type": "string" + }, + "opaque_network_id": { + "description": "Identifier of the opaque network that backs the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingInfo.type is OPAQUE_NETWORK.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.ethernet.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual Ethernet adapter.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.backing_type" + }, + "network": { + "description": "Identifier of the network that backs the virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.BackingSpec.type is one of STANDARD_PORTGROUP, DISTRIBUTED_PORTGROUP, or OPAQUE_NETWORK.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Network. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Network.", + "type": "string" + }, + "distributed_port": { + "description": "Key of the distributed virtual port that backs the virtual Ethernet adapter. Depending on the type of the Portgroup, the port may be specified using this field. If the portgroup type is early-binding (also known as static), a port is assigned when the Ethernet adapter is configured to use the port. The port may be either automatically or specifically assigned based on the value of this field. If the portgroup type is ephemeral, the port is created and assigned to a virtual machine when it is powered on and the Ethernet adapter is connected. This field cannot be specified as no free ports exist before use.\nMay be used to specify a port when the network specified on the Ethernet.BackingSpec.network field is a static or early binding distributed portgroup. If unset, the port will be automatically assigned to the Ethernet adapter based on the policy embodied by the portgroup type.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.ethernet.backing_type": { + "type": "string", + "description": "The Ethernet.BackingType enumerated type defines the valid backing types for a virtual Ethernet adapter.", + "enum": [ + "STANDARD_PORTGROUP", + "HOST_DEVICE", + "DISTRIBUTED_PORTGROUP", + "OPAQUE_NETWORK" + ] + }, + "vcenter.vm.hardware.ethernet.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.ethernet.create_spec": { + "type": "object", + "properties": { + "type": { + "description": "Ethernet adapter emulation type.\nIf unset, defaults to a guest-specific type.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.emulation_type" + }, + "upt_compatibility_enabled": { + "description": "Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter.\nIf unset, defaults to false.", + "type": "boolean" + }, + "mac_type": { + "description": "MAC address type.\nIf unset, defaults to GENERATED.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.mac_address_type" + }, + "mac_address": { + "description": "MAC address.\nWorkaround for PR1459647", + "type": "string" + }, + "pci_slot_number": { + "description": "Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change when it the VM is started or as the device is hot added.\nIf unset, the server will choose an available address when the virtual machine is powered on.", + "type": "integer", + "format": "int64" + }, + "wake_on_lan_enabled": { + "description": "Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter.\nDefaults to false if unset.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual Ethernet adapter.\nIf unset, the system may try to find an appropriate backing. If one is not found, the request will fail.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nDefaults to false if unset.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nDefaults to false if unset.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.ethernet.emulation_type": { + "type": "string", + "description": "The Ethernet.EmulationType enumerated type defines the valid emulation types for a virtual Ethernet adapter.", + "enum": [ + "E1000", + "E1000E", + "PCNET32", + "VMXNET", + "VMXNET2", + "VMXNET3" + ] + }, + "vcenter.vm.hardware.ethernet.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "type": { + "description": "Ethernet adapter emulation type.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.emulation_type" + }, + "upt_compatibility_enabled": { + "description": "Flag indicating whether Universal Pass-Through (UPT) compatibility is enabled on this virtual Ethernet adapter.\nThis field is optional and it is only relevant when the value of Ethernet.Info.type is VMXNET3.", + "type": "boolean" + }, + "mac_type": { + "description": "MAC address type.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.mac_address_type" + }, + "mac_address": { + "description": "MAC address.\nMay be unset if Ethernet.Info.mac-type is MANUAL and has not been specified, or if Ethernet.Info.mac-type is GENERATED and the virtual machine has never been powered on since the Ethernet adapter was created.", + "type": "string" + }, + "pci_slot_number": { + "description": "Address of the virtual Ethernet adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added.\nMay be unset if the virtual machine has never been powered on since the adapter was created.", + "type": "integer", + "format": "int64" + }, + "wake_on_lan_enabled": { + "description": "Flag indicating whether wake-on-LAN is enabled on this virtual Ethernet adapter.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual Ethernet adapter.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.backing_info" + }, + "state": { + "description": "Connection status of the virtual device.", + "$ref": "#/definitions/vcenter.vm.hardware.connection_state" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.", + "type": "boolean" + } + }, + "required": [ + "label", + "type", + "mac_type", + "wake_on_lan_enabled", + "backing", + "state", + "start_connected", + "allow_guest_control" + ] + }, + "vcenter.vm.hardware.ethernet.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.ethernet.mac_address_type": { + "type": "string", + "description": "The Ethernet.MacAddressType enumerated type defines the valid MAC address origins for a virtual Ethernet adapter.", + "enum": [ + "MANUAL", + "GENERATED", + "ASSIGNED" + ] + }, + "vcenter.vm.hardware.ethernet.summary": { + "type": "object", + "properties": { + "nic": { + "description": "Identifier of the virtual Ethernet adapter.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.Ethernet. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.Ethernet.", + "type": "string" + } + }, + "required": [ + "nic" + ] + }, + "vcenter.vm.hardware.ethernet.update_spec": { + "type": "object", + "properties": { + "upt_compatibility_enabled": { + "description": "Flag indicating whether Universal Pass-Through (UPT) compatibility should be enabled on this virtual Ethernet adapter. \n This field may be modified at any time, and changes will be applied the next time the virtual machine is powered on.\n\nIf unset, the value is unchanged. Must be unset if the emulation type of the virtual Ethernet adapter is not VMXNET3.", + "type": "boolean" + }, + "mac_type": { + "description": "MAC address type. \n This field may be modified at any time, and changes will be applied the next time the virtual machine is powered on.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.mac_address_type" + }, + "mac_address": { + "description": "MAC address. \n This field may be modified at any time, and changes will be applied the next time the virtual machine is powered on.\n\nIf unset, the value is unchanged. Must be specified if Ethernet.UpdateSpec.mac-type is MANUAL. Must be unset if the MAC address type is not MANUAL.", + "type": "string" + }, + "wake_on_lan_enabled": { + "description": "Flag indicating whether wake-on-LAN shoud be enabled on this virtual Ethernet adapter. \n This field may be modified at any time, and changes will be applied the next time the virtual machine is powered on.\n\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual Ethernet adapter. \n This field may be modified at any time, and changes will be applied the next time the virtual machine is powered on.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.ethernet_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.create_spec", + "description": "Specification for the new virtual Ethernet adapter." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.ethernet_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.ethernet_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.ethernet.update_spec", + "description": "Specification for updating the virtual Ethernet adapter." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.floppy.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual floppy drive.", + "$ref": "#/definitions/vcenter.vm.hardware.floppy.backing_type" + }, + "image_file": { + "description": "Path of the image file backing the virtual floppy drive.\nThis field is optional and it is only relevant when the value of Floppy.BackingInfo.type is IMAGE_FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the host device backing the virtual floppy drive. \n\n\nThis field will be unset if Floppy.BackingInfo.auto-detect is true and the virtual floppy drive is not connected or no suitable device is available on the host.", + "type": "string" + }, + "auto_detect": { + "description": "Flag indicating whether the virtual floppy drive is configured to automatically detect a suitable host device.\nThis field is optional and it is only relevant when the value of Floppy.BackingInfo.type is HOST_DEVICE.", + "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.floppy.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual floppy drive.", + "$ref": "#/definitions/vcenter.vm.hardware.floppy.backing_type" + }, + "image_file": { + "description": "Path of the image file that should be used as the virtual floppy drive backing.\nThis field is optional and it is only relevant when the value of Floppy.BackingSpec.type is IMAGE_FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device that should be used as the virtual floppy drive backing.\nIf unset, the virtual floppy drive will be configured to automatically detect a suitable host device.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.floppy.backing_type": { + "type": "string", + "description": "The Floppy.BackingType enumerated type defines the valid backing types for a virtual floppy drive.", + "enum": [ + "IMAGE_FILE", + "HOST_DEVICE", + "CLIENT_DEVICE" + ] + }, + "vcenter.vm.hardware.floppy.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.floppy.create_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual floppy drive.\nIf unset, defaults to automatic detection of a suitable host device.", + "$ref": "#/definitions/vcenter.vm.hardware.floppy.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nDefaults to false if unset.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nDefaults to false if unset.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.floppy.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "backing": { + "description": "Physical resource backing for the virtual floppy drive.", + "$ref": "#/definitions/vcenter.vm.hardware.floppy.backing_info" + }, + "state": { + "description": "Connection status of the virtual device.", + "$ref": "#/definitions/vcenter.vm.hardware.connection_state" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.", + "type": "boolean" + } + }, + "required": [ + "label", + "backing", + "state", + "start_connected", + "allow_guest_control" + ] + }, + "vcenter.vm.hardware.floppy.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.floppy.summary": { + "type": "object", + "properties": { + "floppy": { + "description": "Identifier of the virtual floppy drive.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.Floppy. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.Floppy.", + "type": "string" + } + }, + "required": [ + "floppy" + ] + }, + "vcenter.vm.hardware.floppy.update_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual floppy drive. \n This field may only be modified if the virtual machine is not powered on or the virtual floppy drive is not connected.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.floppy.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.floppy_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.create_spec", + "description": "Specification for the new virtual floppy drive." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.floppy_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.floppy_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.floppy.update_spec", + "description": "Specification for updating the virtual floppy drive." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.ide_address_info": { + "type": "object", + "properties": { + "primary": { + "description": "Flag specifying whether the device is attached to the primary or secondary IDE adapter of the virtual machine.", + "type": "boolean" + }, + "master": { + "description": "Flag specifying whether the device is the master or slave device on the IDE adapter.", + "type": "boolean" + } + }, + "required": [ + "primary", + "master" + ] + }, + "vcenter.vm.hardware.ide_address_spec": { + "type": "object", + "properties": { + "primary": { + "description": "Flag specifying whether the device should be attached to the primary or secondary IDE adapter of the virtual machine.\nIf unset, the server will choose a adapter with an available connection. If no IDE connections are available, the request will be rejected.", + "type": "boolean" + }, + "master": { + "description": "Flag specifying whether the device should be the master or slave device on the IDE adapter.\nIf unset, the server will choose an available connection type. If no IDE connections are available, the request will be rejected.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.info": { + "type": "object", + "properties": { + "version": { + "description": "Virtual hardware version.", + "$ref": "#/definitions/vcenter.vm.hardware.version" + }, + "upgrade_policy": { + "description": "Scheduled upgrade policy.", + "$ref": "#/definitions/vcenter.vm.hardware.upgrade_policy" + }, + "upgrade_version": { + "description": "Target hardware version to be used on the next scheduled virtual hardware upgrade.\nThis field is optional and it is only relevant when the value of Hardware.Info.upgrade-policy is one of AFTER_CLEAN_SHUTDOWN or ALWAYS.", + "$ref": "#/definitions/vcenter.vm.hardware.version" + }, + "upgrade_status": { + "description": "Scheduled upgrade status.", + "$ref": "#/definitions/vcenter.vm.hardware.upgrade_status" + }, + "upgrade_error": { + "description": "Reason for the scheduled upgrade failure.\nThis field is optional and it is only relevant when the value of Hardware.Info.upgrade-status is FAILED.", + "type": "string" + } + }, + "required": [ + "version", + "upgrade_policy", + "upgrade_status" + ] + }, + "vcenter.vm.hardware.memory.info": { + "type": "object", + "properties": { + "size_MiB": { + "description": "Memory size in mebibytes.", + "type": "integer", + "format": "int64" + }, + "hot_add_enabled": { + "description": "Flag indicating whether adding memory while the virtual machine is running is enabled. \n Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running.\n", + "type": "boolean" + }, + "hot_add_increment_size_MiB": { + "description": "The granularity, in mebibytes, at which memory can be added to a running virtual machine. \n When adding memory to a running virtual machine, the amount of memory added must be at least Memory.Info.hot-add-increment-size-mib and the total memory size of the virtual machine must be a multiple of {@link>hotAddIncrementSize}.\n\nOnly set when Memory.Info.hot-add-enabled is true and the virtual machine is running.", + "type": "integer", + "format": "int64" + }, + "hot_add_limit_MiB": { + "description": "The maximum amount of memory, in mebibytes, that can be added to a running virtual machine.\nOnly set when Memory.Info.hot-add-enabled is true and the virtual machine is running.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "size_MiB", + "hot_add_enabled" + ] + }, + "vcenter.vm.hardware.memory.update_spec": { + "type": "object", + "properties": { + "size_MiB": { + "description": "New memory size in mebibytes. \n The supported range of memory sizes is constrained by the configured guest operating system and virtual hardware version of the virtual machine. \n\n If the virtual machine is running, this value may only be changed if Memory.Info.hot-add-enabled is true, and the new memory size must satisfy the constraints specified by Memory.Info.hot-add-increment-size-mib and Memory.Info.hot-add-limit-mib.\n\nIf unset, the value is unchanged.", + "type": "integer", + "format": "int64" + }, + "hot_add_enabled": { + "description": "Flag indicating whether adding memory while the virtual machine is running should be enabled. \n Some guest operating systems may consume more resources or perform less efficiently when they run on hardware that supports adding memory while the machine is running. \n\n This field may only be modified if the virtual machine is not powered on.\n\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.memory_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.memory.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.memory_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.memory.update_spec", + "description": "Specification for updating the memory-related settings of the virtual machine." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.parallel.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual parallel port.", + "$ref": "#/definitions/vcenter.vm.hardware.parallel.backing_type" + }, + "file": { + "description": "Path of the file backing the virtual parallel port.\nThis field is optional and it is only relevant when the value of Parallel.BackingInfo.type is FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device backing the virtual parallel port. \n\n\nThis field will be unset if Parallel.BackingInfo.auto-detect is true and the virtual parallel port is not connected or no suitable device is available on the host.", + "type": "string" + }, + "auto_detect": { + "description": "Flag indicating whether the virtual parallel port is configured to automatically detect a suitable host device.\nThis field is optional and it is only relevant when the value of Parallel.BackingInfo.type is HOST_DEVICE.", + "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.parallel.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual parallel port.", + "$ref": "#/definitions/vcenter.vm.hardware.parallel.backing_type" + }, + "file": { + "description": "Path of the file that should be used as the virtual parallel port backing.\nThis field is optional and it is only relevant when the value of Parallel.BackingSpec.type is FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device that should be used as the virtual parallel port backing.\nIf unset, the virtual parallel port will be configured to automatically detect a suitable host device.", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.parallel.backing_type": { + "type": "string", + "description": "The Parallel.BackingType enumerated type defines the valid backing types for a virtual parallel port.", + "enum": [ + "FILE", + "HOST_DEVICE" + ] + }, + "vcenter.vm.hardware.parallel.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.parallel.create_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual parallel port.\nIf unset, defaults to automatic detection of a suitable host device.", + "$ref": "#/definitions/vcenter.vm.hardware.parallel.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nDefaults to false if unset.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nDefaults to false if unset.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.parallel.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "backing": { + "description": "Physical resource backing for the virtual parallel port.", + "$ref": "#/definitions/vcenter.vm.hardware.parallel.backing_info" + }, + "state": { + "description": "Connection status of the virtual device.", + "$ref": "#/definitions/vcenter.vm.hardware.connection_state" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.", + "type": "boolean" + } + }, + "required": [ + "label", + "backing", + "state", + "start_connected", + "allow_guest_control" + ] + }, + "vcenter.vm.hardware.parallel.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.parallel.summary": { + "type": "object", + "properties": { + "port": { + "description": "Identifier of the virtual parallel port.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.ParallelPort. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.ParallelPort.", + "type": "string" + } + }, + "required": [ + "port" + ] + }, + "vcenter.vm.hardware.parallel.update_spec": { + "type": "object", + "properties": { + "backing": { + "description": "Physical resource backing for the virtual parallel port. \n This field may only be modified if the virtual machine is not powered on or the virtual parallel port is not connected.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.parallel.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.parallel_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.create_spec", + "description": "Specification for the new virtual parallel port." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.parallel_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.parallel_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.parallel.update_spec", + "description": "Specification for updating the virtual parallel port." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.sata_address_info": { + "type": "object", + "properties": { + "bus": { + "description": "Bus number of the adapter to which the device is attached.", + "type": "integer", + "format": "int64" + }, + "unit": { + "description": "Unit number of the device.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "bus", + "unit" + ] + }, + "vcenter.vm.hardware.sata_address_spec": { + "type": "object", + "properties": { + "bus": { + "description": "Bus number of the adapter to which the device should be attached.", + "type": "integer", + "format": "int64" + }, + "unit": { + "description": "Unit number of the device.\nIf unset, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "bus" + ] + }, + "vcenter.vm.hardware.scsi_address_info": { + "type": "object", + "properties": { + "bus": { + "description": "Bus number of the adapter to which the device is attached.", + "type": "integer", + "format": "int64" + }, + "unit": { + "description": "Unit number of the device.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "bus", + "unit" + ] + }, + "vcenter.vm.hardware.scsi_address_spec": { + "type": "object", + "properties": { + "bus": { + "description": "Bus number of the adapter to which the device should be attached.", + "type": "integer", + "format": "int64" + }, + "unit": { + "description": "Unit number of the device.\nIf unset, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.", + "type": "integer", + "format": "int64" + } + }, + "required": [ + "bus" + ] + }, + "vcenter.vm.hardware.serial.backing_info": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual serial port.", + "$ref": "#/definitions/vcenter.vm.hardware.serial.backing_type" + }, + "file": { + "description": "Path of the file backing the virtual serial port.\nThis field is optional and it is only relevant when the value of Serial.BackingInfo.type is FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device backing the virtual serial port. \n\n\nThis field will be unset if Serial.BackingInfo.auto-detect is true and the virtual serial port is not connected or no suitable device is available on the host.", + "type": "string" + }, + "auto_detect": { + "description": "Flag indicating whether the virtual serial port is configured to automatically detect a suitable host device.\nThis field is optional and it is only relevant when the value of Serial.BackingInfo.type is HOST_DEVICE.", + "type": "boolean" + }, + "pipe": { + "description": "Name of the pipe backing the virtual serial port.\nThis field is optional and it is only relevant when the value of Serial.BackingInfo.type is one of PIPE_SERVER or PIPE_CLIENT.", + "type": "string" + }, + "no_rx_loss": { + "description": "Flag that enables optimized data transfer over the pipe. When the value is true, the host buffers data to prevent data overrun. This allows the virtual machine to read all of the data transferred over the pipe with no data loss.\nThis field is optional and it is only relevant when the value of Serial.BackingInfo.type is one of PIPE_SERVER or PIPE_CLIENT.", + "type": "boolean" + }, + "network_location": { + "description": "URI specifying the location of the network service backing the virtual serial port. \n - If Serial.BackingInfo.type is NETWORK_SERVER, this field is the location used by clients to connect to this server. The hostname part of the URI should either be empty or should specify the address of the host on which the virtual machine is running.\n - If Serial.BackingInfo.type is NETWORK_CLIENT, this field is the location used by the virtual machine to connect to the remote server.\n \nThis field is optional and it is only relevant when the value of Serial.BackingInfo.type is one of NETWORK_SERVER or NETWORK_CLIENT.", + "type": "string", + "format": "uri" + }, + "proxy": { + "description": "Proxy service that provides network access to the network backing. If set, the virtual machine initiates a connection with the proxy service and forwards the traffic to the proxy.\nIf unset, no proxy service is configured.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.serial.backing_spec": { + "type": "object", + "properties": { + "type": { + "description": "Backing type for the virtual serial port.", + "$ref": "#/definitions/vcenter.vm.hardware.serial.backing_type" + }, + "file": { + "description": "Path of the file backing the virtual serial port.\nThis field is optional and it is only relevant when the value of Serial.BackingSpec.type is FILE.", + "type": "string" + }, + "host_device": { + "description": "Name of the device backing the virtual serial port. \n\n\nIf unset, the virtual serial port will be configured to automatically detect a suitable host device.", + "type": "string" + }, + "pipe": { + "description": "Name of the pipe backing the virtual serial port.\nThis field is optional and it is only relevant when the value of Serial.BackingSpec.type is one of PIPE_SERVER or PIPE_CLIENT.", + "type": "string" + }, + "no_rx_loss": { + "description": "Flag that enables optimized data transfer over the pipe. When the value is true, the host buffers data to prevent data overrun. This allows the virtual machine to read all of the data transferred over the pipe with no data loss.\nIf unset, defaults to false.", + "type": "boolean" + }, + "network_location": { + "description": "URI specifying the location of the network service backing the virtual serial port. \n - If Serial.BackingSpec.type is NETWORK_SERVER, this field is the location used by clients to connect to this server. The hostname part of the URI should either be empty or should specify the address of the host on which the virtual machine is running.\n - If Serial.BackingSpec.type is NETWORK_CLIENT, this field is the location used by the virtual machine to connect to the remote server.\n \nThis field is optional and it is only relevant when the value of Serial.BackingSpec.type is one of NETWORK_SERVER or NETWORK_CLIENT.", + "type": "string", + "format": "uri" + }, + "proxy": { + "description": "Proxy service that provides network access to the network backing. If set, the virtual machine initiates a connection with the proxy service and forwards the traffic to the proxy.\nIf unset, no proxy service should be used.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "type" + ] + }, + "vcenter.vm.hardware.serial.backing_type": { + "type": "string", + "description": "The Serial.BackingType enumerated type defines the valid backing types for a virtual serial port.", + "enum": [ + "FILE", + "HOST_DEVICE", + "PIPE_SERVER", + "PIPE_CLIENT", + "NETWORK_SERVER", + "NETWORK_CLIENT" + ] + }, + "vcenter.vm.hardware.serial.create_result": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.serial.create_spec": { + "type": "object", + "properties": { + "yield_on_poll": { + "description": "CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host.\nIf unset, defaults to false.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual serial port.\nIf unset, defaults to automatic detection of a suitable host device.", + "$ref": "#/definitions/vcenter.vm.hardware.serial.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nDefaults to false if unset.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nDefaults to false if unset.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.serial.info": { + "type": "object", + "properties": { + "label": { + "description": "Device label.", + "type": "string" + }, + "yield_on_poll": { + "description": "CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual serial port.", + "$ref": "#/definitions/vcenter.vm.hardware.serial.backing_info" + }, + "state": { + "description": "Connection status of the virtual device.", + "$ref": "#/definitions/vcenter.vm.hardware.connection_state" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.", + "type": "boolean" + } + }, + "required": [ + "label", + "yield_on_poll", + "backing", + "state", + "start_connected", + "allow_guest_control" + ] + }, + "vcenter.vm.hardware.serial.list_result": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.summary" + } + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.serial.summary": { + "type": "object", + "properties": { + "port": { + "description": "Identifier of the virtual serial port.\nWhen clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: vcenter.vm.hardware.SerialPort. When operations return a value of this structure as a result, the field will be an identifier for the resource type: vcenter.vm.hardware.SerialPort.", + "type": "string" + } + }, + "required": [ + "port" + ] + }, + "vcenter.vm.hardware.serial.update_spec": { + "type": "object", + "properties": { + "yield_on_poll": { + "description": "CPU yield behavior. If set to true, the virtual machine will periodically relinquish the processor if its sole task is polling the virtual serial port. The amount of time it takes to regain the processor will depend on the degree of other virtual machine activity on the host. \n This field may be modified at any time, and changes applied to a connected virtual serial port take effect immediately.\n\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "backing": { + "description": "Physical resource backing for the virtual serial port. \n This field may only be modified if the virtual machine is not powered on or the virtual serial port is not connected.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.serial.backing_spec" + }, + "start_connected": { + "description": "Flag indicating whether the virtual device should be connected whenever the virtual machine is powered on.\nIf unset, the value is unchanged.", + "type": "boolean" + }, + "allow_guest_control": { + "description": "Flag indicating whether the guest can connect and disconnect the device.\nIf unset, the value is unchanged.", + "type": "boolean" + } + } + }, + "vcenter.vm.hardware.serial_create": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.create_spec", + "description": "Specification for the new virtual serial port." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.serial_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware.serial_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.serial.update_spec", + "description": "Specification for updating the virtual serial port." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware.update_spec": { + "type": "object", + "properties": { + "upgrade_policy": { + "description": "Scheduled upgrade policy. \n If set to NEVER, the Hardware.Info.upgrade-version field will be reset to unset.\n\nIf unset, the value is unchanged.", + "$ref": "#/definitions/vcenter.vm.hardware.upgrade_policy" + }, + "upgrade_version": { + "description": "Target hardware version to be used on the next scheduled virtual hardware upgrade. \n If specified, this field must represent a newer virtual hardware version than the current virtual hardware version reported in Hardware.Info.version.\n\nIf Hardware.UpdateSpec.upgrade-policy is set to NEVER, this field must be unset. Otherwise, if this field is unset, default to the most recent virtual hardware version supported by the server.", + "$ref": "#/definitions/vcenter.vm.hardware.version" + } + } + }, + "vcenter.vm.hardware.upgrade_policy": { + "type": "string", + "description": "The Hardware.UpgradePolicy enumerated type defines the valid virtual hardware upgrade policies for a virtual machine.", + "enum": [ + "NEVER", + "AFTER_CLEAN_SHUTDOWN", + "ALWAYS" + ] + }, + "vcenter.vm.hardware.upgrade_status": { + "type": "string", + "description": "The Hardware.UpgradeStatus enumerated type defines the valid virtual hardware upgrade statuses for a virtual machine.", + "enum": [ + "NONE", + "PENDING", + "SUCCESS", + "FAILED" + ] + }, + "vcenter.vm.hardware.version": { + "type": "string", + "description": "The Hardware.Version enumerated type defines the valid virtual hardware versions for a virtual machine.", + "enum": [ + "VMX_03", + "VMX_04", + "VMX_06", + "VMX_07", + "VMX_08", + "VMX_09", + "VMX_10", + "VMX_11", + "VMX_12", + "VMX_13" + ] + }, + "vcenter.vm.hardware_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.hardware.info" + } + }, + "required": [ + "value" + ] + }, + "vcenter.vm.hardware_update": { + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/vcenter.vm.hardware.update_spec", + "description": "Specification for updating the virtual hardware settings of the virtual machine." + } + }, + "required": [ + "spec" + ] + }, + "vcenter.vm.hardware_upgrade": { + "type": "object", + "properties": { + "version": { + "$ref": "#/definitions/vcenter.vm.hardware.version", + "description": "New virtual machine version.\nIf unset, defaults to the most recent virtual hardware version supported by the server." + } + } + }, + "vcenter.vm.power.info": { + "type": "object", + "properties": { + "state": { + "description": "Power state of the virtual machine.", + "$ref": "#/definitions/vcenter.vm.power.state" + }, + "clean_power_off": { + "description": "Flag indicating whether the virtual machine was powered off cleanly. This field may be used to detect that the virtual machine crashed unexpectedly and should be restarted.\nThis field is optional and it is only relevant when the value of Power.Info.state is POWERED_OFF.", + "type": "boolean" + } + }, + "required": [ + "state" + ] + }, + "vcenter.vm.power.state": { + "type": "string", + "enum": [ + "POWERED_OFF", + "POWERED_ON", + "SUSPENDED" + ] + }, + "vcenter.vm.power_result": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/vcenter.vm.power.info" + } + }, + "required": [ + "value" + ] + } + } +} \ No newline at end of file diff --git a/vmware.hcl.agent/src/main/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2Hcl.java b/vmware.hcl.agent/src/main/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2Hcl.java index f5f2437..a518db3 100644 --- a/vmware.hcl.agent/src/main/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2Hcl.java +++ b/vmware.hcl.agent/src/main/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2Hcl.java @@ -97,8 +97,10 @@ public Map variableValues() { /** * Transform the collected data into a {@link Specification}. + * TODO improve this method * @return The specification instance */ + @SuppressWarnings("checkstyle:JavaNCSS") public Specification specification() { // TODO Create issue when VM no longer exists in vmware // (CAM deployment must be removed too) @@ -109,6 +111,11 @@ public Specification specification() { unverified.setSpecifier("variable"); unverified.setName("allow_unverified_ssl"); unverified.setValue(attrs); + final NameValuePair type = HclFactory.eINSTANCE.createNameValuePair(); + type.setName("type"); + final Text typetext = HclFactory.eINSTANCE.createText(); + typetext.setValue("string"); + type.setValue(typetext); final NameValuePair description = HclFactory.eINSTANCE.createNameValuePair(); description.setName("description"); final Text desctext = HclFactory.eINSTANCE.createText(); @@ -119,6 +126,7 @@ public Specification specification() { final Text valuetext = HclFactory.eINSTANCE.createText(); valuetext.setValue("true"); value.setValue(valuetext); + attrs.getElements().add(type); attrs.getElements().add(description); attrs.getElements().add(value); this.spec.getResources().add(unverified); @@ -160,6 +168,7 @@ public Specification specification() { * Creates a VM resource. * @param node The JSON node that represents the VM resource */ + @SuppressWarnings("PMD.ExcessiveMethodLength") private void handleVm(final JsonNode node) { final String vmid = node.get("vm").asText(); // 1. The vm @@ -184,9 +193,18 @@ private void handleVm(final JsonNode node) { "folder", "string" ); + final String folderid = + this.elementGroup("listVcenterVmFilteredByFolder", vmid).get(); + String foldername = ""; + for (final JsonNode tmp : this.data.get("getVcenterFolder")) { + if (tmp.at("/folder").textValue().equals(folderid)) { + foldername = tmp.at("/name").textValue(); + break; + } + } this.values.put( folder.getName(), - this.elementGroup("listVcenterVmFilteredByFolder", vmid).get() + foldername ); // - CPUs final Resource cpus = this.variable( diff --git a/vmware.hcl.agent/src/main/resources/configuration.xml b/vmware.hcl.agent/src/main/resources/configuration.xml index 868125d..fc55a26 100644 --- a/vmware.hcl.agent/src/main/resources/configuration.xml +++ b/vmware.hcl.agent/src/main/resources/configuration.xml @@ -7,6 +7,13 @@ + + folder + + + + + datacenter diff --git a/vmware.hcl.agent/src/test/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2HclTest.java b/vmware.hcl.agent/src/test/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2HclTest.java index cc37a84..c82d013 100644 --- a/vmware.hcl.agent/src/test/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2HclTest.java +++ b/vmware.hcl.agent/src/test/java/com/rigiresearch/middleware/vmware/hcl/agent/Data2HclTest.java @@ -16,10 +16,7 @@ */ class Data2HclTest { - @CsvSource({ - "input1.json", - "input2.json" - }) + @CsvSource("input1.json") @ParameterizedTest void testTransformation(final String path) throws IOException { final JsonNode data = new ObjectMapper().readTree( diff --git a/vmware.hcl.agent/src/test/resources/input1.json b/vmware.hcl.agent/src/test/resources/input1.json index 925fcce..7bef656 100644 --- a/vmware.hcl.agent/src/test/resources/input1.json +++ b/vmware.hcl.agent/src/test/resources/input1.json @@ -2,6 +2,9 @@ "listVcenterVm": [ "vm-123" ], + "listVcenterFolder": [ + "folder-1" + ], "listVcenterVmFilteredByHost": { "host-1": [ "vm-123" @@ -22,6 +25,12 @@ "vm-123" ] }, + "getVcenterFolder": [ + { + "folder": "folder-1", + "name": "Folder1" + } + ], "getVcenterDatacenter": [ { "datacenter": "datacenter-1", diff --git a/vmware.hcl.agent/src/test/resources/input2.json b/vmware.hcl.agent/src/test/resources/input2.json deleted file mode 100644 index eeb9f32..0000000 --- a/vmware.hcl.agent/src/test/resources/input2.json +++ /dev/null @@ -1,861 +0,0 @@ -{ - "listVcenterHost": [ - "host-1009", - "host-1034", - "host-121", - "host-12380", - "host-12383", - "host-12396", - "host-13435", - "host-13448", - "host-14569", - "host-14594", - "host-14596", - "host-14598", - "host-14606", - "host-14608", - "host-1689", - "host-1714", - "host-2479", - "host-2504", - "host-3072", - "host-3699", - "host-3848", - "host-4048", - "host-6528", - "host-6541", - "host-8394", - "host-8409", - "host-8413", - "host-8417", - "host-8846", - "host-8870", - "host-889", - "host-96" - ], - "listVcenterVmFilteredByHost": { - "host-8394": [], - "host-1714": [], - "host-14608": [], - "host-2504": [], - "host-13448": [], - "host-1689": [ - "vm-22232" - ], - "host-121": [], - "host-8417": [], - "host-2479": [], - "host-14594": [], - "host-8413": [], - "host-14598": [], - "host-889": [ - "vm-18551" - ], - "host-12396": [], - "host-14596": [], - "host-8870": [], - "host-12380": [], - "host-3848": [], - "host-1009": [ - "vm-22306" - ], - "host-14569": [], - "host-6528": [], - "host-4048": [], - "host-1034": [], - "host-13435": [], - "host-8409": [], - "host-14606": [], - "host-8846": [], - "host-3699": [], - "host-6541": [], - "host-3072": [], - "host-12383": [], - "host-96": [] - }, - "listVcenterDatacenter": [ - "datacenter-6548", - "datacenter-1671", - "datacenter-2" - ], - "listVcenterVmFilteredByDatacenter": { - "datacenter-2": [ - "vm-18551", - "vm-22232", - "vm-22306" - ], - "datacenter-6548": [], - "datacenter-1671": [] - }, - "getVcenterDatacenter": [ - { - "datastore_folder": "group-s6551", - "host_folder": "group-h6550", - "network_folder": "group-n6552", - "name": "CAMDC2", - "vm_folder": "group-v6549", - "datacenter": "datacenter-6548" - }, - { - "datastore_folder": "group-s1674", - "host_folder": "group-h1673", - "network_folder": "group-n1675", - "name": "CAMDC1", - "vm_folder": "group-v1672", - "datacenter": "datacenter-1671" - }, - { - "datastore_folder": "group-s5", - "host_folder": "group-h4", - "network_folder": "group-n6", - "name": "IOCDCPC1", - "vm_folder": "group-v3", - "datacenter": "datacenter-2" - } - ], - "listVcenterFolder": [ - "group-d1", - "group-h1673", - "group-h4", - "group-h6550", - "group-n1675", - "group-n6", - "group-n6552", - "group-s1674", - "group-s5", - "group-s6551", - "group-v101", - "group-v10593", - "group-v10781", - "group-v11104", - "group-v11289", - "group-v13064", - "group-v13988", - "group-v14347", - "group-v14556", - "group-v14736", - "group-v14823", - "group-v15018", - "group-v15323", - "group-v1535", - "group-v15352", - "group-v15387", - "group-v15989", - "group-v1642", - "group-v1648", - "group-v1649", - "group-v16526", - "group-v1657", - "group-v1659", - "group-v1672", - "group-v1720", - "group-v17959", - "group-v18019", - "group-v18056", - "group-v18261", - "group-v18363", - "group-v18544", - "group-v18854", - "group-v19212", - "group-v19546", - "group-v19616", - "group-v19657", - "group-v1984", - "group-v19926", - "group-v20536", - "group-v20567", - "group-v20759", - "group-v20817", - "group-v20891", - "group-v21270", - "group-v21434", - "group-v21496", - "group-v21946", - "group-v22222", - "group-v22268", - "group-v22296", - "group-v22448", - "group-v22458", - "group-v22463", - "group-v22475", - "group-v22486", - "group-v22507", - "group-v22596", - "group-v22731", - "group-v22850", - "group-v22946", - "group-v23155", - "group-v23184", - "group-v23197", - "group-v23211", - "group-v3", - "group-v3698", - "group-v3706", - "group-v3881", - "group-v3957", - "group-v49", - "group-v6549", - "group-v6555", - "group-v6616", - "group-v6698", - "group-v6700", - "group-v6765", - "group-v7443", - "group-v9462", - "group-v962" - ], - "listVcenterVmFilteredByFolder": { - "group-v1659": [], - "group-v3957": [], - "group-v11104": [], - "group-v9462": [], - "group-v20817": [], - "group-v3": [], - "group-v20536": [], - "group-v18261": [], - "group-v21946": [], - "group-n6": [], - "group-v18056": [], - "group-v18854": [], - "group-v15387": [], - "group-v20891": [], - "group-v18019": [], - "group-v19546": [], - "group-v22475": [], - "group-v22596": [], - "group-v6549": [], - "group-v1535": [], - "group-v14736": [], - "group-v15989": [], - "group-v6700": [], - "group-v1657": [], - "group-v1649": [], - "group-v3706": [], - "group-n1675": [], - "group-v1648": [], - "group-v10781": [], - "group-v22448": [], - "group-v21434": [], - "group-v6698": [], - "group-v15352": [], - "group-v18544": [ - "vm-18551" - ], - "group-v22486": [], - "group-h1673": [], - "group-v101": [], - "group-v6616": [], - "group-v23211": [], - "group-v1642": [], - "group-v14347": [], - "group-v16526": [], - "group-v14823": [], - "group-v1720": [], - "group-v21270": [], - "group-v11289": [], - "group-v10593": [], - "group-s6551": [], - "group-v18363": [], - "group-v20759": [], - "group-v13064": [], - "group-v22458": [], - "group-v22731": [], - "group-v22850": [], - "group-v15323": [], - "group-v19926": [], - "group-v3698": [], - "group-v14556": [], - "group-v1672": [], - "group-h6550": [], - "group-v22296": [ - "vm-22306" - ], - "group-v6765": [], - "group-h4": [], - "group-v23184": [], - "group-d1": [], - "group-v13988": [], - "group-s1674": [], - "group-s5": [], - "group-v22507": [], - "group-v22946": [], - "group-v7443": [], - "group-v49": [], - "group-v19212": [], - "group-v6555": [], - "group-v20567": [], - "group-v22268": [], - "group-v3881": [], - "group-v21496": [], - "group-v19657": [], - "group-v22222": [ - "vm-22232" - ], - "group-v23155": [], - "group-v15018": [], - "group-v22463": [], - "group-v23197": [], - "group-v19616": [], - "group-v962": [], - "group-v1984": [], - "group-v17959": [], - "group-n6552": [] - }, - "listVcenterResourcePool": [ - { - "name": "Resources", - "resource_pool": "resgroup-1677" - }, - { - "name": "ethantao", - "resource_pool": "resgroup-19615" - }, - { - "name": "cas-project-miguel", - "resource_pool": "resgroup-21945" - }, - { - "name": "Resources", - "resource_pool": "resgroup-6565" - }, - { - "name": "Resources", - "resource_pool": "resgroup-95" - } - ], - "getVcenterResourcePool": [ - { - "name": "ethantao", - "resource_pools": [], - "resource_pool": "resgroup-19615" - }, - { - "name": "Resources", - "resource_pools": [ - "resgroup-21945" - ], - "resource_pool": "resgroup-95" - }, - { - "name": "Resources", - "resource_pools": [ - "resgroup-19615" - ], - "resource_pool": "resgroup-6565" - }, - { - "name": "Resources", - "resource_pools": [], - "resource_pool": "resgroup-1677" - }, - { - "name": "cas-project-miguel", - "resource_pools": [], - "resource_pool": "resgroup-21945" - } - ], - "listVcenterVmFilteredByResourcePool": { - "resgroup-19615": [], - "resgroup-21945": [], - "resgroup-95": [ - "vm-18551", - "vm-22232", - "vm-22306" - ], - "resgroup-1677": [], - "resgroup-6565": [] - }, - "listVcenterVm": [ - "vm-18551", - "vm-22232", - "vm-22306" - ], - "getVcenterVm": [ - { - "cdroms": [], - "memory": { - "size_MiB": 32768, - "hot_add_enabled": false - }, - "disks": [ - { - "value": { - "scsi": { - "bus": 0, - "unit": 2 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-004] 320-1908-build1-icp-20190918-wkr03/320-1908-build1-icp-20190918-wkr03_2.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 3", - "type": "SCSI", - "capacity": 1073741824 - }, - "key": "2002" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 1 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-004] 320-1908-build1-icp-20190918-wkr03/320-1908-build1-icp-20190918-wkr03_1.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 2", - "type": "SCSI", - "capacity": 1073741824 - }, - "key": "2001" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 0 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-004] 320-1908-build1-icp-20190918-wkr03/320-1908-build1-icp-20190918-wkr03_4.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 1", - "type": "SCSI", - "capacity": 322122547200 - }, - "key": "2000" - } - ], - "parallel_ports": [], - "sata_adapters": [ - { - "value": { - "bus": 0, - "pci_slot_number": 33, - "label": "SATA controller 0", - "type": "AHCI" - }, - "key": "15000" - } - ], - "cpu": { - "hot_remove_enabled": false, - "count": 16, - "hot_add_enabled": false, - "cores_per_socket": 1 - }, - "scsi_adapters": [ - { - "value": { - "scsi": { - "bus": 1, - "unit": 7 - }, - "pci_slot_number": 224, - "label": "SCSI controller 1", - "type": "PVSCSI", - "sharing": "NONE" - }, - "key": "1001" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 7 - }, - "pci_slot_number": 16, - "label": "SCSI controller 0", - "type": "LSILOGIC", - "sharing": "NONE" - }, - "key": "1000" - } - ], - "power_state": "POWERED_OFF", - "floppies": [ - { - "value": { - "start_connected": false, - "backing": { - "type": "CLIENT_DEVICE" - }, - "allow_guest_control": true, - "label": "Floppy drive 1", - "state": "NOT_CONNECTED" - }, - "key": "8000" - } - ], - "name": "320-1908-build1-icp-20190918-wkr03", - "nics": [ - { - "value": { - "start_connected": true, - "pci_slot_number": 160, - "backing": { - "network_name": "VIS232", - "type": "STANDARD_PORTGROUP", - "network": "network-99" - }, - "mac_address": "00:50:56:9b:54:39", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 1", - "state": "NOT_CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4000" - }, - { - "value": { - "start_connected": true, - "pci_slot_number": 192, - "backing": { - "network_name": "VIS232", - "type": "STANDARD_PORTGROUP", - "network": "network-99" - }, - "mac_address": "00:50:56:9b:04:4d", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 2", - "state": "NOT_CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4001" - } - ], - "boot": { - "delay": 0, - "retry_delay": 10000, - "enter_setup_mode": false, - "type": "BIOS", - "retry": false - }, - "serial_ports": [], - "guest_OS": "UBUNTU_64", - "boot_devices": [], - "hardware": { - "upgrade_policy": "NEVER", - "upgrade_status": "NONE", - "version": "VMX_11" - }, - "vm": "vm-22232" - }, - { - "cdroms": [], - "memory": { - "size_MiB": 32768, - "hot_add_enabled": false - }, - "disks": [ - { - "value": { - "scsi": { - "bus": 0, - "unit": 0 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-007] 32gacntdev-icp-20190611-wkr04/32gacntdev-icp-20190611-wkr04.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 1", - "type": "SCSI", - "capacity": 322122547200 - }, - "key": "2000" - } - ], - "parallel_ports": [], - "sata_adapters": [ - { - "value": { - "bus": 0, - "pci_slot_number": 33, - "label": "SATA controller 0", - "type": "AHCI" - }, - "key": "15000" - } - ], - "cpu": { - "hot_remove_enabled": false, - "count": 16, - "hot_add_enabled": false, - "cores_per_socket": 1 - }, - "scsi_adapters": [ - { - "value": { - "scsi": { - "bus": 1, - "unit": 7 - }, - "pci_slot_number": 224, - "label": "SCSI controller 1", - "type": "PVSCSI", - "sharing": "NONE" - }, - "key": "1001" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 7 - }, - "pci_slot_number": 16, - "label": "SCSI controller 0", - "type": "LSILOGIC", - "sharing": "NONE" - }, - "key": "1000" - } - ], - "power_state": "POWERED_ON", - "floppies": [ - { - "value": { - "start_connected": false, - "backing": { - "type": "CLIENT_DEVICE" - }, - "allow_guest_control": true, - "label": "Floppy drive 1", - "state": "NOT_CONNECTED" - }, - "key": "8000" - } - ], - "name": "32gacntdev-icp-20190611-wkr04", - "nics": [ - { - "value": { - "start_connected": true, - "pci_slot_number": 160, - "backing": { - "network_name": "VIS241", - "type": "STANDARD_PORTGROUP", - "network": "network-1906" - }, - "mac_address": "00:50:56:9b:82:83", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 1", - "state": "CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4000" - }, - { - "value": { - "start_connected": true, - "pci_slot_number": 192, - "backing": { - "network_name": "VIS241", - "type": "STANDARD_PORTGROUP", - "network": "network-1906" - }, - "mac_address": "00:50:56:9b:24:4e", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 2", - "state": "CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4001" - } - ], - "boot": { - "delay": 0, - "retry_delay": 10000, - "enter_setup_mode": false, - "type": "BIOS", - "retry": false - }, - "serial_ports": [], - "guest_OS": "UBUNTU_64", - "boot_devices": [], - "hardware": { - "upgrade_policy": "NEVER", - "upgrade_status": "NONE", - "version": "VMX_11" - }, - "vm": "vm-18551" - }, - { - "cdroms": [], - "memory": { - "size_MiB": 32768, - "hot_add_enabled": false - }, - "disks": [ - { - "value": { - "scsi": { - "bus": 0, - "unit": 2 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-007] 320-1908-build3-icp-20190919-wkr02/320-1908-build3-icp-20190919-wkr02_2.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 3", - "type": "SCSI", - "capacity": 1073741824 - }, - "key": "2002" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 1 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-007] 320-1908-build3-icp-20190919-wkr02/320-1908-build3-icp-20190919-wkr02_1.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 2", - "type": "SCSI", - "capacity": 1073741824 - }, - "key": "2001" - }, - { - "value": { - "scsi": { - "bus": 0, - "unit": 0 - }, - "backing": { - "vmdk_file": "[ICOVCPC-RSX6-007] 320-1908-build3-icp-20190919-wkr02/320-1908-build3-icp-20190919-wkr02.vmdk", - "type": "VMDK_FILE" - }, - "label": "Hard disk 1", - "type": "SCSI", - "capacity": 322122547200 - }, - "key": "2000" - } - ], - "parallel_ports": [], - "sata_adapters": [ - { - "value": { - "bus": 0, - "pci_slot_number": 33, - "label": "SATA controller 0", - "type": "AHCI" - }, - "key": "15000" - } - ], - "cpu": { - "hot_remove_enabled": false, - "count": 16, - "hot_add_enabled": false, - "cores_per_socket": 1 - }, - "scsi_adapters": [ - { - "value": { - "scsi": { - "bus": 0, - "unit": 7 - }, - "pci_slot_number": 16, - "label": "SCSI controller 0", - "type": "LSILOGIC", - "sharing": "NONE" - }, - "key": "1000" - } - ], - "power_state": "POWERED_ON", - "floppies": [ - { - "value": { - "start_connected": false, - "backing": { - "type": "CLIENT_DEVICE" - }, - "allow_guest_control": true, - "label": "Floppy drive 1", - "state": "NOT_CONNECTED" - }, - "key": "8000" - } - ], - "name": "320-1908-build3-icp-20190919-wkr02", - "nics": [ - { - "value": { - "start_connected": true, - "pci_slot_number": 160, - "backing": { - "network_name": "VIS232", - "type": "STANDARD_PORTGROUP", - "network": "network-99" - }, - "mac_address": "00:50:56:9b:94:28", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 1", - "state": "CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4000" - }, - { - "value": { - "start_connected": true, - "pci_slot_number": 192, - "backing": { - "network_name": "VIS232", - "type": "STANDARD_PORTGROUP", - "network": "network-99" - }, - "mac_address": "00:50:56:9b:a8:1b", - "mac_type": "ASSIGNED", - "allow_guest_control": true, - "wake_on_lan_enabled": true, - "label": "Network adapter 2", - "state": "CONNECTED", - "type": "VMXNET3", - "upt_compatibility_enabled": true - }, - "key": "4001" - } - ], - "boot": { - "delay": 0, - "retry_delay": 10000, - "enter_setup_mode": false, - "type": "BIOS", - "retry": false - }, - "serial_ports": [], - "guest_OS": "UBUNTU_64", - "boot_devices": [], - "hardware": { - "upgrade_policy": "NEVER", - "upgrade_status": "NONE", - "version": "VMX_11" - }, - "vm": "vm-22306" - } - ] -}