python-tripleoclient/tripleoclient/v1/tripleo_upgrade.py
Emilien Macchi df9cbd400e Implement 'openstack tripleo upgrade'
Adding a new command:
$ openstack tripleo upgrade

This new command will run underneath:
$ openstack tripleo deploy --upgrade

The only difference when running this command is that we'll execute
upgrade tasks generated by config-download before the deployment tasks.

It'll be used by the containerized undercloud to upgrade by re-using the
upgrade tasks in THT, that were designed for the overcloud. We'll try to
re-use them so we avoid code duplication.

Change-Id: Ic932b3b308c83bc72fff4c0ef8ce94e878f33997
2018-05-05 17:09:01 +00:00

33 lines
1.0 KiB
Python

# Copyright 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
import logging
from tripleoclient.v1.tripleo_deploy import Deploy
class Upgrade(Deploy):
"""Upgrade TripleO"""
log = logging.getLogger(__name__ + ".Upgrade")
def take_action(self, parsed_args):
self.log.debug("take_action(%s)" % parsed_args)
parsed_args.standalone = True
parsed_args.upgrade = True
super(Upgrade, self).take_action(parsed_args)