Example #1
0
def main():
    """Entry point"""
    configure_logger('/var/log/fuel_upgrade.log')
    try:
        run_upgrade(parse_args(sys.argv[1:]))
    except Exception as exc:
        handle_exception(exc)
Example #2
0
def main():
    """Entry point
    """
    configure_logger('/var/log/fuel_upgrade.log')
    try:
        run_upgrade(parse_args(sys.argv[1:]))
    except Exception as exc:
        handle_exception(exc)
Example #3
0
File: cli.py Project: Axam/nsx-web
#    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.

import argparse
import requests
import sys

from fuel_upgrade.logger import configure_logger
logger = configure_logger('/var/log/fuel_upgrade.log')

from fuel_upgrade import errors
from fuel_upgrade import messages

from fuel_upgrade.checker_manager import CheckerManager
from fuel_upgrade.config import build_config
from fuel_upgrade.upgrade import UpgradeManager

from fuel_upgrade.engines.bootstrap import BootstrapUpgrader
from fuel_upgrade.engines.docker_engine import DockerInitializer
from fuel_upgrade.engines.docker_engine import DockerUpgrader
from fuel_upgrade.engines.host_system import HostSystemUpgrader
from fuel_upgrade.engines.openstack import OpenStackUpgrader

from fuel_upgrade.pre_upgrade_hooks import PreUpgradeHookManager
Example #4
0
#
#         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.

import argparse
import requests
import sys

from fuel_upgrade.logger import configure_logger

logger = configure_logger('/var/log/fuel_upgrade.log')

from fuel_upgrade import errors
from fuel_upgrade import messages

from fuel_upgrade.checker_manager import CheckerManager
from fuel_upgrade.config import build_config
from fuel_upgrade.upgrade import UpgradeManager

from fuel_upgrade.engines.bootstrap import BootstrapUpgrader
from fuel_upgrade.engines.docker_engine import DockerInitializer
from fuel_upgrade.engines.docker_engine import DockerUpgrader
from fuel_upgrade.engines.host_system import HostSystemUpgrader
from fuel_upgrade.engines.openstack import OpenStackUpgrader

from fuel_upgrade.pre_upgrade_hooks import PreUpgradeHookManager
Example #5
0
#
#         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.

import argparse
import sys
import traceback

from fuel_upgrade.logger import configure_logger
# TODO(eli): move to config
logger = configure_logger('/tmp/file.log')

from fuel_upgrade import errors
from fuel_upgrade.upgrade import PuppetUpgrader
from fuel_upgrade.upgrade import Upgrade


def handle_exception(exc):
    if isinstance(exc, errors.FuelUpgradeException):
        logger.error(exc.message)
        sys.exit(-1)
    else:
        traceback.print_exc(exc)
        sys.exit(-1)