Properly serialize all values for upgrade strategy
This commit adds _single_controller attribute to to the "from_dict" and "as_dict" methods of upgrade strategy to maintain consistency with other types of strategy. Story: 2008055 Task: 41974 Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com> Change-Id: I04e34c214e39a7fe34e8ea38ee213db670c4837b
This commit is contained in:
parent
af3bddc28d
commit
2e8dbb5a7b
|
@ -1700,6 +1700,7 @@ class SwUpgradeStrategy(SwUpdateStrategy):
|
||||||
|
|
||||||
super(SwUpgradeStrategy, self).from_dict(data, build_phase, apply_phase,
|
super(SwUpgradeStrategy, self).from_dict(data, build_phase, apply_phase,
|
||||||
abort_phase)
|
abort_phase)
|
||||||
|
self._single_controller = data['single_controller']
|
||||||
self._start_upgrade = data['start_upgrade']
|
self._start_upgrade = data['start_upgrade']
|
||||||
self._complete_upgrade = data['complete_upgrade']
|
self._complete_upgrade = data['complete_upgrade']
|
||||||
nfvi_upgrade_data = data['nfvi_upgrade_data']
|
nfvi_upgrade_data = data['nfvi_upgrade_data']
|
||||||
|
@ -1718,7 +1719,7 @@ class SwUpgradeStrategy(SwUpdateStrategy):
|
||||||
Represent the software upgrade strategy as a dictionary
|
Represent the software upgrade strategy as a dictionary
|
||||||
"""
|
"""
|
||||||
data = super(SwUpgradeStrategy, self).as_dict()
|
data = super(SwUpgradeStrategy, self).as_dict()
|
||||||
|
data['single_controller'] = self._single_controller
|
||||||
data['start_upgrade'] = self._start_upgrade
|
data['start_upgrade'] = self._start_upgrade
|
||||||
data['complete_upgrade'] = self._complete_upgrade
|
data['complete_upgrade'] = self._complete_upgrade
|
||||||
if self._nfvi_upgrade:
|
if self._nfvi_upgrade:
|
||||||
|
|
Loading…
Reference in New Issue