Revision 9b8862eb src/image/ImagePool.cc
src/image/ImagePool.cc | ||
---|---|---|
67 | 67 |
default_type = _default_type; |
68 | 68 |
} |
69 | 69 |
|
70 |
default_public = "NO"; |
|
71 |
|
|
70 | 72 |
// Read from the DB the existing images, and build the ID:Name map |
71 | 73 |
set_callback(static_cast<Callbackable::Callback>(&ImagePool::init_cb)); |
72 | 74 |
|
... | ... | |
93 | 95 |
string name = ""; |
94 | 96 |
string source = ""; |
95 | 97 |
string type = ""; |
98 |
string public_attr = ""; |
|
96 | 99 |
string original_path = ""; |
97 | 100 |
string dev_prefix = ""; |
98 | 101 |
|
... | ... | |
142 | 145 |
img->image_template.erase("TYPE"); |
143 | 146 |
} |
144 | 147 |
|
148 |
img->get_template_attribute("PUBLIC", public_attr); |
|
149 |
|
|
150 |
if ( public_attr.empty() == true ) |
|
151 |
{ |
|
152 |
public_attr = default_public; |
|
153 |
} |
|
154 |
else |
|
155 |
{ |
|
156 |
img->image_template.erase("PUBLIC"); |
|
157 |
} |
|
158 |
|
|
145 | 159 |
img->get_template_attribute("ORIGINAL_PATH", original_path); |
146 | 160 |
|
147 | 161 |
if ( (type == "OS" || type == "CDROM") && |
... | ... | |
175 | 189 |
|
176 | 190 |
img->name = name; |
177 | 191 |
img->source = tmp_sourcestream.str(); |
192 |
img->public_img = public_attr; |
|
178 | 193 |
|
179 | 194 |
if (img->set_type(type) != 0) |
180 | 195 |
{ |
Also available in: Unified diff