(self, name, size, vol_fmt='qcow2', metadata=False)
| 201 | return vol_list |
| 202 | |
| 203 | def create_volume(self, name, size, vol_fmt='qcow2', metadata=False): |
| 204 | size = int(size) * 1073741824 |
| 205 | storage_type = self.get_type() |
| 206 | alloc = size |
| 207 | if vol_fmt == 'unknown': |
| 208 | vol_fmt = 'raw' |
| 209 | if storage_type == 'dir': |
| 210 | name += '.img' |
| 211 | alloc = 0 |
| 212 | xml = """ |
| 213 | <volume> |
| 214 | <name>%s</name> |
| 215 | <capacity>%s</capacity> |
| 216 | <allocation>%s</allocation> |
| 217 | <target> |
| 218 | <format type='%s'/> |
| 219 | </target> |
| 220 | </volume>""" % (name, size, alloc, vol_fmt) |
| 221 | self._createXML(xml, metadata) |
| 222 | |
| 223 | def clone_volume(self, name, clone, vol_fmt=None, metadata=False): |
| 224 | storage_type = self.get_type() |
nothing calls this directly
no test coverage detected