Skip to content

Commit d9f068c

Browse files
authored
Merge pull request #782 from QualiSystems/feature/addYamlToSatatic
Feature/add yaml to satatic
2 parents 30c51ec + 6134dbf commit d9f068c

7 files changed

Lines changed: 64 additions & 21 deletions

File tree

.travis.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
after_success: coveralls
2+
env:
3+
- CLOUD_SHELL_SHELL_CORE=1
4+
- CLOUD_SHELL_SHELL_CORE=2
5+
install:
6+
- pip install -r external_requirements.txt
7+
- pip install -r test_requirements.txt
8+
- pip install "cloudshell-core>=2.0.0,<2.1.0" --extra-index-url https://testpypi.python.org/simple
9+
- chmod 777 ./cloudshell_shell_core_install.sh
10+
- ./cloudshell_shell_core_install.sh
11+
- pip install "cloudshell-automation-api>=7.1.0.0,<7.2.0.0" --extra-index-url https://testpypi.python.org/simple
112
language: python
2-
python:
3-
- "2.7"
4-
5-
install:
6-
- pip install -r external_requirements.txt
7-
- pip install -r test_requirements.txt
8-
- pip install "cloudshell-core>=2.0.0,<2.1.0" --extra-index-url https://testpypi.python.org/simple
9-
- pip install "cloudshell-shell-core>=2.0.0,<2.1.0" --extra-index-url https://testpypi.python.org/simple
10-
- pip install "cloudshell-automation-api>=7.1.0.0,<7.2.0.0" --extra-index-url https://testpypi.python.org/simple
11-
12-
script:
13-
- pushd package
14-
- python setup.py develop
15-
- popd
16-
- python runtests.py --with-coverage --cover-package=package --exclude-dir=integration
17-
18-
after_success:
19-
coveralls
20-
21-
notifications:
22-
webhools: https://qualisystems.getbadges.io/api/app/webhook/63350e33-4119-49c3-8127-075aaa022926
13+
notifications:
14+
webhools: "https://qualisystems.getbadges.io/api/app/webhook/63350e33-4119-49c3-8127-075aaa022926"
15+
python:
16+
- "2.7"
17+
script:
18+
- pushd package
19+
- python setup.py develop
20+
- popd
21+
- chmod 777 ./run_static_or_vcenter_tests.sh
22+
- ./run_static_or_vcenter_tests.sh

cloudshell_shell_core_install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
if [ "${CLOUD_SHELL_SHELL_CORE}" -eq 1 ]
3+
then
4+
pip install "cloudshell-shell-core>=2.0.0,<2.1.0" --extra-index-url https://testpypi.python.org/simple
5+
else
6+
pip install "cloudshell-shell-core>=2.4.0,<2.5.0" --extra-index-url https://testpypi.python.org/simple
7+
fi

run_static_or_vcenter_tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
if [ "${CLOUD_SHELL_SHELL_CORE}" -eq 1 ]
3+
then
4+
echo "Running vCenter Tests"
5+
python runtests.py --with-coverage --cover-package=package --exclude-dir=integration
6+
else
7+
echo "Running static VM Tests"
8+
python runtestsStaticVM.py --with-coverage --cover-package=package --exclude-dir=integration
9+
fi

runtests.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
import re
12
import nose
23
import nose.config
34
import sys
45
from nose.plugins.manager import DefaultPluginManager
56
c = nose.config.Config()
67
c.plugins=DefaultPluginManager()
78
c.srcDirs = ['package']
9+
10+
11+
# c.ignoreFiles.append('vm_autoload_driver')
12+
c.ignoreFiles.append(re.compile(r'^vm_autoload_driver\.py$'))
13+
c.ignoreFiles.append(re.compile(r'^test_get_inventory\.py$'))
14+
c.ignoreFiles.append(re.compile(r'^DeployAppOrchestrationDriver$'))
15+
16+
817
if not nose.run(config=c):
918
sys.exit(1)

runtestsStaticVM.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import nose
2+
import nose.config
3+
import sys
4+
from nose.plugins.manager import DefaultPluginManager
5+
c = nose.config.Config()
6+
c.plugins=DefaultPluginManager()
7+
c.srcDirs = ['static_vm_package']
8+
if not nose.run(config=c):
9+
sys.exit(1)

static_vm_package/VCenterAutoloadStaticVMDriver/tests/test_get_inventory renamed to static_vm_package/VCenterAutoloadStaticVMDriver/tests/test_get_inventory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def test_get_inventory(self):
4545
self.assertTrue(self.deploy_app_orchestration_driver._try_get_ip.called)
4646
self.assertTrue(self.deploy_app_orchestration_driver._get_vm_details.called)
4747
self.assertTrue(self.deploy_app_orchestration_driver.pv_service.find_vm_by_name.called)
48+
49+
4850

4951
def test_get_vm_details(self):
5052
vm_details = self.deploy_app_orchestration_driver._get_vm_details(uuid="Piplup",
@@ -56,3 +58,4 @@ def test_get_vm_details(self):
5658

5759

5860

61+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Packaging]
2+
is_driver: True
3+
driver_folder: static_vm_autoload_driver
4+
include_dirs:
5+
target_name: VCenter Static VM Autoload
6+
target_dir: Resource Drivers - Python

0 commit comments

Comments
 (0)