Michael Pasternak has posted comments on this change.

Change subject: restapi: Make adding (virtio-)console to virtual machines 
optional
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(10 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 1062:       </xs:element>
Line 1063:       <xs:element ref="transparent_hugepages" minOccurs="0"/>
Line 1064:     </xs:sequence>
Line 1065:   </xs:complexType>
Line 1066: 
please add type definition here, e.g

<xs:element name="console" type="Console"/>
Line 1067:   <xs:complexType name="Console">
Line 1068:     <xs:attribute name="enabled" type="xs:boolean"/>
Line 1069:   </xs:complexType>
Line 1070: 


Line 1944:           <xs:element name="high_availability" 
type="HighAvailability" minOccurs="0"/>
Line 1945:           <xs:element name="display" type="Display" minOccurs="0" 
maxOccurs="1"/>
Line 1946:           <xs:element name="stateless" type="xs:boolean" 
minOccurs="0"/>
Line 1947:           <xs:element name="delete_protected" type="xs:boolean" 
minOccurs="0"/>
Line 1948:           <xs:element name="console" type="Console" minOccurs="0"/>
<xs:element ref="console" minOccurs="0" maxOccurs="1"/>
Line 1949:           <xs:element name="timezone" type="xs:string" minOccurs="0" 
maxOccurs="1"/>
Line 1950:           <xs:element ref="domain" minOccurs="0" maxOccurs="1"/>
Line 1951:           <xs:element ref="usb" minOccurs="0" maxOccurs="1"/>
Line 1952:           <xs:element name="tunnel_migration" type="xs:boolean" 
minOccurs="0" maxOccurs="1"/>


Line 2138:           <xs:element name="creation_time" type="xs:dateTime" 
minOccurs="0"/>
Line 2139:           <xs:element name="origin" type="xs:string" minOccurs="0"/>
Line 2140:           <xs:element name="stateless" type="xs:boolean" 
minOccurs="0"/>
Line 2141:           <xs:element name="delete_protected" type="xs:boolean" 
minOccurs="0"/>
Line 2142:           <xs:element name="console" type="Console" minOccurs="0"/>
<xs:element ref="console" minOccurs="0" maxOccurs="1"/>
Line 2143:           <xs:element name="timezone" type="xs:string" minOccurs="0" 
maxOccurs="1"/>
Line 2144:           <xs:element ref="domain" minOccurs="0" maxOccurs="1"/>
Line 2145:           <xs:element name="custom_properties" 
type="CustomProperties" minOccurs="0"/>
Line 2146:           <xs:element name="payloads" type="Payloads" minOccurs="0"/>


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendResource.java
Line 418:             return doGetEntity(entityType, query, 
getQueryParams(queryParamsClass, id), id.toString());
Line 419:         }
Line 420:     }
Line 421: 
Line 422:     protected List<String> getConsoleDevicesForEntity(Guid id) {
old comment at PS-3
Line 423:         return getEntity(List.class,
Line 424:                 VdcQueryType.GetConsoleDevices,
Line 425:                 new IdQueryParameters(id),
Line 426:                 "GetConsoleDevices", true);


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolsResource.java
Line 63: 
Line 64:         int size = pool.isSetSize() ? pool.getSize() : 1;
Line 65: 
Line 66:         AddVmPoolWithVmsParameters params = new 
AddVmPoolWithVmsParameters(entity, vm, size, -1);
Line 67:         
params.setConsoleEnabled(!getConsoleDevicesForEntity(template.getId()).isEmpty());
comments in PS-3
Line 68: 
Line 69:         return performCreate(VdcActionType.AddVmPoolWithVms,
Line 70:                                params,
Line 71:                                new 
QueryIdResolver<Guid>(VdcQueryType.GetVmPoolById,


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendTemplateResourceTest.java
Line 98:                                            new Object[] {},
Line 99:                                            true,
Line 100:                                            true));
Line 101: 
Line 102:         verifyModel(resource.update(getModel(0)), 0);
you should be adding new testGetWithAllContent(), i.e console=enabled|disabled 
is triggered by All-Content:True header, so you should make sure it's in the 
representation when this headers is in the request.
Line 103:     }
Line 104: 
Line 105:     protected org.ovirt.engine.core.common.businessentities.VDSGroup 
getVdsGroupEntity() {
Line 106:         return new VDSGroup();


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResourceTest.java
Line 424:         } catch (WebApplicationException wae) {
Line 425:             verifyFault(wae, detail);
Line 426:         }
Line 427:     }
Line 428: 
you should be adding new testListWithAllContent(), i.e console=enabled|disabled 
is triggered by All-Content:True header, so you should make sure it's in the 
representation when this headers is in the request.
Line 429:     @Test
Line 430:     public void testAddIncompleteParameters() throws Exception {
Line 431:         Template model = new Template();
Line 432:         model.setName(NAMES[0]);


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmResourceTest.java
Line 280:                                            true,
Line 281:                                            false));
Line 282: 
Line 283:         setUpActionExpectations(VdcActionType.UpdateVm,
Line 284:                                 VmManagementParametersBase.class,
you should be adding new testGetWithAllContent(), i.e console=enabled|disabled 
is triggered by All-Content:True header, so you should make sure it's in the 
representation when this headers is in the request.
Line 285:                                 new String[] {},
Line 286:                                 new Object[] {},
Line 287:                                 true,
Line 288:                                 true);


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmsResourceTest.java
Line 586:     public void testAdd() throws Exception {
Line 587:         setUriInfo(setUpBasicUriExpectations());
Line 588:         setUpGetPayloadExpectations(1, 2);
Line 589:         setUpGetBallooningExpectations(1, 2);
Line 590:         setUpGetConsoleExpectations(new int[]{1,2});
why did you removed setUpGetCertuficateExpectations(1, 2); ?
Line 591:         setUpEntityQueryExpectations(VdcQueryType.GetVmTemplate,
Line 592:                                      GetVmTemplateParameters.class,
Line 593:                                      new String[] { "Id" },
Line 594:                                      new Object[] { GUIDS[1] },


Line 823:         setUpQueryExpectations(QUERY);
Line 824:         collection.setUriInfo(uriInfo);
Line 825:         verifyCollection(getCollection());
Line 826:     }
Line 827: 
you should be adding new testListWithAllContent(), i.e console=enabled|disabled 
is triggered by All-Content:True header, so you should make sure it's in the 
representation when this headers is in the request.
Line 828:     private void doTestBadAdd(boolean canDo, boolean success, String 
detail)
Line 829:             throws Exception {
Line 830:         setUpEntityQueryExpectations(VdcQueryType.GetVmTemplate,
Line 831:                                      GetVmTemplateParameters.class,


-- 
To view, visit http://gerrit.ovirt.org/16454
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I733e4c4a9c7d8f5dbe68b6b26a49502b8a40ec9d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to