@@ -0,0 +1,2544 @@
+/**%0A * %0A * This software is licensed under the GNU General Public License v3 or later.%0A * %0A * It is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or any later version.%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A * %0A * You should have received a copy of the GNU General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A * %0A */%0Apackage com.cloud.hypervisor.xen.resource;%0A%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport javax.ejb.Local;%0Aimport org.apache.log4j.Logger;%0Aimport org.apache.xmlrpc.XmlRpcException;%0A%0Aimport com.cloud.agent.api.Answer;%0Aimport com.cloud.agent.api.Command;%0Aimport com.cloud.agent.api.SecurityIngressRuleAnswer;%0Aimport com.cloud.agent.api.SecurityIngressRulesCmd;%0Aimport com.cloud.hypervisor.xen.resource.CitrixResourceBase;%0Aimport com.xensource.xenapi.VM;%0Aimport com.cloud.resource.ServerResource;%0Aimport com.cloud.utils.exception.CloudRuntimeException;%0Aimport com.cloud.utils.script.Script;%0Aimport com.xensource.xenapi.Connection;%0Aimport com.xensource.xenapi.Types.XenAPIException;%0A%0A%0A@Local(value=ServerResource.class)%0Apublic class XenServer56FP1Resource extends CitrixResourceBase %7B%0A    private static final Logger s_logger = Logger.getLogger(XenServer56FP1Resource.class);%0A    %0A    public XenServer56FP1Resource() %7B%0A        super();%0A    %7D%0A    %0A    @Override%0A    protected String getGuestOsType(String stdType, boolean bootFromCD) %7B%0A    %09return CitrixHelper.getXenServerGuestOsType(stdType);%0A    %7D%0A%0A    @Override%0A    protected void setMemory(Connection conn, VM vm, long memsize) throws XmlRpcException, XenAPIException %7B%0A        vm.setMemoryLimits(conn, memsize, memsize, memsize, memsize);%0A    %7D   %0A    %0A    @Override%0A    protected List%3CFile%3E getPatchFiles() %7B      %0A        List%3CFile%3E files = new ArrayList%3CFile%3E();%0A        String patch = %22scripts/vm/hypervisor/xenserver/xenserver56fp1/patch%22;    %0A        String patchfilePath = Script.findScript(%22%22 , patch);%0A        if ( patchfilePath == null ) %7B%0A            throw new CloudRuntimeException(%22Unable to find patch file %22 + patch);%0A        %7D%0A        File file = new File(patchfilePath);%0A        files.add(file);%0A        return files;%0A    %7D%0A%0A%0A%7D%0A

add XenServer56FP1Resource.java