Juan Hernandez has posted comments on this change.

Change subject: core, restapi: reporting & removal of unmanaged networks.
......................................................................


Patch Set 6:

(7 comments)

http://gerrit.ovirt.org/#/c/37525/6/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd:

Line 3806:     <xs:complexContent>
Line 3807:       <xs:extension base="BaseResource">
Line 3808:         <xs:sequence>
Line 3809:           <xs:element name="nic_name" type="xs:string" minOccurs="0" 
maxOccurs="1"/>
Line 3810:           <xs:element ref="host_nic" minOccurs="0" maxOccurs="1"/>
Why do you need "nic_name" and "host_nic"? Isn't "nic_name" the same that 
"host_nic.name"?
Line 3811:           <xs:element ref="host" minOccurs="0" maxOccurs="1"/>
Line 3812:         </xs:sequence>
Line 3813:       </xs:extension>
Line 3814: 


Line 3813:       </xs:extension>
Line 3814: 
Line 3815:     </xs:complexContent>
Line 3816: 
Line 3817:   </xs:complexType>
There are some extra blank lines above, you may want to remove them before 
merging.
Line 3818: 
Line 3819:   <xs:complexType name="HostNics">
Line 3820:     <xs:complexContent>
Line 3821:       <xs:extension base="BaseResources">


http://gerrit.ovirt.org/#/c/37525/6/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNetworkAttachmentsResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNetworkAttachmentsResource.java:

Line 11: import org.ovirt.engine.core.compat.Guid;
Line 12: 
Line 13: public class BackendHostNetworkAttachmentsResource extends 
AbstractBackendNetworkAttachmentsResource {
Line 14: 
Line 15:     public  BackendHostNetworkAttachmentsResource(Guid hostId) {
Remove the extra space before merging.
Line 16:         super(hostId);
Line 17:     }
Line 18: 
Line 19:     @SingleEntityResource


http://gerrit.ovirt.org/#/c/37525/6/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendUnmanagedNetworkResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendUnmanagedNetworkResource.java:

Line 34:         return null;
Line 35:     }
Line 36: 
Line 37:     @Override
Line 38:     protected org.ovirt.engine.api.model.UnmanagedNetwork 
addParents(org.ovirt.engine.api.model.UnmanagedNetwork model) {
No need to use the fully qualified name of the UnmanagedNetwork class, as you 
are already importing it.
Line 39:         Host host = new Host();
Line 40:         model.setHost(host);
Line 41:         model.getHost().setId(hostId.toString());
Line 42:         if (model.isSetHostNic()) {


http://gerrit.ovirt.org/#/c/37525/6/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendUnmanagedNetworksResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendUnmanagedNetworksResource.java:

Line 69:         return model;
Line 70:     }
Line 71: 
Line 72:     @Override
Line 73:     protected org.ovirt.engine.api.model.UnmanagedNetwork 
addParents(org.ovirt.engine.api.model.UnmanagedNetwork model) {
No need to use the fully qualified class name, it is already imported.
Line 74:         Host host = new Host();
Line 75:         model.setHost(host);
Line 76:         model.getHost().setId(hostId.toString());
Line 77:         if (model.isSetHostNic()) {


http://gerrit.ovirt.org/#/c/37525/6/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/UnmanagedNetworkMapper.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/UnmanagedNetworkMapper.java:

Line 23:             entity.setNetworkName(model.getName());
Line 24:         }
Line 25: 
Line 26:         if (model.isSetNicName()) {
Line 27:             entity.setNicName(model.getNicName());
This is doing the same ...
Line 28:         }
Line 29: 
Line 30:         if (model.isSetHostNic()) {
Line 31:             HostNIC hostNic = model.getHostNic();


Line 33:                 entity.setNicId(GuidUtils.asGuid(hostNic.getId()));
Line 34:             }
Line 35: 
Line 36:             if (hostNic.isSetName()) {
Line 37:                 entity.setNicName(hostNic.getName());
... than this, so probably you don't need the "nic_name" element.
Line 38:             }
Line 39:         }
Line 40: 
Line 41:         return entity;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idcf6e1292ce6f3a335051123be8c3389e8230bf0
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to