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:
parent
067ba2150a
commit
1d0a8ba83d
@ -92,10 +92,6 @@ Puppet::Type.type(:glance_image).provide(
|
|||||||
@property_hash[:ensure] = :absent
|
@property_hash[:ensure] = :absent
|
||||||
end
|
end
|
||||||
|
|
||||||
def location=(value)
|
|
||||||
auth_glance('image-update', id, "--location=#{value}")
|
|
||||||
end
|
|
||||||
|
|
||||||
def is_public=(value)
|
def is_public=(value)
|
||||||
auth_glance('image-update', id, "--is-public=#{value}")
|
auth_glance('image-update', id, "--is-public=#{value}")
|
||||||
end
|
end
|
||||||
|
@ -36,7 +36,7 @@ Puppet::Type.newtype(:glance_image) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:location) do
|
newparam(:location) do
|
||||||
desc "The permanent location of the image. Optional"
|
desc "The permanent location of the image. Optional"
|
||||||
newvalues(/\S+/)
|
newvalues(/\S+/)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user