BotoServerError: 502 Bad Gateway None search by Google
/usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments ▶)
- @contextlib.contextmanager
- def testPartExecutor(self, test_case, isTest=False):
- old_success = self.success
- self.success = True
- try:
- yield
- except KeyboardInterrupt:
- raise
- except SkipTest as e:
- self.success = False
/usr/local/lib/python3.7/unittest/case.py in run (arguments ▶)
- outcome = _Outcome(result)
- try:
- self._outcome = outcome
- with outcome.testPartExecutor(self):
- self.setUp()
- if outcome.success:
- outcome.expecting_failure = expecting_failure
- with outcome.testPartExecutor(self, isTest=True):
- testMethod()
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/volumes.py in setUp (arguments ▶)
- class Volumes(c2tests.EC2TestCase):
- """Tests various volume operations."""
- def setUp(self):
- super(Volumes, self).setUp()
- self.pops = 4
- def assert_create_error(self, error, function, **kwargs):
- if not kwargs.get("zone"):
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments ▶)
- self.entities[resources.VPC_VPCS] = self.get_all_vpcs()
- self.entities[resources.VPC_DHCP_OPTIONS] = self.get_all_dhcp_options()
- def setUp(self):
- self._default_vpcs = dict([(i, None) for i in profile.AVAILABLE_PROJECTS])
- super(VPCTestCase, self).setUp()
- zones = self.get_all_zones()
- def _setup():
- # ensure that default VPC exists
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments ▶)
- """
- return self.profile.get_connection(profile.EC2Connection)
- def setUp(self):
- super(_EC2TestCase, self).setUp()
- self._default_acls = {i: None for i in profile.AVAILABLE_PROJECTS}
- self._default_groups = {i: None for i in profile.AVAILABLE_PROJECTS}
- self._default_subnets = {i: {} for i in profile.AVAILABLE_PROJECTS}
- self._default_keypair = None
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in setUp (arguments ▶)
- self.log.warning(message, *args, **kwargs)
- def setUp(self):
- self.report("Cleaning up before the test")
- self.cleanup()
- self.report("Cleaning up finished")
- self.log.warning("Running testcase: {0}".format(self._testMethodName))
- def tearDown(self):
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in cleanup (arguments ▶)
- """Cleans up all data created by the test."""
- for project in projects or profile.AVAILABLE_PROJECTS:
- with self.switch_project(project):
- self.report("Filling up {0} project entities...".format(project))
- self._fill_entities()
- self.report("Cleaning up {0} project entities...".format(project))
- self._cleanup()
- def cleanup_prod(self):
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments ▶)
- self.__vpcconn_prod = p.get_connection(profile.VPCConnection)
- return self.__vpcconn_prod
- def _fill_entities(self):
- super(VPCTestCase, self)._fill_entities()
- self._init_entities(resources.VPC_RESOURCES)
- self.entities[resources.VPC_ACLS] = self.get_all_acls(
- filters={"default": False}
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in _fill_entities (arguments ▶)
- def _fill_entities(self):
- super(_EC2TestCase, self)._fill_entities()
- self._init_entities(resources.EC2_RESOURCES)
- self.entities[resources.EC2_ADDRESSES] = self.get_all_addresses()
- self.entities[resources.EC2_SECURITY_GROUPS] = [
- group
- for group in self.get_all_security_groups()
- if group.name != constants.SECURITY_GROUP_DEFAULT_NAME
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in get_all_addresses (arguments ▶)
- acls = self.vpcconn.get_all_network_acls(*args, **kwargs)
- self.log.info("Available Network ACLs: {0}".format(acls))
- return acls
- def get_all_addresses(self, *args, **kwargs):
- addresses = self.conn.get_all_addresses(*args, **kwargs)
- self.log.info("Addresses: {0}".format(addresses))
- return addresses
- def get_all_byoip_cidrs(self, *args, **kwargs):
/root/c2tests/.venv/src/boto/boto/ec2/connection.py in get_all_addresses (arguments ▶)
- self.build_list_params(params, allocation_ids, 'AllocationId')
- if filters:
- self.build_filter_params(params, filters)
- if dry_run:
- params['DryRun'] = 'true'
- return self.get_list('DescribeAddresses', params, [('item', Address)], verb='POST')
- def allocate_address(self, domain=None, address=None,
- public_ipv4_pool=None, dry_run=False, tags=None):
- """
/root/c2tests/.venv/src/boto/boto/connection.py in get_list (arguments ▶)
- def get_list(self, action, params, markers, path='/',
- parent=None, verb='GET'):
- if not parent:
- parent = self
- response = self.make_request(action, params, path, verb)
- body = response.read()
- boto.log.debug(body)
- if not body:
- boto.log.error('Null body %s' % body)
/root/c2tests/.venv/src/boto/boto/ec2/connection.py in make_request (arguments ▶)
- def make_request(self, action, params=None, path='/', verb='GET'):
- if self.aws_sudo_id:
- if params is None:
- params = {}
- params['AWSSudoId'] = self.aws_sudo_id
- return AWSQueryConnection.make_request(self, action, params, path, verb)
- def get_params(self):
- """
- Returns a dictionary containing the value of all of the keyword
/root/c2tests/.venv/src/boto/boto/connection.py in make_request (arguments ▶)
- self.host)
- if action:
- http_request.params['Action'] = action
- if self.APIVersion:
- http_request.params['Version'] = self.APIVersion
- return self._mexe(http_request)
- def build_list_params(self, params, items, label):
- if isinstance(items, six.string_types):
- items = [items]
/root/c2tests/.venv/src/boto/boto/connection.py in _mexe (arguments ▶)
- # use it to raise an exception.
- # Otherwise, raise the exception that must have already happened.
- if self.request_hook is not None:
- self.request_hook.handle_request_data(request, response, error=True)
- if response:
- raise BotoServerError(response.status, response.reason, body)
- elif ex:
- raise ex
- else:
- msg = 'Please report this exception as a Boto Issue!'