Greg Padgett has posted comments on this change.
Change subject: restapi: cloud-init [6/6] - rest api for start vm
......................................................................
Patch Set 1: (4 inline comments)
Some issues handled, most remain pending (see comments inline).
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 900: </xs:element>
Line 901: </xs:sequence>
Line 902: </xs:complexType>
Line 903:
Line 904: <xs:element name="attachment_types" type="AttachmentTypes"/>
Done
Line 905:
Line 906: <xs:complexType name="AttachmentTypes">
Line 907: <xs:sequence>
Line 908: <xs:element name="attachment_type" type="xs:string"
minOccurs="0" maxOccurs="unbounded">
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
Line 243
Line 244
Line 245
Line 246
Line 247
It's because cloud-init can be used any time the vm is started, not only the
first time. The wrong thing was added here in an earlier patch just for the
sake of stubbing in compatibility with backend changes; this patch has the
fixes for it to work properly in the cloud-init context.
....................................................
File
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
Line 967: return entity;
Line 968: }
Line 969:
Line 970: @Mapping(from = Attachment.AttachmentType.class, to =
org.ovirt.engine.api.model.AttachmentType.class)
Line 971: public static org.ovirt.engine.api.model.AttachmentType
map(Attachment.AttachmentType attachmentType,
org.ovirt.engine.api.model.AttachmentType template) {
Added missing file, now renamed to PayloadEncoding.java
Line 972: switch (attachmentType) {
Line 973: case BASE64: return
org.ovirt.engine.api.model.AttachmentType.BASE64;
Line 974: case PLAINTEXT: return
org.ovirt.engine.api.model.AttachmentType.PLAINTEXT;
Line 975: default: return null;
Line 1046: if (model.getPasswords() != null &&
!model.getPasswords().getPassword().isEmpty()) {
Line 1047: for (Password password :
model.getPasswords().getPassword()) {
Line 1048: if ("root".equals(password.getUser())) {
Line 1049: entity.setRootPassword(password.getValue());
Line 1050: }
reserved for future, only root is supported now. Is there a good place to add
this input verification without negatively impacting schema compatibility?
Line 1051: }
Line 1052: }
Line 1053:
Line 1054: if (model.getFiles() != null &&
!model.getFiles().getFile().isEmpty()) {
--
To view, visit http://gerrit.ovirt.org/15537
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ad0bfeca23cf8d4b2887010081d63c258032611
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches