Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 setup/dev/advanced.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
]
}
],
"vmwaredc": {
"username": "",
"vcenter": "",
"password": "",
"name": ""
},
"ipranges": [
{
"startip": "192.168.2.2",
Expand Down
46 changes: 37 additions & 9 deletions 46 tools/marvin/marvin/testSetupSuccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
# specific language governing permissions and limitations
# under the License.

import marvin
import unittest
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackAPI import listSystemVms, listZones, listTemplates
from marvin.lib.vcenter import Vcenter
from marvin.lib.common import verifyVCenterPortGroups
from marvin.codes import (PUBLIC_TRAFFIC,
MANAGEMENT_TRAFFIC,
STORAGE_TRAFFIC,
PASS,
VMWAREDVS)
from time import sleep as delay


Expand All @@ -33,10 +38,11 @@ class TestSetupSuccess(cloudstackTestCase):
def setUpClass(cls):
testClient = super(TestSetupSuccess, cls).getClsTestClient()
cls.apiClient = testClient.getApiClient()
cls.hypervisor = testClient.getHypervisorInfo()

zones = listZones.listZonesCmd()
cls.zones_list = cls.apiClient.listZones(zones)
cls.retry = 2
cls.retry = 50

def test_systemVmReady(self):
"""
Expand Down Expand Up @@ -89,10 +95,32 @@ def test_templateBuiltInReady(self):
"builtIn templates not ready in zone %s" %
z.name)

def test_deployVmWithBuiltIn(self):
"""
Deploys a VM with the built-in CentOS template
"""
def test_VCenterPorts(self):
""" Test if correct VCenter ports are created for all traffic types """

if self.hypervisor.lower() != "vmware":
self.skipTest("This test is intended only for vmware")

zoneDict = {}
for zone in self.config.zones:
zoneDict[zone.name] = zone.vmwaredc

for zone in self.zones_list:
vmwaredc = zoneDict[zone.name]
vcenterObj = Vcenter(
vmwaredc.vcenter,
vmwaredc.username,
vmwaredc.password)
response = verifyVCenterPortGroups(
self.apiClient,
vcenterObj,
traffic_types_to_validate=[
PUBLIC_TRAFFIC,
MANAGEMENT_TRAFFIC,
STORAGE_TRAFFIC],
zoneid=zone.id,
switchTypes=[VMWAREDVS])
self.assertEqual(response[0], PASS, response[1])

@classmethod
def tearDownClass(cls):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.