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

Nan Liu Branan Purvine-Riley Stephen Johnson Mehdi ABAAKOUK
Nan Liu
  • 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.
Nan Liu 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
Stephen Johnson

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

Stephen Johnson

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 Purvine-Riley 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
Nan Liu

Replaced due to changes to razor project.

Nan Liu 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. Nan Liu

    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. Nan Liu
Commits on Aug 2, 2012
  1. Nan Liu

    Fix debug message.

    nanliu authored
Commits on Aug 6, 2012
  1. Nan Liu

    Update description and add munging.

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

    Fix policy maximum default.

    nanliu authored
Commits on Aug 7, 2012
  1. Nan Liu
Commits on Aug 15, 2012
  1. Nan Liu

    Add razor tag resource.

    nanliu authored
  2. Nan Liu
  3. Nan Liu
Commits on Aug 16, 2012
  1. Mehdi ABAAKOUK

    Add razor broker ressource

    sileht authored
  2. Nan Liu

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

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

    Change munge to validate.

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