Skip to content


ModiPy Documentation Updates

I’ve been doing a bit of work on ModiPy this week. In particular, I’ve been writing documentation on how to use it. While still far from comprehensive, you can now get a much better idea of how to use it from the wiki.

I draw your attention particularly to the QuickStart guide. I hope this goes some way to describe just how easy it is to get a working set of changes automated using this tool.

I’m fixing up the code for another point release soonish. Not sure when, probably once I’ve triaged the bugs and missing features I find as I write things up.

Here’s a piece of bonus doco, though. This is the configuration I just used to add all the license keys to a NetApp simulater I’ve just re-installed.

<config>

  <!-- define my provisioner -->
  <provisioner
      name='netapp_zapi_provisioner'
      module='modipy.netapp'
      type='ZAPIProvisioner'
      command_timeout='30'>
  </provisioner>

  <!-- define some devices I want to provision to -->
  <device name='siteA-fashda-01'>
    <ipaddress>10.232.8.110</ipaddress>
  </device>

  <device name='siteA-fashdb-01'>
    <ipaddress>10.232.8.111</ipaddress>
  </device>

  <device name='siteA-fasnst-01'>
    <ipaddress>10.232.8.112</ipaddress>
  </device>

  <iterator name="license_keys_csv"
        type='csv'
        file="simulator-licenses.csv">
  </iterator>

  <!-- Define the changes I want to apply -->

  <change name="add_licenses" iterator="license_keys_csv"
      module="modipy.netapp" type="ZAPIChange">

    <target name="siteA-fashda-01"/>

    <impl>
      <zapicommand>
    <license-add>
      <code>%(key)s</code>
    </license-add>
      </zapicommand>
      <!-- We ignore errno 22, which is an invalid license code -->
      <condition>results.status == 'passed' or results.errno == 22</condition>
    </impl>

    <backout>
      <zapicommand>
    <license-delete>
      <service>%(license)s</service>
    </license-delete>
      </zapicommand>
      <condition>results.status == 'passed' or results.errno == 22</condition>
    </backout>

  </change>
</config>

No related articles.

Posted in seafelt, Software, Tip. Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.