EC2ResponseError: 400 Bad Request <?xml version='1.0' encoding='UTF-8'?> <Response><RequestID>3e8d18cb-06d3-492f-8d96-7b744cbabbf9</RequestID><Errors><Error><Code>InvalidVpnConnectionID.NotFound</Code><Message>The vpnConnection ID 'vpn-D3B2B065' does not exist</Message></Error></Errors></Response> 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 ▶)
- with outcome.testPartExecutor(self):
- self.setUp()
- if outcome.success:
- outcome.expecting_failure = expecting_failure
- with outcome.testPartExecutor(self, isTest=True):
- testMethod()
- outcome.expecting_failure = False
- with outcome.testPartExecutor(self):
- self.tearDown()
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/vpc/vpn_connections.py in test_create_vpnc_specs (arguments ▶)
- "Phase2LifetimeSeconds": constants.VPNC_PHASE_2_LIFETIME_SECONDS_MIN,
- "ReplayWindowSize": constants.VPNC_REPLAY_WINDOW_MIN,
- }]
- )
- cgw_config = self.xml_cgw_configuration(vpnc)
- self.assertEqual(cgw_config.find("ipsec_tunnel/ike/pre_shared_key").text, psk)
- self.assertEqual(
- cgw_config.find(
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/vpc/vpn_connections.py in xml_cgw_configuration (arguments ▶)
- return vpnc.customer_gateway_configuration.encode("utf-8")
- def xml_cgw_configuration(self, vpnc, conn=None):
- """Await proper VPNC state and return parsed XML tree with CGW configuration."""
- return etree.fromstring(self.get_cgw_configuration(vpnc, conn=conn))
- class VpnConnections(VpnConnectionTestCase):
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/vpc/vpn_connections.py in get_cgw_configuration (arguments ▶)
- .. NOTE:: updates vpnc.customer_gateway_configuration field as side effect.
- """
- if vpnc.state == constants.VPNC_STATE_PENDING:
- self.wait_for_vpnc_creation(vpnc, conn=conn)
- return vpnc.customer_gateway_configuration.encode("utf-8")
- def xml_cgw_configuration(self, vpnc, conn=None):
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/vpc/vpn_connections.py in wait_for_vpnc_creation (arguments ▶)
- self.log.info("Done waiting for BGP sync.")
- def wait_for_vpnc_creation(self, *vpncs, conn=None):
- if conn is None:
- conn = self.vpcconn
- utils.wait_for_vpnc_creation(conn, *vpncs)
- def wait_for_vpnc_deletion(self, *vpncs, conn=None):
- if conn is None:
- conn = self.vpcconn
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wait_for_vpnc_creation (arguments ▶)
- if diff:
- raise Error(f"VPN connection {diff.pop()} has disappeared.")
- return True
- wait_long(check_state)
- def wait_for_vpnc_deletion(conn, *vpncs):
- """Wait while VPN connection stopping and deleting."""
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wait_long (arguments ▶)
- def wait_long(func, *args, **kwargs):
- """Fail unless func return success within the long timeout"""
- return wait(5 * constants.MINUTE_SECONDS, func, *args, **kwargs)
- def wait_long_enough(func, *args, **kwargs):
- """Fail unless func return success within the enough long timeout."""
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wait (arguments ▶)
- def wait(timeout, func, *args, **kwargs):
- """Fail unless func return success within specified number of seconds"""
- endtime = time.time() + float(timeout)
- while time.time() < endtime:
- result = func(*args, **kwargs)
- if result:
- return result
- time.sleep(min(timeout, 0.1))
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in check_state (arguments ▶)
- vpnc_map = {vpnc.id: vpnc for vpnc in vpncs}
- def check_state():
- got_ids = set()
- for vpnc in conn.get_all_vpn_connections(list(vpnc_map)):
- got_ids.add(vpnc.id)
- if vpnc.state == constants.VPNC_STATE_PENDING:
- return False
/root/c2tests/.venv/src/boto/boto/vpc/__init__.py in get_all_vpn_connections (arguments ▶)
- if filters:
- self.build_filter_params(params, filters)
- if dry_run:
- params['DryRun'] = 'true'
- return self.get_list('DescribeVpnConnections', params,
- [('item', VpnConnection)])
- def create_vpn_connection(
- self, type, customer_gateway_id, vpn_gateway_id,
- ipv4_network_cidr_local=None, ipv4_network_cidr_remote=None,
/root/c2tests/.venv/src/boto/boto/connection.py in get_list (arguments ▶)
- xml.sax.parseString(body, h)
- return rs
- else:
- boto.log.error('%s %s' % (response.status, response.reason))
- boto.log.error('%s' % body)
- raise self.ResponseError(response.status, response.reason, body)
- def get_object(self, action, params, cls, path='/',
- parent=None, verb='GET'):
- if not parent: