Merge "glance_image: Drop broken location parameter"
This commit is contained in:
commit
6767388dce
@ -23,6 +23,7 @@ Puppet::Type.type(:glance_image).provide(
|
||||
|
||||
def create
|
||||
temp_file = false
|
||||
|
||||
if @resource[:source]
|
||||
if @resource[:proxy]
|
||||
proxy_uri = URI(@resource[:proxy])
|
||||
@ -45,14 +46,10 @@ Puppet::Type.type(:glance_image).provide(
|
||||
|
||||
location = "--file=#{temp_file.path}"
|
||||
end
|
||||
|
||||
# location cannot handle file://
|
||||
# location does not import, so no sense in doing anything more than this
|
||||
elsif @resource[:location]
|
||||
location = "--location=#{@resource[:location]}"
|
||||
else
|
||||
raise(Puppet::Error, "Must specify either source or location")
|
||||
raise(Puppet::Error, "The source parameter is required to create an image")
|
||||
end
|
||||
|
||||
opts = [@resource[:name]]
|
||||
|
||||
opts << (@resource[:is_public] == :true ? '--public' : '--private')
|
||||
|
@ -38,11 +38,6 @@ Puppet::Type.newtype(:glance_image) do
|
||||
newvalues(/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/)
|
||||
end
|
||||
|
||||
newparam(:location) do
|
||||
desc "The permanent location of the image. Optional"
|
||||
newvalues(/\S+/)
|
||||
end
|
||||
|
||||
newproperty(:is_public) do
|
||||
desc "Whether the image is public or not. Default true"
|
||||
newvalues(/(y|Y)es/, /(n|N)o/, /(t|T)rue/, /(f|F)alse/, true, false)
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``location`` parameter of the ``glance_image`` resource type has been
|
||||
removed. This parameter has never been functional with Image v2 API.
|
Loading…
Reference in New Issue
Block a user