Xc@sRddlZddlmZddlZddlmZdefdYZdS(iN(tArg(t EC2RequesttCreateVpnConnectionc BseZdZedddddddeddd d ed dd dedd d deddddeddd dedddddd dedddd dedddd dgZdZRS( sCreate a VPN connection between a virtual private gateway and a customer gateway You can optionally format the connection information for specific devices using the --format or --stylesheet options. If the --stylesheet option is an HTTP or HTTPS URL it will be downloaded as needed.s-ts--typetdesttTypetmetavarsipsec.1trequiredtchoicesthelps,the type of VPN connection to use (required)s--customer-gatewaytCustomerGatewayIdtCGATEWAYs0ID of the customer gateway to connect (required)s --vpn-gatewayt VpnGatewayIdtVGATEWAYsGID of the virtual private gateway to connect (required)s--static-routes-onlysOptions.StaticRoutesOnlytactiont store_trues%use only static routes instead of BGPs--formattroute_tosshow connection information in a specific format (cisco-ios-isr, juniper-junos-j, juniper-screenos-6.1, juniper-screenos-6.2, generic, xml, none) (default: xml)s --stylesheetsjformat the connection information using an XSL stylesheet. If the value contains "{format}" it will be replaced with the format chosen by the --format option. If the value is an HTTP or HTTPS URL it will be downloaded as needed. (default: value of "vpn-stylesheet" region option)cCs4|jjddkr3|jjd}t}n|jjddkrZd}t}n|jjddkrd}t}n|jjd}|s|jjd}n|r|jd|jd}n,|jj dd}t j |dt j t|}|j|jd p id |d|dS( Ntformatt stylesheettnonetxmlsvpn-stylesheets current region has no stylesheetscurrent region has no XSLT stylesheet to format output; connection info will not be shown (try specifying one with "--stylesheet" or using "--format xml")tfilet vpnConnectiontshow_conn_info(targstgettNonetTruetFalsetconfigtget_region_optionRtlogtwarntsixtprint_tsyststderrtbooltprint_vpn_connection(tselftresultRRtmsg((sN/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/createvpnconnection.pyt print_result@s*    (sipsec.1N(t__name__t __module__t DESCRIPTIONRRRtARGSR)(((sN/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/createvpnconnection.pyR"s$ (R"trequestbuilderRR teuca2ools.commands.ec2RR(((sN/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/createvpnconnection.pyts