Juan Hernandez has uploaded a new change for review. Change subject: sdk: Regenerate against the latest API ......................................................................
sdk: Regenerate against the latest API This patch regenerates the SDK using the latest API obtained from the engine built from commit bba4612. Change-Id: I28d275958ab5350870f86f38f41c190f6f001748 Signed-off-by: Juan Hernandez <[email protected]> --- M ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl M ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDog.java M ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDogs.java M ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/entities/JobOwner.java 4 files changed, 341 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk-java refs/changes/65/32765/1 diff --git a/ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl b/ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl index 4d44b6d..b0ba6fd 100644 --- a/ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl +++ b/ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl @@ -11686,10 +11686,34 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs" rel="add"> + <description>add a watchdog to the template identified by the given id</description> <request> <http_method>POST</http_method> + <headers> + <header required="true"> + <name>Content-Type</name> + <value>application/xml|json</value> + </header> + <header required="false"> + <name>Expect</name> + <value>201-created</value> + </header> + <header required="false"> + <name>Correlation-Id</name> + <value>any string</value> + </header> + </headers> <body> <type>WatchDog</type> + <parameters_set> + <description>add a watchdog to the template identified by the given id</description> + <parameter required="true" type="xs:string"> + <name>watchdog.action</name> + </parameter> + <parameter required="true" type="xs:string"> + <name>watchdog.model</name> + </parameter> + </parameters_set> </body> </request> <response> @@ -11697,8 +11721,17 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs" rel="get"> + <description>get all the watchdogs for the template identified by the given id</description> <request> <http_method>GET</http_method> + <url> + <parameters_set> + <parameter required="false" type="xs:int" context="matrix"> + <name>max</name> + <value>max results</value> + </parameter> + </parameters_set> + </url> <body/> </request> <response> @@ -11706,12 +11739,28 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="delete"> + <description>delete the watchdog for the template identified by the given id</description> <request> <http_method>DELETE</http_method> + <headers> + <header required="false"> + <name>Correlation-Id</name> + <value>any string</value> + </header> + </headers> + <url> + <parameters_set> + <parameter required="false" type="xs:boolean" context="matrix"> + <name>async</name> + <value>true|false</value> + </parameter> + </parameters_set> + </url> <body/> </request> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="get"> + <description>get the watchdog identified by the id for a given template</description> <request> <http_method>GET</http_method> <body/> @@ -11721,10 +11770,30 @@ </response> </link> <link href="/ovirt-engine/api/templates/{template:id}/watchdogs/{watchdog:id}" rel="update"> + <description>update the watchdog for the template identified by the given id</description> <request> <http_method>PUT</http_method> + <headers> + <header required="true"> + <name>Content-Type</name> + <value>application/xml|json</value> + </header> + <header required="false"> + <name>Correlation-Id</name> + <value>any string</value> + </header> + </headers> <body> <type>WatchDog</type> + <parameters_set> + <description>update the watchdog for the template identified by the given id with a new action and model as specified in the request data</description> + <parameter required="false" type="xs:string"> + <name>watchdog.action</name> + </parameter> + <parameter required="false" type="xs:string"> + <name>watchdog.model</name> + </parameter> + </parameters_set> </body> </request> <response> @@ -15751,6 +15820,7 @@ </request> </link> <link href="/ovirt-engine/api/vms/{vm:id}/watchdogs/{watchdog:id}" rel="get"> + <description>get the watchdog identified by the id for a given virtual machine</description> <request> <http_method>GET</http_method> <body/> diff --git a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDog.java b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDog.java index 9932472..6d34085 100644 --- a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDog.java +++ b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDog.java @@ -67,6 +67,11 @@ * Updates TemplateWatchDog object. * * @param watchdog {@link org.ovirt.engine.sdk.entities.WatchDog} + * <pre> + * [watchdog.action] + * [watchdog.model] + * </pre> + * * @return * {@link TemplateWatchDog } * @@ -82,6 +87,50 @@ String url = this.getHref(); HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(url); + url = urlBuilder.build(); + + return getProxy().update( + url, + this, + org.ovirt.engine.sdk.entities.WatchDog.class, + TemplateWatchDog.class, + headers); + } + /** + * Updates TemplateWatchDog object. + * + * @param watchdog {@link org.ovirt.engine.sdk.entities.WatchDog} + * <pre> + * [watchdog.action] + * [watchdog.model] + * </pre> + * + * @param correlationId + * <pre> + * [any string] + * </pre> + * + * @return + * {@link TemplateWatchDog } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public TemplateWatchDog update(String correlationId) throws ClientProtocolException, + ServerException, IOException { + String url = this.getHref(); + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + if (correlationId != null) { + headersBuilder.add("Correlation-Id", correlationId); + } List<Header> headers = headersBuilder.build(); UrlBuilder urlBuilder = new UrlBuilder(url); @@ -119,6 +168,80 @@ return getProxy().delete(url, Response.class, headers); } + /** + * Deletes object. + * + * @param async + * <pre> + * [true|false] + * </pre> + * + * @return + * {@link Response } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public Response delete(Boolean async) throws ClientProtocolException, + ServerException, IOException { + String url = this.getHref(); + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(url); + if (async != null) { + urlBuilder.add("async", async, UrlParameterType.MATRIX); + } + url = urlBuilder.build(); + + return getProxy().delete(url, Response.class, headers); + } + /** + * Deletes object. + * + * @param correlationId + * <pre> + * [any string] + * </pre> + * + * @param async + * <pre> + * [true|false] + * </pre> + * + * @return + * {@link Response } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public Response delete(Boolean async, String correlationId) throws ClientProtocolException, + ServerException, IOException { + String url = this.getHref(); + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + if (correlationId != null) { + headersBuilder.add("Correlation-Id", correlationId); + } + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(url); + if (async != null) { + urlBuilder.add("async", async, UrlParameterType.MATRIX); + } + url = urlBuilder.build(); + + return getProxy().delete(url, Response.class, headers); + } } diff --git a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDogs.java b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDogs.java index 9851d0e..3cea346 100644 --- a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDogs.java +++ b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/TemplateWatchDogs.java @@ -120,9 +120,47 @@ } /** + * Lists TemplateWatchDog objects. + * + * @param max + * <pre> + * [max results] + * </pre> + * + * + * @return List of {@link TemplateWatchDog } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public List<TemplateWatchDog> list(Integer max) throws ClientProtocolException, + ServerException, IOException { + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(this.parent.getHref() + SLASH + getName()); + if (max != null) { + urlBuilder.add("max", max, UrlParameterType.MATRIX); + } + String url = urlBuilder.build(); + + return list(url, org.ovirt.engine.sdk.entities.WatchDogs.class, + TemplateWatchDog.class, headers); + } + /** * Adds WatchDog object. * * @param watchdog {@link org.ovirt.engine.sdk.entities.WatchDog} + * <pre> + * watchdog.action + * watchdog.model + * </pre> + * * @return * {@link TemplateWatchDog } * @@ -147,6 +185,95 @@ org.ovirt.engine.sdk.entities.WatchDog.class, TemplateWatchDog.class, headers); } + /** + * Adds WatchDog object. + * + * @param watchdog {@link org.ovirt.engine.sdk.entities.WatchDog} + * <pre> + * watchdog.action + * watchdog.model + * </pre> + * + * @param expect + * <pre> + * [201-created] + * </pre> + * + * @return + * {@link TemplateWatchDog } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public TemplateWatchDog add(org.ovirt.engine.sdk.entities.WatchDog watchdog, String expect) throws + ClientProtocolException, ServerException, IOException { + String url = this.parent.getHref() + SLASH + getName(); + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + if (expect != null) { + headersBuilder.add("Expect", expect); + } + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(url); + url = urlBuilder.build(); + + return getProxy().add(url, watchdog, + org.ovirt.engine.sdk.entities.WatchDog.class, + TemplateWatchDog.class, headers); + } + /** + * Adds WatchDog object. + * + * @param watchdog {@link org.ovirt.engine.sdk.entities.WatchDog} + * <pre> + * watchdog.action + * watchdog.model + * </pre> + * + * @param expect + * <pre> + * [201-created] + * </pre> + * @param correlationId + * <pre> + * [any string] + * </pre> + * + * @return + * {@link TemplateWatchDog } + * + * @throws ClientProtocolException + * Signals that HTTP/S protocol error has occurred. + * @throws ServerException + * Signals that an oVirt api error has occurred. + * @throws IOException + * Signals that an I/O exception of some sort has occurred. + */ + public TemplateWatchDog add(org.ovirt.engine.sdk.entities.WatchDog watchdog, String expect, String correlationId) throws + ClientProtocolException, ServerException, IOException { + String url = this.parent.getHref() + SLASH + getName(); + + HttpHeaderBuilder headersBuilder = new HttpHeaderBuilder(); + if (expect != null) { + headersBuilder.add("Expect", expect); + } + if (correlationId != null) { + headersBuilder.add("Correlation-Id", correlationId); + } + List<Header> headers = headersBuilder.build(); + + UrlBuilder urlBuilder = new UrlBuilder(url); + url = urlBuilder.build(); + + return getProxy().add(url, watchdog, + org.ovirt.engine.sdk.entities.WatchDog.class, + TemplateWatchDog.class, headers); + } } diff --git a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/entities/JobOwner.java b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/entities/JobOwner.java index 34c819c..4b936ca 100644 --- a/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/entities/JobOwner.java +++ b/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/entities/JobOwner.java @@ -38,6 +38,26 @@ // ********************* GENERATED CODE - DO NOT MODIFY **************** // ********************************************************************* +// +// Copyright (c) 2012 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// ********************************************************************* +// ********************* GENERATED CODE - DO NOT MODIFY **************** +// ********************************************************************* + package org.ovirt.engine.sdk.entities; @@ -72,3 +92,4 @@ } + -- To view, visit http://gerrit.ovirt.org/32765 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28d275958ab5350870f86f38f41c190f6f001748 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk-java Gerrit-Branch: sdk_3.5 Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
