Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr If UnaryOpNot Call AttributeLoad Call AttributeLoad NameLoad attr attr body Raise Call AttributeLoad NameLoad attr Str decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Dict Str Str Str ListLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Raise SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad keyword Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Dict Str Str Str ListLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword Dict Str NameLoad keyword Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Dict Str Str Str Str NameLoad NameLoad Assign NameStore BinOpMod Str Dict Str Str Str NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str decorator_list
N/A N/A os N/A sys N/A time N/A urllib2 lxml etree oslo_log log N/A paramiko tempest.lib.common ssh tempest.lib.common.utils data_utils N/A testtools ec2api.tests.functional base ec2api.tests.functional config ec2api.tests.functional.scenario base scenario_base N/A CONF N/A config CONF N/A LOG N/A N/A log getLogger __name__ VpnTest N/A N/A scenario_base BaseScenarioTest N/A N/A CUSTOMER_GATEWAY_IP 198.51.100.77 N/A CUSTOMER_VPN_CIDR 172.16.25.0/24 N/A OPENSWAN_LINK http://mirrors.kernel.org/ubuntu/pool/universe/o/openswan/openswan_2.6.38-1_i386.deb setUpClass N/A N/A cls N/A N/A N/A N/A N/A N/A super VpnTest cls setUpClass N/A N/A N/A N/A N/A N/A base TesterStateHolder get_vpc_enabled N/A N/A N/A N/A cls skipException VPC is disabled N/A classmethod N/A base safe_setup test_vpn_routing N/A N/A self N/A N/A N/A N/A vpc_id _subnet_id N/A N/A self create_vpc_and_subnet 10.42.0.0/20 N/A vpn_data N/A N/A self _create_and_configure_vpn vpc_id N/A self CUSTOMER_GATEWAY_IP N/A self CUSTOMER_VPN_CIDR N/A vgw_id N/A vpn_data N/A VpnGatewayId N/A data N/A N/A N/A self client describe_route_tables Filters N/A N/A Name Values vpc-id N/A vpc_id N/A rtb_id N/A N/A N/A data N/A RouteTables N/A 0 N/A RouteTableId N/A data N/A N/A N/A self client describe_route_tables RouteTableIds N/A rtb_id N/A data N/A N/A data N/A RouteTables N/A 0 N/A route N/A next N/A r N/A r N/A data N/A Routes N/A N/A r N/A DestinationCidrBlock N/A self CUSTOMER_VPN_CIDR None N/A route N/A N/A N/A N/A self assertEqual active N/A route N/A State N/A N/A N/A self assertEqual EnableVgwRoutePropagation N/A route N/A Origin N/A N/A N/A self assertIn PropagatingVgws data N/A N/A N/A self assertNotEmpty N/A data N/A PropagatingVgws N/A N/A N/A self assertEqual vgw_id N/A N/A N/A data N/A PropagatingVgws N/A 0 N/A GatewayId N/A test_vpn_connectivity N/A N/A self N/A N/A N/A is_amazon N/A amazon N/A N/A CONF aws ec2_url N/A response N/A N/A urllib2 urlopen N/A self OPENSWAN_LINK timeout 30 N/A content N/A N/A response read N/A N/A is_amazon N/A N/A filename N/A N/A N/A os path basename N/A self OPENSWAN_LINK N/A f N/A open filename w N/A N/A N/A f write content N/A N/A N/A f close N/A key_name N/A N/A data_utils rand_name testkey N/A pkey N/A N/A self create_key_pair key_name N/A sec_group_name N/A N/A self create_standard_security_group N/A instance_id_ubuntu N/A N/A self run_instance KeyName key_name ImageId N/A N/A CONF aws image_id_ubuntu SecurityGroups N/A sec_group_name N/A public_ip_ubuntu N/A N/A self get_instance_ip instance_id_ubuntu N/A instance N/A N/A self get_instance instance_id_ubuntu N/A private_ip_ubuntu N/A instance N/A PrivateIpAddress N/A N/A vpc_id subnet_id N/A N/A self create_vpc_and_subnet 10.43.0.0/20 N/A N/A N/A self prepare_vpc_default_security_group vpc_id N/A vpn_data N/A N/A self _create_and_configure_vpn vpc_id public_ip_ubuntu N/A private_ip_ubuntu /32 N/A instance_id N/A N/A self run_instance KeyName key_name ImageId N/A N/A CONF aws image_id SubnetId subnet_id N/A instance N/A N/A self get_instance instance_id N/A private_ip_in_vpc N/A instance N/A PrivateIpAddress N/A ssh_client N/A N/A ssh Client public_ip_ubuntu N/A N/A CONF aws image_user_ubuntu pkey pkey N/A N/A is_amazon N/A N/A N/A N/A self _upload_file ssh_client filename filename N/A N/A N/A ssh_client exec_command N/A sudo DEBIAN_FRONTEND=noninteractive dpkg -i  filename N/A N/A N/A N/A ssh_client exec_command DEBIAN_FRONTEND=noninteractive sudo apt-get install -fqy openswan N/A N/A N/A ssh_client exec_command sudo -s su -c "echo 1 > /proc/sys/net/ipv4/ip_forward" N/A N/A N/A ssh_client exec_command for vpn in /proc/sys/net/ipv4/conf/*;  do sudo -s su -c "echo 0 > $vpn/accept_redirects; echo 0 > $vpn/send_redirects"; done N/A sysctl_additions N/A net.ipv4.ip_forward = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0 N/A item sysctl_additions N/A N/A N/A N/A ssh_client exec_command N/A N/A sudo -s su -c "echo ' item ' >> /etc/sysctl.conf" N/A N/A N/A ssh_client exec_command sudo sysctl -p N/A N/A ipsec_conf ipsec_secrets N/A N/A self _get_ipsec_conf N/A vpn_data N/A VpnConnectionId private_ip_ubuntu N/A N/A N/A ssh_client exec_command sudo -s su -c "echo '' > /etc/ipsec.conf" N/A fstr ipsec_conf N/A N/A N/A N/A ssh_client exec_command N/A sudo -s su -c "echo '%s' >> /etc/ipsec.conf" fstr N/A N/A N/A ssh_client exec_command N/A sudo -s su -c "echo '%s' > /etc/ipsec.secrets" ipsec_secrets N/A N/A N/A ssh_client exec_command sudo service ipsec restart N/A N/A N/A N/A N/A N/A N/A self get_vpn_connection_tunnel_waiter wait_available N/A vpn_data N/A VpnConnectionId UP N/A N/A N/A Exception N/A N/A exc_info N/A N/A sys exc_info N/A N/A N/A output N/A N/A ssh_client exec_command sudo ipsec auto --status N/A N/A N/A LOG warning output N/A N/A N/A Exception N/A N/A N/A N/A exc_info N/A 1 None N/A exc_info N/A 2 N/A N/A N/A time sleep 10 N/A N/A N/A ssh_client exec_command N/A ping -c 4 %s private_ip_in_vpc N/A N/A N/A testtools skipUnless N/A N/A CONF aws run_ssh SSH tests are disabled. N/A N/A testtools skipUnless N/A N/A CONF aws run_long_tests Slow test has skipped. N/A N/A testtools skipUnless N/A N/A CONF aws image_id_ubuntu ubuntu image id is not defined N/A N/A testtools skipUnless N/A N/A CONF aws image_id image id is not defined _upload_file N/A N/A self ssh_client local_path remote_path N/A N/A N/A ssh N/A N/A ssh_client _get_ssh_connection N/A transport N/A N/A ssh get_transport N/A sftp_client N/A N/A N/A paramiko SFTPClient from_transport transport N/A N/A N/A sftp_client put local_path remote_path N/A _create_and_configure_vpn N/A N/A self vpc_id cgw_ip customer_subnet N/A N/A N/A data N/A N/A N/A self client create_customer_gateway Type ipsec.1 PublicIp cgw_ip BgpAsn 65000 N/A cgw_id N/A N/A data N/A CustomerGateway N/A CustomerGatewayId N/A N/A N/A self addResourceCleanUp N/A N/A self client delete_customer_gateway CustomerGatewayId cgw_id N/A N/A N/A N/A N/A self get_customer_gateway_waiter wait_available cgw_id N/A data N/A N/A N/A self client create_vpn_gateway Type ipsec.1 AvailabilityZone N/A N/A CONF aws aws_zone N/A vgw_id N/A N/A data N/A VpnGateway N/A VpnGatewayId N/A N/A N/A self addResourceCleanUp N/A N/A self client delete_vpn_gateway VpnGatewayId vgw_id N/A N/A N/A N/A N/A self get_vpn_gateway_waiter wait_available vgw_id N/A data N/A N/A N/A self client attach_vpn_gateway VpnGatewayId vgw_id VpcId vpc_id N/A N/A N/A self addResourceCleanUp N/A N/A self client detach_vpn_gateway VpnGatewayId vgw_id VpcId vpc_id N/A N/A N/A N/A N/A self get_vpn_gateway_attachment_waiter wait_available vgw_id attached N/A data N/A N/A N/A self client describe_route_tables Filters N/A N/A Name Values vpc-id N/A vpc_id N/A rtb_id N/A N/A N/A data N/A RouteTables N/A 0 N/A RouteTableId N/A data N/A N/A N/A self client enable_vgw_route_propagation RouteTableId rtb_id GatewayId vgw_id N/A N/A N/A self addResourceCleanUp N/A N/A self client disable_vgw_route_propagation RouteTableId rtb_id GatewayId vgw_id N/A data N/A N/A N/A self client create_vpn_connection CustomerGatewayId cgw_id VpnGatewayId vgw_id Options N/A StaticRoutesOnly True Type ipsec.1 N/A vpn_data N/A data N/A VpnConnection N/A vpn_id N/A N/A data N/A VpnConnection N/A VpnConnectionId N/A N/A N/A self addResourceCleanUp N/A N/A self client delete_vpn_connection VpnConnectionId vpn_id N/A N/A N/A N/A N/A self get_vpn_connection_waiter wait_available vpn_id N/A data N/A N/A N/A self client create_vpn_connection_route VpnConnectionId vpn_id DestinationCidrBlock customer_subnet N/A N/A N/A N/A N/A self get_vpn_connection_route_waiter customer_subnet wait_available vpn_id N/A vpn_data N/A _get_ipsec_conf N/A N/A self vpn_connection_id private_ip_ubuntu N/A N/A N/A data N/A N/A N/A self client describe_vpn_connections VpnConnectionIds N/A vpn_connection_id N/A vpn_data N/A N/A data N/A VpnConnections N/A 0 N/A vpn_config N/A N/A etree fromstring N/A vpn_data N/A CustomerGatewayConfiguration N/A psks N/A N/A vpn_config xpath /vpn_connection/ipsec_tunnel/ike/pre_shared_key N/A N/A N/A self assertNotEmpty psks N/A vgw_ip N/A N/A vpn_config xpath /vpn_connection/ipsec_tunnel/vpn_gateway/tunnel_outside_address/ip_address N/A N/A N/A self assertTrue vgw_ip N/A ipsec_key N/A N/A psks N/A 0 text N/A vgw_ip N/A N/A vgw_ip N/A 0 text N/A ipsec_conf N/A N/A item N/A self _ipsec_conf N/A N/A N/A N/A ipsec_conf append N/A item N/A vpc_cidr vgw_ip private_ip_ubuntu 10.43.0.0/20 vgw_ip private_ip_ubuntu N/A ipsec_secrets N/A %(private_ip_ubuntu)s  %(vgw_ip)s:  PSK  \"%(ipsec_key)s\" N/A private_ip_ubuntu vgw_ip ipsec_key private_ip_ubuntu vgw_ip ipsec_key N/A N/A ipsec_conf ipsec_secrets N/A N/A _ipsec_conf N/A ## general configuration parameters ## config setup     plutodebug=all     plutostderrlog=/var/log/pluto.log     protostack=netkey     nat_traversal=yes     virtual_private=%%v4:%(vpc_cidr)s     nhelpers=0 ## connection definition in Debian ## conn my-conn     authby=secret     auto=start     pfs=yes     type=tunnel     #left side (myside)     left=%(private_ip_ubuntu)s     leftsubnet=%(private_ip_ubuntu)s/32     leftnexthop=%(vgw_ip)s     leftsourceip=%(private_ip_ubuntu)s     #right security gateway (VPN side)     right=%(vgw_ip)s     rightsubnet=%(vpc_cidr)s     rightnexthop=%(private_ip_ubuntu)s N/A