Resource Type: vtmrest

Defined in:
lib/puppet/type/vtmrest.rb
Providers:
ruby

Overview

Controls a Brocade vTM configuration via REST.

If the object name exists then we will check that the JSON returned from the REST service matches the JSON provided in the content. The content is most likely going to come from a template.

The object will be created if it does not exist.

Example:

vtmrest { ‘pools/testpool’: ensure => present, endpoint => ‘vtm1:9070/api/tm/3.2/config/active’, username => ‘puppet’, password => ‘master’, content => template (‘stingray/pools.erb’), debug => 4, failfast => false, }

In this example, Puppet will ensure that the vTM configuration of pools/testpool matches the configuration provided in the template. The default

type of "application/json" will be used for the content

vtmrest { ‘rules/rateShaping’: endpoint => ‘vtm1:9070/api/tm/3.2/config/active’, username => ‘puppet’, password => ‘master’, type => ‘application/octet-stream’, content => “rate.use(‘myClass’, request.getRemoteIP());” }

In this example we upload a rule and provide the content-type of ‘application/octet-stream’ The default debug level of 0 will be used.

Custom types may be suesceptable to: tickets.puppetlabs.com/browse/PUP-1515

Properties

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent

Parameters

  • content

    The content to be compared against the REST service

  • debug

    Optional debug level 0 to 5, 5 being most verbose. Default is 0.

  • endpoint

    The REST address of the vTM to which this configuration is applied.

  • failfast

    Should object camparisons fail quickly (failfast) or should attributes be compared exhaustively

  • internal

    The internal resource name as known by the vTM Rest Controller

  • name (namevar)

    The name of the resource to check

  • password

    The password for making the REST calls to vTM

  • provider

    The specific backend to use for this ‘vtmrest` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • type

    Option Content-Type for the object. Default is application/json

  • username

    The user account to use for making REST calls to the vTM