Revert "Upgrades: Add initialization to StackUpgradeManager"

This reverts commit f74767d539.

See for revert reasoning:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101763.html

Change-Id: I65d4785d552564fe822ca5af5fe5e1bd06ed2f50
Closes-Bug: #1565807
This commit is contained in:
Brad P. Crochet 2016-08-18 09:27:17 -04:00
parent 6f3095bf1b
commit 15222a6689
2 changed files with 1 additions and 33 deletions

View File

@ -80,31 +80,3 @@ class StackUpgradeManagerTest(base.TestCase):
heatclient.stacks.update.assert_called_once_with(**params)
mock_env_files.assert_called_once_with(env_paths=[
'/tmp/environments/major-upgrade-pacemaker-converge.yaml'])
@mock.patch('heatclient.common.template_utils.'
'process_multiple_environments_and_files')
@mock.patch('heatclient.common.template_utils.get_template_contents')
def test_upgrade_pre(self, mock_template_contents, mock_env_files):
heatclient = mock.MagicMock()
heatclient.stacks.get.return_value = mock.MagicMock(
stack_name='stack', id='stack_id')
mock_template_contents.return_value = ({}, 'template body')
mock_env_files.return_value = ({}, {})
upgrade.StackUpgradeManager(
heatclient=heatclient,
stack_id='stack_id',
tht_dir='/tmp/'
).upgrade_pre()
params = {
'existing': True,
'stack_id': 'stack_id',
'template': 'template body',
'files': {},
'parameters': {},
'environment': {
},
'timeout_mins': 240,
}
heatclient.stacks.update.assert_called_once_with(**params)
mock_env_files.assert_called_once_with(env_paths=[
'/tmp/environments/major-upgrade-pacemaker-init.yaml'])

View File

@ -22,7 +22,7 @@ from tripleo_common import constants
LOG = logging.getLogger(__name__)
UPGRADE_PREPARE_ENVIRONMENT_NAME = 'major-upgrade-pacemaker-init.yaml'
TEMPLATE_NAME = 'overcloud-without-mergepy.yaml'
UPGRADE_ENVIRONMENT_NAME = 'major-upgrade-pacemaker.yaml'
UPGRADE_CLEANUP_ENVIRONMENT_NAME = 'major-upgrade-pacemaker-converge.yaml'
@ -63,10 +63,6 @@ class StackUpgradeManager(object):
self.heatclient.stacks.update(**fields)
def upgrade_pre(self, timeout_mins=constants.STACK_TIMEOUT_DEFAULT):
LOG.info('upgrading stack: %s', self.stack.stack_name)
self._update_stack(timeout_mins, UPGRADE_PREPARE_ENVIRONMENT_NAME)
def upgrade(self, timeout_mins=constants.STACK_TIMEOUT_DEFAULT):
LOG.info('upgrading stack: %s', self.stack.stack_name)
self._update_stack(timeout_mins, UPGRADE_ENVIRONMENT_NAME)