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
This commit is contained in:
Colleen Murphy 2015-04-10 14:28:25 -07:00
parent 067ba2150a
commit 1d0a8ba83d
2 changed files with 1 additions and 5 deletions

View File

@ -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

View File

@ -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