Daniel Erez has posted comments on this change.

Change subject: restapi: openstack volume providers root collection
......................................................................


Patch Set 2:

(6 comments)

https://gerrit.ovirt.org/#/c/39003/2/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackVolumeProviderResource.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackVolumeProviderResource.java:

Line 1: /*
Line 2: * Copyright (c) 2014 Red Hat, Inc.
> 2015?
done :)
Line 3: *
Line 4: * Licensed under the Apache License, Version 2.0 (the "License");
Line 5: * you may not use this file except in compliance with the License.
Line 6: * You may obtain a copy of the License at


https://gerrit.ovirt.org/#/c/39003/2/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml:

Line 6696:           openstack_volume_provider.username: xs:string
Line 6697:           openstack_volume_provider.password: xs:string
Line 6698:           openstack_volume_provider.properties.property--COLLECTION:
Line 6699:             property.name: xs:string
Line 6700:             property.value: xs:string
> Shouldn't "auth_url" be specified here as well?
Done
Line 6701:         description: update the specified OpenStack volume provider 
in the system
Line 6702:     urlparams: {}
Line 6703:     headers:
Line 6704:       Content-Type: {value: application/xml|json, required: true}


Line 6709:     body:
Line 6710:       parameterType: OpenStackVolumeProvider
Line 6711:       signatures:
Line 6712:       - mandatoryArguments:
Line 6713:           openstack_image_provider.name: xs:string
> According to the code the Data center id or name is mandatory as well.
Done
Line 6714:         optionalArguments:
Line 6715:           openstack_volume_provider.description: xs:string
Line 6716:           openstack_volume_provider.url: xs:string
Line 6717:           openstack_volume_provider.data_center.id|name: xs:string,


Line 6719:           openstack_volume_provider.username: xs:string
Line 6720:           openstack_volume_provider.password: xs:string
Line 6721:           openstack_volume_provider.properties.property--COLLECTION:
Line 6722:             property.name: xs:string
Line 6723:             property.value: xs:string
> auth_url?
Done
Line 6724:         description: add a new OpenStack volume provider to the 
system
Line 6725:     urlparams: {}
Line 6726:     headers:
Line 6727:       Content-Type: {value: application/xml|json, required: true}


https://gerrit.ovirt.org/#/c/39003/2/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackVolumeProvidersResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackVolumeProvidersResource.java:

Line 94:     }
Line 95: 
Line 96:     @Override
Line 97:     public Response add(OpenStackVolumeProvider provider) {
Line 98:         validateParameters(provider, "name", "dataCenter.name|id");
> This means that the Data Center name or id is mandatory, but in the RSDL me
just missed it in the RSDL... done.
Line 99:         StoragePool storagePool = 
getStoragePool(provider.getDataCenter());
Line 100:         provider.setDataCenter(DataCenterMapper.map(storagePool, 
null));
Line 101:         return performCreate(
Line 102:                 VdcActionType.AddProvider,


Line 131:                     new IdQueryParameters(id), "Datacenter: id=" + 
dataCenter.getId());
Line 132:         } else if (dataCenter.isSetName()) {
Line 133:             pool = getEntity(StoragePool.class, 
VdcQueryType.GetStoragePoolByDatacenterName,
Line 134:                     new NameQueryParameters(dataCenter.getName()), 
"Datacenter: name=" + dataCenter.getName());
Line 135:         }
> Do we have a query to get a Data Center by id (or name). If we do it is usu
it is using queries, the identifier just looks like search... :)
Line 136:         if (pool == null) {
Line 137:             notFound(DataCenter.class);
Line 138:         }
Line 139:         return pool;


-- 
To view, visit https://gerrit.ovirt.org/39003
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I89d2e9d975750d2ec22599079603bd48cff2603e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to