equal
deleted
inserted
replaced
1808 suri = self._suri_from_volume_info(connection_info) |
1808 suri = self._suri_from_volume_info(connection_info) |
1809 |
1809 |
1810 with ZoneConfig(zone) as zc: |
1810 with ZoneConfig(zone) as zc: |
1811 zc.addresource("device", [zonemgr.Property("storage", suri)]) |
1811 zc.addresource("device", [zonemgr.Property("storage", suri)]) |
1812 |
1812 |
1813 # apply the configuration to the running zone |
|
1814 zone.apply() |
|
1815 |
|
1816 def detach_volume(self, connection_info, instance, mountpoint, |
1813 def detach_volume(self, connection_info, instance, mountpoint, |
1817 encryption=None): |
1814 encryption=None): |
1818 """Detach the disk attached to the instance.""" |
1815 """Detach the disk attached to the instance.""" |
1819 name = instance['name'] |
1816 name = instance['name'] |
1820 zone = self._get_zone_by_name(name) |
1817 zone = self._get_zone_by_name(name) |
1836 "'%s'") % (suri, name)) |
1833 "'%s'") % (suri, name)) |
1837 return |
1834 return |
1838 |
1835 |
1839 with ZoneConfig(zone) as zc: |
1836 with ZoneConfig(zone) as zc: |
1840 zc.removeresources("device", [zonemgr.Property("storage", suri)]) |
1837 zc.removeresources("device", [zonemgr.Property("storage", suri)]) |
1841 |
|
1842 # apply the configuration to the running zone |
|
1843 zone.apply() |
|
1844 |
1838 |
1845 def swap_volume(self, old_connection_info, new_connection_info, |
1839 def swap_volume(self, old_connection_info, new_connection_info, |
1846 instance, mountpoint, resize_to): |
1840 instance, mountpoint, resize_to): |
1847 """Replace the disk attached to the instance. |
1841 """Replace the disk attached to the instance. |
1848 |
1842 |