Fix hyphen in package name
Change-Id: Ie69e35996f90f5dad62a8f13df8b83bb009672fd
diff --git a/src/com/mirantis/mcp_qa/EnvActions.groovy b/src/com/mirantis/mcp_qa/EnvActions.groovy
new file mode 100644
index 0000000..d95c411
--- /dev/null
+++ b/src/com/mirantis/mcp_qa/EnvActions.groovy
@@ -0,0 +1,34 @@
+package com.mirantis.mcp_qa
+
+/**
+ * Activate virtual environment and check k8s deployer is specified
+ */
+
+def prepareEnv() {
+ sh '''
+ if [ ! -r "${VENV_PATH}/bin/activate" ]; then
+ echo 'Python virtual environment not found! Set correct VENV_PATH!'
+ exit 1
+ fi
+ '''
+
+ sh '''
+ if [ ! -r "${WORKSPACE}/fuel-ccp-installer/${DEPLOY_SCRIPT_REL_PATH}" ]; then
+ echo "Deploy script \"${DEPLOY_SCRIPT_REL_PATH}\" not found in" \
+ "\"${WORKSPACE}/fuel-ccp-installer/\"!"
+ fi
+ '''
+}
+
+/**
+ * Destroy running environment
+ */
+
+def destroyEnv() {
+ if ( !(env.KEEP_BEFORE.equals('yes') || env.KEEP_BEFORE.equals('true')) ) {
+ sh '''
+ . ${VENV_PATH}/bin/activate
+ dos.py destroy ${ENV_NAME} || true
+ '''
+ }
+}