Juan Hernandez has submitted this change and it was merged.
Change subject: codegen: Use files instead of HTTP requests
......................................................................
codegen: Use files instead of HTTP requests
Currently the code generator issues HTTP requests to a live engine in
order to retrieve the XML schema of the entities and the RSDL. This
complicates the execution of the code generator and it makes difficult
to know exactly which schema and which RSDL was used to generate the
code. This patch adds the XML schema and the RSDL document to the
repository, in the following two files:
src/main/resources/api.xsd
src/main/resources/api.rsdl
These files are initially added empty, to avoid mixing the changes to
the code with the changes to these documents. The next patch will add
the actual files from the latest master.
The patch also modifies the generator so that it instead of connecting
to a live engine it uses always these two files.
When the XML schema or the RSDL need to be updated it can be done
manually or using the new "update-metadata" profile:
mvn validate -Pupdate-metadata \
-Dapi.url=https://localhost/ovirt-engine/api \
-Dapi.user=admin@internal \
-Dapi.password=letmein!
This will download the files from the live engine and update the local
copies, which will then need to be manually commited to the source
repository.
Change-Id: Id273997a87e1e1c0882fd5a789fa7e057b20734a
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M .gitignore
M ovirt-engine-sdk-java-codegen/pom.xml
M ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/Main.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/common/AbstractCodegen.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/common/ICodegen.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/rsdl/ApiCodegen.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/rsdl/RsdlCodegen.java
M
ovirt-engine-sdk-java-codegen/src/main/java/org/ovirt/engine/sdk/codegen/xsd/XsdCodegen.java
A ovirt-engine-sdk-java-codegen/src/main/resources/README
A ovirt-engine-sdk-java-codegen/src/main/resources/api.rsdl
A ovirt-engine-sdk-java-codegen/src/main/resources/api.xsd
11 files changed, 287 insertions(+), 215 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/23686
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id273997a87e1e1c0882fd5a789fa7e057b20734a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk-java
Gerrit-Branch: sdk_3.3
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>