/*
* Copyright (c) 2010 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*           http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.ovirt.engine.api.resource;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.ovirt.engine.api.model.Action;
import org.ovirt.engine.api.model.Actionable;
import org.ovirt.engine.api.model.Host;
import org.ovirt.engine.api.resource.externalhostproviders.KatelloErrataResource;

@Produces({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
public interface HostResource extends UpdatableResource<Host>, MeasurableResource {
    @DELETE
    Response remove();

    @DELETE
    @Consumes({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
    Response remove(Action action);

    @Path("{action: (approve|install|upgrade|fence|activate|deactivate|commitnetconfig|iscsidiscover|iscsilogin|forceselectspm)}/{oid}")
    public ActionResource getActionSubresource(@PathParam("action")String action, @PathParam("oid")String oid);

    @POST
    @Actionable
    @Path("approve")
    public Response approve(Action action);

    @POST
    @Actionable
    @Path("install")
    public Response install(Action action);

    @POST
    @Actionable
    @Path("upgrade")
    public Response upgrade(Action action);

    @POST
    @Actionable
    @Path("fence")
    public Response fence(Action action);

    @POST
    @Actionable
    @Path("activate")
    public Response activate(Action action);

    @POST
    @Actionable
    @Path("deactivate")
    public Response deactivate(Action action);

    @POST
    @Actionable
    @Path("commitnetconfig")
    public Response commitNetConfig(Action action);

    @POST
    @Actionable
    @Path("iscsidiscover")
    public Response iscsiDiscover(Action action);

    @POST
    @Actionable
    @Path("iscsilogin")
    public Response iscsiLogin(Action action);

    @POST
    @Actionable
    @Path("unregisteredstoragedomainsdiscover")
    public Response unregisteredStorageDomainsDiscover(Action action);

    @POST
    @Actionable
    @Path("refresh")
    public Response refresh(Action action);

    @POST
    @Actionable
    @Path("forceselectspm")
    public Response forceSelectSPM(Action action);

    @Path("numanodes")
    public HostNumaNodesResource getHostNumaNodesResource();

    @Path("nics")
    public HostNicsResource getHostNicsResource();

    @Path("storage")
    public HostStorageResource getHostStorageResource();

    @Path("tags")
    public AssignedTagsResource getTagsResource();

    @Path("hooks")
    public HostHooksResource getHooksResource();

    @Path("permissions")
    public AssignedPermissionsResource getPermissionsResource();

    @Path("fenceagents")
    public FenceAgentsResource getFenceAgentsResource();

    @Path("katelloerrata")
    public KatelloErrataResource getKatelloErrataResource();

    @Path("devices")
    public HostDevicesResource getHostDevicesResource();
}

@@ -1564,23 +1564,16 @@
 %7D%22)%0A    
-public 
 ActionRe
@@ -1709,39 +1709,32 @@
 (%22approve%22)%0A    
-public 
 Response approve
@@ -1798,31 +1798,24 @@
 stall%22)%0A    
-public 
 Response ins
@@ -1879,39 +1879,32 @@
 (%22upgrade%22)%0A    
-public 
 Response upgrade
@@ -1962,39 +1962,32 @@
 th(%22fence%22)%0A    
-public 
 Response fence(A
@@ -2046,39 +2046,32 @@
 %22activate%22)%0A    
-public 
 Response activat
@@ -2139,31 +2139,24 @@
 ivate%22)%0A    
-public 
 Response dea
@@ -2235,31 +2235,24 @@
 onfig%22)%0A    
-public 
 Response com
@@ -2330,39 +2330,32 @@
 idiscover%22)%0A    
-public 
 Response iscsiDi
@@ -2428,31 +2428,24 @@
 login%22)%0A    
-public 
 Response isc
@@ -2543,31 +2543,24 @@
 cover%22)%0A    
-public 
 Response unr
@@ -2655,31 +2655,24 @@
 fresh%22)%0A    
-public 
 Response ref
@@ -2751,23 +2751,16 @@
 m%22)%0A    
-public 
 Response
@@ -2815,31 +2815,24 @@
 nodes%22)%0A    
-public 
 HostNumaNode
@@ -2888,31 +2888,24 @@
 %22nics%22)%0A    
-public 
 HostNicsReso
@@ -2954,31 +2954,24 @@
 orage%22)%0A    
-public 
 HostStorageR
@@ -3019,39 +3019,32 @@
 ath(%22tags%22)%0A    
-public 
 AssignedTagsReso
@@ -3087,31 +3087,24 @@
 hooks%22)%0A    
-public 
 HostHooksRes
@@ -3159,23 +3159,16 @@
 s%22)%0A    
-public 
 Assigned
@@ -3243,23 +3243,16 @@
 s%22)%0A    
-public 
 FenceAge
@@ -3321,23 +3321,16 @@
 a%22)%0A    
-public 
 KatelloE
@@ -3397,23 +3397,16 @@
 s%22)%0A    
-public 
 HostDevi

Remove visibility modifier from HostResource