cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/4.4-forward to 008162a
Date Wed, 18 Jun 2014 22:58:34 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 2ec7359b4 -> 008162a75


CLOUDSTACK-6940:Templates cannot be downloaded from URLs without
matching file extensions.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/008162a7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/008162a7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/008162a7

Branch: refs/heads/4.4-forward
Commit: 008162a75770b83f6249be153f42fd753bdacde5
Parents: 2ec7359
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Jun 18 15:47:57 2014 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Jun 18 15:48:30 2014 -0700

----------------------------------------------------------------------
 .../cloud/template/HypervisorTemplateAdapter.java   | 16 ----------------
 1 file changed, 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/008162a7/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


Mime
View raw message