abiquo-etk 0.4.18 → 0.4.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.19
data/abiquo-etk.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{abiquo-etk}
8
- s.version = "0.4.18"
8
+ s.version = "0.4.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergio Rubio"]
@@ -138,22 +138,37 @@ if ARGV[0] == 'instant-deploy'
138
138
  end
139
139
  `/usr/bin/qemu-img create -f qcow2 #{disk_file} 20GB`
140
140
 
141
- # Download the iso
142
- downloader = HTTPDownloader.new
143
- puts "Downloading Abiquo ISO..."
144
- begin
145
- downloader.download! iso_url, File.new(target_dir + '/instant-deploy.iso', 'w')
146
- rescue Exception
147
- $stderr.puts "Error downloading Abiquo ISO. Aborting."
148
- exit
141
+
142
+ if iso_url =~ /http:\/\//
143
+ # Download the iso
144
+ downloader = HTTPDownloader.new
145
+ puts "Downloading Abiquo ISO..."
146
+ cdrom = ""
147
+ begin
148
+ downloader.download! iso_url, File.new(target_dir + '/instant-deploy.iso', 'w')
149
+ cdrom = target_dir + '/instant-deploy.iso'
150
+ rescue Exception
151
+ $stderr.puts "Error downloading Abiquo ISO. Aborting."
152
+ exit
153
+ end
154
+ else
155
+ if iso_url =~ /file:/
156
+ iso_url.gsub!('file://','')
157
+ end
158
+ if not File.exist? iso_url
159
+ $stderr.puts "The ISO file specified does not exist."
160
+ exit 1
161
+ else
162
+ cdrom = iso_url
163
+ end
149
164
  end
150
165
 
151
- puts "\nBooting the Installer...\n\n"
152
166
  # Boot
153
167
  puts "\nAfter the install process, open the browser and type:\n"
154
168
  puts "\nhttp://127.0.0.1:8980/client-premium\n\n"
155
169
  puts "To open the Abiquo Web Console."
156
- `kvm -m 1024 -drive file=#{disk_file},if=scsi,boot=on -net user,hostfwd=tcp:127.0.0.1:8980-:8080,hostfwd=tcp:127.0.0.1:2300-:22 -net nic -cdrom #{target_dir}/instant-deploy.iso -boot once=d > /dev/null 2>&1 `
170
+ puts "\nBooting the Installer...\n\n"
171
+ `kvm -m 1024 -drive file=#{disk_file},if=scsi,boot=on -net user,hostfwd=tcp:127.0.0.1:8980-:8080,hostfwd=tcp:127.0.0.1:2300-:22 -net nic -cdrom #{cdrom} -boot once=d > /dev/null 2>&1 `
157
172
  end
158
173
 
159
174
  target_dir = "abiquo-instant-deploy-#{Time.now.strftime "%s"}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiquo-etk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 18
10
- version: 0.4.18
9
+ - 19
10
+ version: 0.4.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio