equal
deleted
inserted
replaced
|
1 This in-house patch adds a subclass to LiveMigrateData to support |
|
2 Solaris kernel zone live migration. It will be proposed to the upstream |
|
3 along with the Zones driver for Nova at some point in the future. |
|
4 |
|
5 --- nova-13.1.0/nova/objects/migrate_data.py.~1~ 2016-06-14 08:45:49.000000000 -0700 |
|
6 +++ nova-13.1.0/nova/objects/migrate_data.py 2016-08-04 00:28:57.050454220 -0700 |
|
7 @@ -257,3 +257,26 @@ class XenapiLiveMigrateData(LiveMigrateD |
|
8 @obj_base.NovaObjectRegistry.register |
|
9 class HyperVLiveMigrateData(LiveMigrateData): |
|
10 VERSION = '1.0' |
|
11 + |
|
12 + |
|
13 +@obj_base.NovaObjectRegistry.register |
|
14 +class SolarisZonesLiveMigrateData(LiveMigrateData): |
|
15 + VERSION = '1.0' |
|
16 + |
|
17 + fields = { |
|
18 + 'hypervisor_hostname': fields.StringField(), |
|
19 + } |
|
20 + |
|
21 + def to_legacy_dict(self, pre_migration_result=False): |
|
22 + legacy = super(SolarisZonesLiveMigrateData, self).to_legacy_dict() |
|
23 + if self.obj_attr_is_set('hypervisor_hostname'): |
|
24 + legacy['hypervisor_hostname'] = self.hypervisor_hostname |
|
25 + if pre_migration_result: |
|
26 + legacy['pre_live_migration_result'] = {} |
|
27 + |
|
28 + return legacy |
|
29 + |
|
30 + def from_legacy_dict(self, legacy): |
|
31 + super(SolarisZonesLiveMigrateData, self).from_legacy_dict(legacy) |
|
32 + if 'hypervisor_hostname' in legacy: |
|
33 + self.hypervisor_hostname = legacy['hypervisor_hostname'] |