<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>XML on iMil.net</title>
    <link>http://imil.net/blog/tags/xml/</link>
    <description>Recent content in XML on iMil.net</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 06 Jun 2015 11:19:42 +0000</lastBuildDate>
    <atom:link href="http://imil.net/blog/tags/xml/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>EC2 VPN connection informations (updated)</title>
      <link>http://imil.net/blog/posts/2015/ec2-vpn-connection-informations/</link>
      <pubDate>Sat, 06 Jun 2015 11:19:42 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/ec2-vpn-connection-informations/</guid>
      <description>&lt;p&gt;For a mysterious reason, &lt;em&gt;EC2 VPN&lt;/em&gt; connection informations are stored in &lt;em&gt;XML&lt;/em&gt; within the &lt;em&gt;JSON&lt;/em&gt; data retrieved by either &lt;a href=&#34;https://github.com/boto/boto3&#34;&gt;boto&lt;/a&gt; or the &lt;a href=&#34;https://github.com/aws/aws-cli&#34;&gt;awscli&lt;/a&gt; command line tool.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a quick &lt;em&gt;python&lt;/em&gt; snippet to convert those datas in a convenient, easily parsable &lt;code&gt;dict&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;p&gt;Combining this piece of code with &lt;a href=&#34;http://jinja.pocoo.org/docs/dev/&#34;&gt;jinja2&lt;/a&gt; could help you generate &lt;a href=&#34;http://ipsec-tools.sourceforge.net/&#34;&gt;racoon&lt;/a&gt; (or whatever &lt;em&gt;IPSec&lt;/em&gt; software you use) on the fly.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://gist.github.com/iMilnb/ba7b46dfc854544bf3c8&#34;&gt;here&lt;/a&gt;&amp;rsquo;s a complete example of an automatic generation for &lt;a href=&#34;http://ipsec-tools.sourceforge.net/&#34;&gt;racoon / ipsec&lt;/a&gt; configuration files using the previous snippet, along with &lt;a href=&#34;http://jinja.pocoo.org/docs/dev/&#34;&gt;jinja2&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
