Change in ovirt-engine[master]: restapi: Generate Action XML types
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Wed Nov 18 13:26:24 UTC 2015
Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: Generate Action XML types
......................................................................
restapi: Generate Action XML types
Currently the Action XML type is defined in the XML schema, in the
api.xsd file. This type is basically the union of two groups of
elements: ActionParameterGroup and ActionResponseGroup. The first is the
union of all the input parameters of all the action methods. The second
is the union of all the output parameters of all the action methods.
This patch removes all the Action related XML types from the api.xsd
file and changes the schema generator so that it generates them from the
model. The specifications of the parameters are also moved to the
corresponding service interfaces.
For example, the action to migrate a virtual machine uses a "force"
parameter that is currently defined in the XML schema as follows:
<!-- should migration be forced if VM is pinned to host? -->
<xs:element name="force" type="xs:boolean" minOccurs="0"/>
This patch moves it to the definition of the virtual machine service,
the VmService interface, where it is specified as follows:
@Type
public interface VmService {
interface Migrate {
/**
* Indicates if migration should be forced if VM is
* pinned to host.
*/
@In Boolean force();
}
}
The schema generator collects the parameters of all the services and
generates the ActionParameterGroup and ActionResponseGroup from that.
Change-Id: I581f98794c21e6c03df897d3415dfbc55d1820a8
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/interface/definition/src/main/schema/api.xsd
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
M backend/manager/modules/restapi/metamodel/analyzer/src/main/java/org/ovirt/api/metamodel/analyzer/ModelAnalyzer.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/Attribute.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/Link.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/Method.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/Parameter.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/StructType.java
M backend/manager/modules/restapi/metamodel/concepts/src/main/java/org/ovirt/api/metamodel/concepts/Type.java
M backend/manager/modules/restapi/metamodel/tool/src/main/java/org/ovirt/api/metamodel/tool/JaxrsNames.java
M backend/manager/modules/restapi/metamodel/tool/src/main/java/org/ovirt/api/metamodel/tool/SchemaGenerator.java
M backend/manager/modules/restapi/model/src/main/java/services/DiskService.java
M backend/manager/modules/restapi/model/src/main/java/services/ExternalProviderService.java
M backend/manager/modules/restapi/model/src/main/java/services/HostNicService.java
M backend/manager/modules/restapi/model/src/main/java/services/HostNicsService.java
M backend/manager/modules/restapi/model/src/main/java/services/HostService.java
M backend/manager/modules/restapi/model/src/main/java/services/ImageService.java
M backend/manager/modules/restapi/model/src/main/java/services/JobService.java
M backend/manager/modules/restapi/model/src/main/java/services/SnapshotService.java
M backend/manager/modules/restapi/model/src/main/java/services/StepService.java
M backend/manager/modules/restapi/model/src/main/java/services/StorageDomainService.java
M backend/manager/modules/restapi/model/src/main/java/services/StorageDomainTemplateService.java
M backend/manager/modules/restapi/model/src/main/java/services/StorageDomainVmService.java
M backend/manager/modules/restapi/model/src/main/java/services/TemplateService.java
M backend/manager/modules/restapi/model/src/main/java/services/VmGraphicsConsoleService.java
M backend/manager/modules/restapi/model/src/main/java/services/VmService.java
M backend/manager/modules/restapi/model/src/main/java/services/gluster/GlusterBrickService.java
M backend/manager/modules/restapi/model/src/main/java/services/gluster/GlusterBricksService.java
M backend/manager/modules/restapi/model/src/main/java/services/gluster/GlusterHookService.java
M backend/manager/modules/restapi/model/src/main/java/services/gluster/GlusterVolumeService.java
M backend/manager/modules/restapi/model/src/main/java/services/openstack/OpenstackImageService.java
31 files changed, 505 insertions(+), 180 deletions(-)
Approvals:
Ori Liel: Looks good to me, but someone else must approve
Juan Hernandez: Verified; Looks good to me, approved; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/48467
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I581f98794c21e6c03df897d3415dfbc55d1820a8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list