Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add razor puppet resource. #48

Closed
wants to merge 16 commits into from

4 participants

@nanliu
  • Add image, model, policy resource.
  • Remove ruby 1.8.7 sample manifests.
  • Update puppet_x to the correct location.
  • Add example manifests showing image and policy management.
@nanliu nanliu Add razor puppet resource.
* Add image, model, policy resource.
* Remove ruby 1.8.7 sample manifests.
* Update puppet_x to the correct location.
* Add example manifests showing image and policy management.
0845e40
@stephenrjohnson

doesn't this need to stop in otherwise you get at /Stage[main]/Razor/Rz_image[rz_mk_prod-image.0.9.0.4.iso]/ensure: change from absent to present failed: Could not set 'present on ensure: undefined method `curl' for #Puppet::Type::Rz_image::ProviderDefault:0x7fe406957ff8

@stephenrjohnson

Should this be Puppet::debug

lib/puppet/provider/rz_policy/default.rb
((46 lines not shown))
+ @property_hash[:ensure] = :present
+ uuid = query_razor.get_model_uuid(@resource[:model])
+
+ policy = {
+ 'template' => @resource[:template],
+ 'label' => @resource[:name],
+ 'model_uuid' => uuid,
+ 'broker_uuid' => @resource[:broker],
+ 'enabled' => @resource[:enabled],
+ 'tags' => @resource[:tags],
+ 'maximum' => @resource[:maximum] || 0,
+ }
+
+ policy['broker_uuid'] = @resource[:broker] if @resource[:broker] != 'none'
+
+ Puppet.debug "razor -w model add '#{policy.to_pson}'"

razor policy not razor model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
lib/puppet/type/rz_policy.rb
((11 lines not shown))
+
+ newparam(:name, :namevar => true) do
+ desc "The name of the policy."
+
+ newvalues(/\w+/)
+ end
+
+ newproperty(:enabled) do
+ newvalues(true, false)
+ defaultto(true)
+ end
+
+ newproperty(:description) do
+ end
+
+ newproperty(:tags) do
@branan Owner
branan added a note

This should have a munge that converts a single string to an array, so that policies with one tag don't need to be defined with a single-element array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nanliu

Replaced due to changes to razor project.

@nanliu nanliu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. @nanliu

    Add razor puppet resource.

    nanliu authored
    * Add image, model, policy resource.
    * Remove ruby 1.8.7 sample manifests.
    * Update puppet_x to the correct location.
    * Add example manifests showing image and policy management.
Commits on Aug 1, 2012
  1. @nanliu
Commits on Aug 2, 2012
  1. @nanliu

    Fix debug message.

    nanliu authored
Commits on Aug 6, 2012
  1. @nanliu

    Update description and add munging.

    nanliu authored
    Munge tag values. Add munging for policy tags.
  2. @nanliu

    Fix policy maximum default.

    nanliu authored
Commits on Aug 7, 2012
  1. @nanliu
Commits on Aug 15, 2012
  1. @nanliu

    Add razor tag resource.

    nanliu authored
  2. @nanliu
  3. @nanliu
Commits on Aug 16, 2012
  1. @sileht

    Add razor broker ressource

    sileht authored
  2. @nanliu

    Merge pull request #1 from sileht/to-pull/ressource

    nanliu authored
    Add razor broker ressource
Commits on Aug 17, 2012
  1. @nanliu

    Change munge to validate.

    nanliu authored
  2. @nanliu
  3. @nanliu
  4. @nanliu
  5. @nanliu
Something went wrong with that request. Please try again.