blob: dee31482497de785ddb7174fe9b4ed4051cefb7f [file] [log] [blame]
Sergey Galkin86c1a652019-11-21 17:02:02 +04001# Copyright 2019 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14import pytest
15
16from tcp_tests import logger
17
18
19LOG = logger.logger
20
21
22class TestUpdateContrail(object):
23 @pytest.mark.day1_underlay
24 def test_upgrade_contrail(self,
25 show_step,
26 underlay_actions,
27 drivetrain_actions,
28 reclass_actions,
29 salt_actions):
30 """Execute Contrail upgrade
31
32 Scenario:
33 1. Perform Contrail upgarde
34 2. If jobs are passed then start tests with cvp-sanity job
35 3. Run tests with cvp-tempest job
36 """
37 cfg_node = underlay_actions.get_target_node_names(target='cfg')[0]
38 LOG.info('cfg node is {}'.format(cfg_node))
39 dt = drivetrain_actions
40 # ########## Upgrade Contrail ###########
41 show_step(1)
42 LOG.info('Upgrade control VMs')
43 job_name = 'deploy-update-opencontrail4'
44 job_parameters = {
45 'ASK_CONFIRMATION': False
46 }
Hanna Arhipovaa85bfa62020-01-03 18:49:15 +020047 update_control_vms = dt.start_job_on_jenkins(
Sergey Galkin86c1a652019-11-21 17:02:02 +040048 job_name=job_name,
49 job_parameters=job_parameters)
50 assert update_control_vms == 'SUCCESS'