def setUp(self): #Initialize API self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account( settings.TEST_RUNNER_USER, os_accounts.hashpass(settings.TEST_RUNNER_USER)) #Initialize API self.api_client = TokenAPIClient() self.api_client.login(username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('api:public_apis:machine-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_machine_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse( 'api:public_apis:machine-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_machine_url = urljoin(settings.SERVER_URL, reverse_link)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account( settings.TEST_RUNNER_USER, os_accounts.hashpass(settings.TEST_RUNNER_USER)) #Initialize API self.api_client = TokenAPIClient() self.api_client.login( username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('api:public_apis:machine-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_machine_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('api:public_apis:machine-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_machine_url = urljoin(settings.SERVER_URL, reverse_link)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user, max_quota=True) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account(settings.TEST_RUNNER_USER, os_accounts.hashpass( settings.TEST_RUNNER_USER), max_quota=True) #user = AtmosphereUser.objects.get(username=settings.TEST_RUNNER_USER) #user.is_staff = True #user.is_superuser = True #user.save() #Initialize API self.api_client = TokenAPIClient() self.api_client.login(username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('api:public_apis:instance-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('api:public_apis:volume-list', args=[self.os_id.provider.id, self.os_id.id]) #Prepare Openstack self.os_volume_url = urljoin(settings.SERVER_URL, reverse_link) instance_data = { "size_alias": "2", "machine_alias": "0f539197-3718-40bc-8a29-c22e0841684f", "name": "test volume attachment", "delete_before": False } (self.os_instance_id, self.os_instance_ip) = standup_instance(self, self.os_instance_url, **instance_data) #Prepare Eucalyptus reverse_link = reverse( 'api:public_apis:volume-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_volume_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse( 'api:public_apis:instance-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_instance_url = urljoin(settings.SERVER_URL, reverse_link) instance_data = { "size_alias": "m1.small", "machine_alias": "emi-E7F8300F", "name": "test volume attachment", "delete_before": False } (self.euca_instance_id, self.euca_instance_ip) = standup_instance(self, self.euca_instance_url, **instance_data)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user, max_quota=True) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account( settings.TEST_RUNNER_USER, os_accounts.hashpass(settings.TEST_RUNNER_USER), max_quota=True) #user = AtmosphereUser.objects.get(username=settings.TEST_RUNNER_USER) #user.is_staff = True #user.is_superuser = True #user.save() #Initialize API self.api_client = TokenAPIClient() self.api_client.login( username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('api:public_apis:instance-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('api:public_apis:volume-list', args=[self.os_id.provider.id, self.os_id.id]) #Prepare Openstack self.os_volume_url = urljoin(settings.SERVER_URL, reverse_link) instance_data = { "size_alias":"2", "machine_alias":"0f539197-3718-40bc-8a29-c22e0841684f", "name":"test volume attachment", "delete_before":False } (self.os_instance_id, self.os_instance_ip) = standup_instance( self, self.os_instance_url, **instance_data) #Prepare Eucalyptus reverse_link = reverse('api:public_apis:volume-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_volume_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('api:public_apis:instance-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_instance_url = urljoin(settings.SERVER_URL, reverse_link) instance_data = { "size_alias":"m1.small", "machine_alias":"emi-E7F8300F", "name":"test volume attachment", "delete_before":False } (self.euca_instance_id, self.euca_instance_ip) = standup_instance( self, self.euca_instance_url, **instance_data)
def setUp_euca(): euca_admin_id = create_euca_provider() euca_provider = euca_admin_id.provider # Ensure there is an account created/ready to go euca_accounts = EucaAccounts(euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) euca_id = euca_accounts.create_account(euca_user, max_quota=True) reverse_link = reverse("instance-list", args=[euca_id.provider.id, euca_id.id]) euca_instance_url = urljoin(settings.SERVER_URL, reverse_link)
def setUp_euca(): euca_admin_id = create_euca_provider() euca_provider = euca_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) euca_id = euca_accounts.create_account(euca_user, max_quota=True) reverse_link = reverse('api:public_apis:instance-list', args=[euca_id.provider.id, euca_id.id]) euca_instance_url = urljoin(settings.SERVER_URL, reverse_link)
def setUp(self): #Initialize API self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user) self.api_client = TokenAPIClient() self.api_client.login(username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS)
def setUp(self): #Initialize API self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user) self.api_client = TokenAPIClient() self.api_client.login( username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user, max_quota=True) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account( settings.TEST_RUNNER_USER, os_accounts.hashpass(settings.TEST_RUNNER_USER), max_quota=True) user = AtmosphereUser.objects.get(username=settings.TEST_RUNNER_USER) user.is_staff = True user.is_superuser = True user.save() #Initialize API self.api_client = TokenAPIClient() self.api_client.login( username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('instance-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('instance-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('machine-request-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_request_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('machine-request-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_request_url = urljoin(settings.SERVER_URL, reverse_link)
def setUp(self): #Initialize core DB self.euca_admin_id = create_euca_provider() self.euca_provider = self.euca_admin_id.provider self.os_admin_id = create_os_provider() self.os_provider = self.os_admin_id.provider #Ensure there is an account created/ready to go euca_accounts = EucaAccounts(self.euca_provider) euca_user = euca_accounts.get_user(settings.TEST_RUNNER_USER) self.euca_id = euca_accounts.create_account(euca_user, max_quota=True) os_accounts = OSAccounts(self.os_provider) self.os_id = os_accounts.create_account(settings.TEST_RUNNER_USER, os_accounts.hashpass( settings.TEST_RUNNER_USER), max_quota=True) user = AtmosphereUser.objects.get(username=settings.TEST_RUNNER_USER) user.is_staff = True user.is_superuser = True user.save() #Initialize API self.api_client = TokenAPIClient() self.api_client.login(username=settings.TEST_RUNNER_USER, password=settings.TEST_RUNNER_PASS) reverse_link = reverse('api:public_apis:instance-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse( 'api:public_apis:instance-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_instance_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse('api:public_apis:machine-request-list', args=[self.os_id.provider.id, self.os_id.id]) self.os_request_url = urljoin(settings.SERVER_URL, reverse_link) reverse_link = reverse( 'api:public_apis:machine-request-list', args=[self.euca_id.provider.id, self.euca_id.id]) self.euca_request_url = urljoin(settings.SERVER_URL, reverse_link)