1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-14 01:57:24 +03:00

feature #1650: support urls in oneimage --path

This commit is contained in:
Javi Fontan 2012-11-12 17:37:46 +01:00
parent 19a8422dd1
commit 156ffa6ceb

View File

@ -76,7 +76,9 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
:description => "Path of the image file",
:format => String,
:proc => lambda do |o, options|
if o[0,1]=='/'
if o.match(/^https?:\/\//)
next [0, o]
elsif o[0,1]=='/'
path=o
else
path=Dir.pwd+"/"+o