Skip to content

Instantly share code, notes, and snippets.

@abrader
Last active July 17, 2017 14:55
Show Gist options
  • Select an option

  • Save abrader/04e7c9b9ec92305f2ebb7948443acacc to your computer and use it in GitHub Desktop.

Select an option

Save abrader/04e7c9b9ec92305f2ebb7948443acacc to your computer and use it in GitHub Desktop.
Puppet TAPP: NetApp ONTAP Module Review

netapp-logo

Reference documentation:

General Notes:

  • Adherence to Puppet Style
  • Puppet types have weak to no validation
    • Should bolster your types by providing constraints on user provided data and conformance standards
  • NetAppTruthy property provided but no evidence of usage
    • Make use of truthy type or remove unnecessary code
  • Many providers do not have destroy methods
    • Was not sure if this was intentional
      • lib/puppet/provider/netapp_vserver_cifs_options/cmode.rb
      • lib/puppet/provider/netapp_vserver_cifs_domain_password_schedule/cmode.rb
      • lib/puppet/provider/netapp_system_node_autosupport/cmode.rb
  • Puppet manifest classes are not documented in known standards
  • Data types should be used for parameters in Puppet DSL classes
  • Puppet DSL should contain data validation
    • Should provide proper validation of data provided by module users
      • Use data types where possible as this will provide basic validation
      • Provide additonal validation via custom functions

README.md

  • Examples are in a node definition format (i.e., site.pp manifest)
    • This is an anti-pattern. Customers/partners are educated on the role & profile design pattern
  • Consistency of code examples
    • Some examples are language specific and some are not
    • Instead of using three ticks use three ticks immediately proceeded by a language name. Works for other languages as well on GitHub's branded Markdown. Here is the README and the fully supported lanuage list
    • i.e.,
    netapp_lif { 'vserver01_lif':
      ensure        => present,
      homeport      => 'e0c',
      homenode      => 'ontap01',
      address       => '10.0.207.5',
      vserver       => 'vserver01',
      netmask       => '255.255.255.0',
      dataprotocols => ['nfs'],
    }

lib/puppet/util/network_device/netapp/facts.rb

lib/puppet/type/netapp_nfs.rb

init.pp

  • No code in this class
  • Consider removing or provide additional Puppet DSL documentation here

iscsi.pp

nfs.pp

svm.pp

vqe.pp

  • Needs Puppet strings formatted documentation
  • No validation
    • Should provide proper validation of data provided by module users
      • Use data types where possible
      • Provide additonal validation via custom functions
  • Data types should be used for parameters in Puppet DSL classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment