(cls)
| 1826 | |
| 1827 | @classmethod |
| 1828 | def setUpClass(cls): |
| 1829 | testClient = super(TestVAppsVM, cls).getClsTestClient() |
| 1830 | cls.apiclient = testClient.getApiClient() |
| 1831 | cls.services = testClient.getParsedTestDataConfig() |
| 1832 | cls.hypervisor = testClient.getHypervisorInfo() |
| 1833 | cls._cleanup = [] |
| 1834 | |
| 1835 | # Get Zone, Domain and templates |
| 1836 | cls.domain = get_domain(cls.apiclient) |
| 1837 | cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) |
| 1838 | cls.services['mode'] = cls.zone.networktype |
| 1839 | |
| 1840 | cls.hypervisorNotSupported = cls.hypervisor.lower() != "vmware" |
| 1841 | |
| 1842 | if cls.hypervisorNotSupported == False: |
| 1843 | |
| 1844 | cls.account = Account.create( |
| 1845 | cls.apiclient, |
| 1846 | cls.services["account"], |
| 1847 | domainid=cls.domain.id |
| 1848 | ) |
| 1849 | |
| 1850 | cls.templates = get_test_ovf_templates( |
| 1851 | cls.apiclient, |
| 1852 | cls.zone.id, |
| 1853 | cls.services['test_ovf_templates'], |
| 1854 | cls.hypervisor |
| 1855 | ) |
| 1856 | if len(cls.templates) == 0: |
| 1857 | assert False, "get_test_ovf_templates() failed to return templates" |
| 1858 | |
| 1859 | cls.custom_offering = ServiceOffering.create( |
| 1860 | cls.apiclient, |
| 1861 | cls.services["custom_service_offering"] |
| 1862 | ) |
| 1863 | |
| 1864 | cls.isolated_network_offering = NetworkOffering.create( |
| 1865 | cls.apiclient, |
| 1866 | cls.services["isolated_network_offering"], |
| 1867 | ) |
| 1868 | cls.isolated_network_offering.update(cls.apiclient, state='Enabled') |
| 1869 | |
| 1870 | cls.l2_network_offering = NetworkOffering.create( |
| 1871 | cls.apiclient, |
| 1872 | cls.services["l2-network_offering"], |
| 1873 | ) |
| 1874 | cls.l2_network_offering.update(cls.apiclient, state='Enabled') |
| 1875 | |
| 1876 | cls._cleanup = [ |
| 1877 | cls.account, |
| 1878 | cls.custom_offering, |
| 1879 | cls.isolated_network_offering, |
| 1880 | cls.l2_network_offering |
| 1881 | ] |
| 1882 | |
| 1883 | |
| 1884 | @classmethod |
nothing calls this directly
no test coverage detected