veewee-to-packer 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,6 +83,7 @@ module VeeweeToPacker
|
|
83
83
|
command = command.gsub("<Esc>", "<esc>").
|
84
84
|
gsub("<Enter>", "<enter>").
|
85
85
|
gsub("<Return>", "<return>").
|
86
|
+
gsub("<Spacebar>", " ").
|
86
87
|
gsub("<Tab>", "<tab>").
|
87
88
|
gsub("%NAME%", "{{ .Name }}").
|
88
89
|
gsub("%IP%", "{{ .HTTPIP }}").
|
@@ -102,6 +103,25 @@ module VeeweeToPacker
|
|
102
103
|
builder["disk_size"] = input.delete(:disk_size).to_i
|
103
104
|
end
|
104
105
|
|
106
|
+
if input[:floppy_files]
|
107
|
+
builder["floppy_files"] = input.delete(:floppy_files).map do |file|
|
108
|
+
files_dir = output_dir.join("floppy")
|
109
|
+
files_dir.mkpath
|
110
|
+
|
111
|
+
file_source = Pathname.new(File.expand_path(file, input_dir))
|
112
|
+
file_dest = files_dir.join(file_source.basename)
|
113
|
+
|
114
|
+
if !file_source.file?
|
115
|
+
raise Error, "Floppy file could not be found: #{file_source}\n" +
|
116
|
+
"Please make sure the Veewee definition you're converting\n" +
|
117
|
+
"was copied with all of its original accompanying files."
|
118
|
+
end
|
119
|
+
|
120
|
+
FileUtils.cp(file_source, file_dest)
|
121
|
+
"floppy/#{file_dest.basename}"
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
105
125
|
if input[:os_type_id]
|
106
126
|
guestos_id = input.delete(:os_type_id)
|
107
127
|
guestos = GUESTOS_MAP[guestos_id]
|
@@ -133,7 +153,16 @@ module VeeweeToPacker
|
|
133
153
|
warnings << "ISO download instructions: #{input.delete(:iso_download_instructions)}"
|
134
154
|
end
|
135
155
|
|
136
|
-
|
156
|
+
if input[:iso_md5]
|
157
|
+
builder["iso_checksum"] = input.delete(:iso_md5)
|
158
|
+
builder["iso_checksum_type"] = "md5"
|
159
|
+
end
|
160
|
+
|
161
|
+
if input[:iso_sha1]
|
162
|
+
builder["iso_checksum"] = input.delete(:iso_sha1)
|
163
|
+
builder["iso_checksum_type"] = "sha1"
|
164
|
+
end
|
165
|
+
|
137
166
|
builder["iso_url"] = input.delete(:iso_src)
|
138
167
|
|
139
168
|
builder["ssh_username"] = input.delete(:ssh_user) if input[:ssh_user]
|
@@ -4,6 +4,8 @@ module VeeweeToPacker
|
|
4
4
|
module Builders
|
5
5
|
class VMware
|
6
6
|
GUESTOS_MAP ={
|
7
|
+
"Windows8_64"=>"windows8-64",
|
8
|
+
"Windows8"=>"windows8",
|
7
9
|
"Windows7_64"=>"windows7-64",
|
8
10
|
"Windows7"=>"windows7",
|
9
11
|
"WindowsNT"=>"winNT",
|
@@ -83,6 +85,7 @@ module VeeweeToPacker
|
|
83
85
|
command = command.gsub("<Esc>", "<esc>").
|
84
86
|
gsub("<Enter>", "<enter>").
|
85
87
|
gsub("<Return>", "<return>").
|
88
|
+
gsub("<Spacebar>", " ").
|
86
89
|
gsub("<Tab>", "<tab>").
|
87
90
|
gsub("%NAME%", "{{ .Name }}").
|
88
91
|
gsub("%IP%", "{{ .HTTPIP }}").
|
@@ -102,6 +105,25 @@ module VeeweeToPacker
|
|
102
105
|
builder["disk_size"] = input.delete(:disk_size).to_i
|
103
106
|
end
|
104
107
|
|
108
|
+
if input[:floppy_files]
|
109
|
+
builder["floppy_files"] = input.delete(:floppy_files).map do |file|
|
110
|
+
files_dir = output_dir.join("floppy")
|
111
|
+
files_dir.mkpath
|
112
|
+
|
113
|
+
file_source = Pathname.new(File.expand_path(file, input_dir))
|
114
|
+
file_dest = files_dir.join(file_source.basename)
|
115
|
+
|
116
|
+
if !file_source.file?
|
117
|
+
raise Error, "Floppy file could not be found: #{file_source}\n" +
|
118
|
+
"Please make sure the Veewee definition you're converting\n" +
|
119
|
+
"was copied with all of its original accompanying files."
|
120
|
+
end
|
121
|
+
|
122
|
+
FileUtils.cp(file_source, file_dest)
|
123
|
+
"floppy/#{file_dest.basename}"
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
105
127
|
if input[:os_type_id]
|
106
128
|
guestos_id = input.delete(:os_type_id)
|
107
129
|
guestos = GUESTOS_MAP[guestos_id]
|
@@ -133,7 +155,16 @@ module VeeweeToPacker
|
|
133
155
|
warnings << "ISO download instructions: #{input.delete(:iso_download_instructions)}"
|
134
156
|
end
|
135
157
|
|
136
|
-
|
158
|
+
if input[:iso_md5]
|
159
|
+
builder["iso_checksum"] = input.delete(:iso_md5)
|
160
|
+
builder["iso_checksum_type"] = "md5"
|
161
|
+
end
|
162
|
+
|
163
|
+
if input[:iso_sha1]
|
164
|
+
builder["iso_checksum"] = input.delete(:iso_sha1)
|
165
|
+
builder["iso_checksum_type"] = "sha1"
|
166
|
+
end
|
167
|
+
|
137
168
|
builder["iso_url"] = input.delete(:iso_src)
|
138
169
|
|
139
170
|
builder["ssh_username"] = input.delete(:ssh_user) if input[:ssh_user]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veewee-to-packer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Converts Veewee templates to Packer templates.
|
15
15
|
email:
|