Sergey Galkin | 86c1a65 | 2019-11-21 17:02:02 +0400 | [diff] [blame] | 1 | # 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. |
| 14 | import pytest |
| 15 | |
| 16 | from tcp_tests import logger |
| 17 | |
| 18 | |
| 19 | LOG = logger.logger |
| 20 | |
| 21 | |
| 22 | class 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 Arhipova | 508f653 | 2021-01-27 15:52:45 +0200 | [diff] [blame] | 47 | job_result, job_description = dt.start_job_on_jenkins( |
Sergey Galkin | 86c1a65 | 2019-11-21 17:02:02 +0400 | [diff] [blame] | 48 | job_name=job_name, |
| 49 | job_parameters=job_parameters) |
Hanna Arhipova | 508f653 | 2021-01-27 15:52:45 +0200 | [diff] [blame] | 50 | assert job_result == 'SUCCESS', job_description |