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
|
def create
|
||||||
temp_file = false
|
temp_file = false
|
||||||
|
|
||||||
if @resource[:source]
|
if @resource[:source]
|
||||||
if @resource[:proxy]
|
if @resource[:proxy]
|
||||||
proxy_uri = URI(@resource[:proxy])
|
proxy_uri = URI(@resource[:proxy])
|
||||||
@ -45,14 +46,10 @@ Puppet::Type.type(:glance_image).provide(
|
|||||||
|
|
||||||
location = "--file=#{temp_file.path}"
|
location = "--file=#{temp_file.path}"
|
||||||
end
|
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
|
else
|
||||||
raise(Puppet::Error, "Must specify either source or location")
|
raise(Puppet::Error, "The source parameter is required to create an image")
|
||||||
end
|
end
|
||||||
|
|
||||||
opts = [@resource[:name]]
|
opts = [@resource[:name]]
|
||||||
|
|
||||||
opts << (@resource[:is_public] == :true ? '--public' : '--private')
|
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}/)
|
newvalues(/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newparam(:location) do
|
|
||||||
desc "The permanent location of the image. Optional"
|
|
||||||
newvalues(/\S+/)
|
|
||||||
end
|
|
||||||
|
|
||||||
newproperty(:is_public) do
|
newproperty(:is_public) do
|
||||||
desc "Whether the image is public or not. Default true"
|
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)
|
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