@Override public Response exportToPathOnHost(Action action) { ExportVmToOvaParameters params = new ExportVmToOvaParameters(); params.setEntityId(guid); params.setProxyHostId(getHostId(action)); params.setDirectory(action.getDirectory()); params.setName(action.getFilename()); return doAction(ActionType.ExportVmToOva, params, action); }
@Override public Response exportToPathOnHost(Action action) { ExportOvaParameters params = new ExportOvaParameters(); params.setEntityType(VmEntityType.TEMPLATE); params.setEntityId(guid); params.setProxyHostId(getHostId(action)); params.setDirectory(action.getDirectory()); params.setName(action.getFilename()); return doAction(ActionType.ExportVmTemplateToOva, params, action); }
public static Method getExportSignature(Action action) throws NoSuchMethodException, SecurityException { if (action == null) { throw new ValidationException("Action is mandatory but was not provided."); } /** * to_path_on_host */ if (action!=null && (action.getHost()!=null && action.getHost().getId()!=null || action.getHost()!=null && action.getHost().getName()!=null) && action.getDirectory()!=null ) { return TemplateResource.class.getMethod("exportToPathOnHost", Action.class); } /** * to_export_domain */ if (action!=null && (action.getStorageDomain()!=null && action.getStorageDomain().getId()!=null || action.getStorageDomain()!=null && action.getStorageDomain().getName()!=null) ) { return TemplateResource.class.getMethod("exportToExportDomain", Action.class); } throw new ValidationException("No matching signature found, make sure that mandatory attributes are provided."); }
public static Method getExportSignature(Action action) throws NoSuchMethodException, SecurityException { if (action == null) { throw new ValidationException("Action is mandatory but was not provided."); } /** * to_path_on_host */ if (action!=null && (action.getHost()!=null && action.getHost().getId()!=null || action.getHost()!=null && action.getHost().getName()!=null) && action.getDirectory()!=null ) { return VmResource.class.getMethod("exportToPathOnHost", Action.class); } /** * to_export_domain */ if (action!=null && (action.getStorageDomain()!=null && action.getStorageDomain().getId()!=null || action.getStorageDomain()!=null && action.getStorageDomain().getName()!=null) ) { return VmResource.class.getMethod("exportToExportDomain", Action.class); } throw new ValidationException("No matching signature found, make sure that mandatory attributes are provided."); }