|
52 | 52 | Hypervisor, Template) |
53 | 53 | from marvin.lib.common import (get_domain, |
54 | 54 | get_template, |
55 | | - get_zone) |
| 55 | + get_zone, get_test_template) |
56 | 56 | from marvin.lib.utils import random_gen |
57 | 57 | # Import System Modules |
58 | 58 | from nose.plugins.attrib import attr |
@@ -100,6 +100,19 @@ class Services: |
100 | 100 |
|
101 | 101 | def __init__(self): |
102 | 102 | self.services = { |
| 103 | + "test_templates": { |
| 104 | + "kvm": { |
| 105 | + "name": "Centos-5.5-configdrive", |
| 106 | + "displaytext": "ConfigDrive enabled CentOS", |
| 107 | + "format": "qcow2", |
| 108 | + "hypervisor": "kvm", |
| 109 | + "ostype": "CentOS 5.5 (64-bit)", |
| 110 | + "url": "http://people.apache.org/~fmaximus/centos55-extended.qcow2.bz2", |
| 111 | + "requireshvm": "False", |
| 112 | + "ispublic": "True", |
| 113 | + "isextractable": "True" |
| 114 | + } |
| 115 | + }, |
103 | 116 | "vpc_offering_configdrive": { |
104 | 117 | "name": 'VPC offering ConfigDrive', |
105 | 118 | "displaytext": 'VPC offering ConfigDrive', |
@@ -1144,17 +1157,19 @@ def setUpClass(cls): |
1144 | 1157 | cls.api_client = test_client.getApiClient() |
1145 | 1158 | cls.db_client = test_client.getDbConnection() |
1146 | 1159 | cls.test_data = test_client.getParsedTestDataConfig() |
| 1160 | + cls.test_data.update(Services().services) |
1147 | 1161 |
|
1148 | 1162 | # Get Zone, Domain and templates |
1149 | 1163 | cls.zone = get_zone(cls.api_client) |
1150 | 1164 | cls.domain = get_domain(cls.api_client) |
1151 | | - cls.template = get_template(cls.api_client, |
1152 | | - cls.zone.id, |
1153 | | - cls.test_data["ostype"] |
1154 | | - ) |
| 1165 | + |
| 1166 | + cls.hypervisor = cls.testClient.getHypervisorInfo() |
| 1167 | + cls.template = get_test_template(cls.api_client, |
| 1168 | + cls.zone.id, |
| 1169 | + cls.hypervisor, |
| 1170 | + cls.test_data["test_templates"]) |
1155 | 1171 | cls.test_data["virtual_machine"]["zoneid"] = cls.zone.id |
1156 | 1172 | cls.test_data["virtual_machine"]["template"] = cls.template.id |
1157 | | - cls.test_data.update(Services().services) |
1158 | 1173 |
|
1159 | 1174 | # Create service offering |
1160 | 1175 | cls.service_offering = ServiceOffering.create( |
|
0 commit comments