blob: 523aceb746296767ed1ff1cac31bd5268daf220b [file] [log] [blame]
vrovachev99228d32017-06-08 19:46:10 +04001# Copyright 2017 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 copy
15import time
16
17import pytest
18
19from tcp_tests import settings
20from tcp_tests.helpers import ext
21from tcp_tests import logger
22
23LOG = logger.logger
24
25
26class TestVirtletActions(object):
27 """Test class for testing Virtlet actions"""
28
29 #salt_cmd = 'salt -l debug ' # For debug output
30 #salt_call_cmd = 'salt-call -l debug ' # For debug output
31 salt_cmd = 'salt --hard-crash --state-output=mixed --state-verbose=False ' # For cause only output
32 salt_call_cmd = 'salt-call --hard-crash --state-output=mixed --state-verbose=False ' # For cause only output
33 #salt_cmd = 'salt --state-output=terse --state-verbose=False ' # For reduced output
34 #salt_call_cmd = 'salt-call --state-output=terse --state-verbose=False ' # For reduced output
35
36 def test_virtlet_create_delete_vm(self, underlay, virtlet_deployed,
37 show_step, virtlet_actions):
38 """Test for deploying an mcp environment with virtlet
39
40 Scenario:
41 1. Start VM as a virtlet pod
42 2. Wait active state of VM
43 3. Delete VM and wait to delete pod
44
45 """
46 vm_name = virtlet_actions.run_vm()
47 virtlet_actions.wait_active_state(vm_name)
48 virtlet_actions.delete_vm(vm_name)