You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/07/28 16:04:45 UTC
[33/50] git commit: updated refs/heads/4.4 to d5220a8
CLOUDSTACK-6940:Templates cannot be downloaded from URLs without
matching file extensions.
(cherry picked from commit 008162a75770b83f6249be153f42fd753bdacde5)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/30b22ae2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/30b22ae2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/30b22ae2
Branch: refs/heads/4.4
Commit: 30b22ae275f23f018a104d932d4984f74db055d0
Parents: 15ffec2
Author: Min Chen <mi...@citrix.com>
Authored: Wed Jun 18 15:47:57 2014 -0700
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Jul 28 16:02:41 2014 +0200
----------------------------------------------------------------------
.../cloud/template/HypervisorTemplateAdapter.java | 16 ----------------
1 file changed, 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30b22ae2/server/src/com/cloud/template/HypervisorTemplateAdapter.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 51dedf7..20309d6 100755
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -16,8 +16,6 @@
// under the License.
package com.cloud.template;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -130,20 +128,6 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
public TemplateProfile prepare(RegisterTemplateCmd cmd) throws ResourceAllocationException {
TemplateProfile profile = super.prepare(cmd);
String url = profile.getUrl();
- String path = null;
- try {
- URL str = new URL(url);
- path = str.getPath();
- } catch (MalformedURLException ex) {
- throw new InvalidParameterValueException("Please specify a valid URL. URL:" + url + " is invalid");
- }
-
- try {
- checkFormat(cmd.getFormat(), url);
- } catch (InvalidParameterValueException ex) {
- checkFormat(cmd.getFormat(), path);
- }
-
UriUtils.validateUrl(url);
profile.setUrl(url);
// Check that the resource limit for secondary storage won't be exceeded