def setUpClass(cls): cls.api_client = super(TestNonContiguousVLANRanges, cls).getClsTestClient().getApiClient() cls.services = Services().services # Get Zone, pod, domain cls.zone = get_zone(cls.api_client, cls.services) cls.pod = get_pod(cls.api_client, cls.zone.id, cls.services) cls.domain = get_domain(cls.api_client, cls.services) cls.service_offering = ServiceOffering.create( cls.api_client, cls.services["service_offering"] ) cls.template = get_template( cls.api_client, cls.zone.id, cls.services["ostype"] ) cls.services["virtual_machine"]["template"] = cls.template.id cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls._cleanup = [cls.service_offering] return
def setUp(self): self.pp = pprint.PrettyPrinter(indent=4, depth=6) self.apiclient = super(TestScenario, self).getClsTestClient().getApiClient() self.services = Services().services # Get Zone, Domain and templates self.domain = get_domain(self.apiclient, self.services) self.zone = get_zone(self.apiclient, self.services) self.pod = get_pod(self.apiclient, self.zone.id) self.template = get_template( self.apiclient, self.zone.id, self.services["ostype"] ) self.accounts = [] for account in self.services["scenario"]["accounts"]: self.accounts.append(self.CreateAccount(account)) self.service_offerings = [] for service_offering in self.services["scenario"]["service_offerings"]: self.service_offerings.append(self.CreateServiceOffering(service_offering)) self.cleanup = [ # self.account ] self.file_to_write = open('/home/sg-user/cloudstack-sim-gen/test_scenario.out', 'w') self.file_to_write.truncate() self.datapoints = []
def setUpClass(cls): cls.api_client = super(TestVMPlacement, cls).getClsTestClient().getApiClient() cls.services = Services().services # Get Zone, Domain and templates cls.domain = get_domain(cls.api_client, cls.services) cls.zone = get_zone(cls.api_client, cls.services) cls.pod = get_pod(cls.api_client, zoneid=cls.zone.id, services=cls.services) cls.template = get_template(cls.api_client, cls.zone.id, cls.services["ostype"]) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"], offerha=True) cls._cleanup = [cls.service_offering] return
def setUpClass(cls): cls.api_client = super(TestVMPlacement, cls).getClsTestClient().getApiClient() cls.services = Services().services # Get Zone, Domain and templates cls.domain = get_domain(cls.api_client, cls.services) cls.zone = get_zone(cls.api_client, cls.services) cls.pod = get_pod(cls.api_client, zoneid=cls.zone.id, services=cls.services) cls.template = get_template(cls.api_client, cls.zone.id, cls.services["ostype"]) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id cls.service_offering = ServiceOffering.create( cls.api_client, cls.services["service_offering"], offerha=True) cls._cleanup = [ cls.service_offering, ] return