Added 'k8s_deployed' fixture
Created a separate fixture for Kubernetes deployment.
Modified existing k8s related fixtures / tests so they
use it now and updated templates with k8s environments.
Also this patch includes few minor changes:
* removed unused fixture 'deploy_openstack' which
was a full copy of 'openstack_deployed' fixture;
* removed unused modules imports;
* fixed typos and docstrings.
Change-Id: Ic35551f3e52913cede753b92e7d5a81f54570b01
Reviewed-on: https://review.gerrithub.io/365234
Reviewed-by: <vrovachev@mirantis.com>
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/fixtures/virtlet_ceph_fixtures.py b/tcp_tests/fixtures/virtlet_ceph_fixtures.py
index 9a13cb4..a9cd3db 100644
--- a/tcp_tests/fixtures/virtlet_ceph_fixtures.py
+++ b/tcp_tests/fixtures/virtlet_ceph_fixtures.py
@@ -12,40 +12,34 @@
# License for the specific language governing permissions and limitations
# under the License.
-import os
-
import pytest
-import yaml
from tcp_tests import logger
from tcp_tests.helpers import ext
-from tcp_tests import settings
from tcp_tests.managers import virtlet_ceph_manager
LOG = logger.logger
@pytest.fixture(scope='function')
-def virtlet_ceph_actions(config, underlay, salt_actions):
+def virtlet_ceph_actions(config, underlay):
"""Fixture that provides various actions for Virtlet project
:param config: fixture provides oslo.config
:param underlay: fixture provides underlay manager
:rtype: VirtletCephManager
"""
- return virtlet_ceph_manager.VirtletCephManager(config, underlay, salt_actions)
+ return virtlet_ceph_manager.VirtletCephManager(config, underlay)
@pytest.mark.revert_snapshot(ext.SNAPSHOT.virtlet_ceph_deployed)
@pytest.fixture(scope='function')
-def virtlet_ceph_deployed(revert_snapshot, request, config,
- hardware, underlay, common_services_deployed,
+def virtlet_ceph_deployed(revert_snapshot, config, hardware, underlay,
virtlet_deployed, virtlet_ceph_actions):
"""Fixture to get or install Virtlet project on the environment
:param revert_snapshot: fixture that reverts snapshot that is specified
in test with @pytest.mark.revert_snapshot(<name>)
- :param request: fixture provides pytest data
:param config: fixture provides oslo.config
:param hardware: fixture provides enviromnet manager
:param underlay: fixture provides underlay manager
@@ -67,7 +61,7 @@
If you want to revert 'virtlet_ceph_deployed' snapshot, please use mark:
@pytest.mark.revert_snapshot("virtlet_ceph_deployed")
"""
- # Create Salt cluster
+ # Deploy Virtlet with Ceph for Kubernetes
if not config.virtlet.ceph_installed:
steps_path = config.virtlet_deploy.virtlet_ceph_steps_path
commands = underlay.read_template(steps_path)