From 1d0a8ba83dfa0b4970b1b40259f45e3dd77ea543 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 10 Apr 2015 14:28:25 -0700 Subject: [PATCH] Change location to be a param, not a property The location property of the glance_image type has nearly identical functionality as the source param, yet one is a param and one is a property. It is possible to change either of these for a glance image, but only if it is as of yet unset, and therefore unsaved. It is not possible to change the location of a glance image once it has been saved, nor is it possible to query it afterward. Since having location be a property when it is usually unsettable and is always unqueryable does not make much sense, we change it to be a param to be consistent with the source param. Change-Id: I686c3fec9bf571d18e282888c626d795c9958a6b --- lib/puppet/provider/glance_image/glance.rb | 4 ---- lib/puppet/type/glance_image.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/puppet/provider/glance_image/glance.rb b/lib/puppet/provider/glance_image/glance.rb index 7be1ace9..fae22e03 100644 --- a/lib/puppet/provider/glance_image/glance.rb +++ b/lib/puppet/provider/glance_image/glance.rb @@ -92,10 +92,6 @@ Puppet::Type.type(:glance_image).provide( @property_hash[:ensure] = :absent end - def location=(value) - auth_glance('image-update', id, "--location=#{value}") - end - def is_public=(value) auth_glance('image-update', id, "--is-public=#{value}") end diff --git a/lib/puppet/type/glance_image.rb b/lib/puppet/type/glance_image.rb index 8ee348a9..10e577ef 100644 --- a/lib/puppet/type/glance_image.rb +++ b/lib/puppet/type/glance_image.rb @@ -36,7 +36,7 @@ Puppet::Type.newtype(:glance_image) do end end - newproperty(:location) do + newparam(:location) do desc "The permanent location of the image. Optional" newvalues(/\S+/) end