From 26c8746d7b06192cf2997f94479fab2610f08aa9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 10 May 2020 00:37:40 +0900 Subject: [PATCH] Fix incorrect comments about updating region/zone of a device Updating region/zone of a device is actually implemented and supported in swift, while puppet-swift doesn't support that operation yet. This patch updates error messages when an operator tries to update region/zone of a device, so that they notice more clearly that the cause exists in puppet-swift, not in swift. Change-Id: I7c7f633630ac52578a0cf6beb2033465a16bd251 --- lib/puppet/provider/swift_ring_builder.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/puppet/provider/swift_ring_builder.rb b/lib/puppet/provider/swift_ring_builder.rb index e79bb5d7..d8df5a36 100644 --- a/lib/puppet/provider/swift_ring_builder.rb +++ b/lib/puppet/provider/swift_ring_builder.rb @@ -203,16 +203,15 @@ class Puppet::Provider::SwiftRingBuilder < Puppet::Provider end def region=(region) - raise(Puppet::Error, "Changing the region of a device is not possible.") + raise(Puppet::Error, "Changing the region of a device is not yet supported.") end def zone ring[resource[:name]][:zone] end - # TODO - is updating the zone supported? def zone=(zone) - Puppet.warning('Setting zone is not yet supported, I am not even sure if it is supported') + raise(Puppet::Error, "Changing the zone of a device is not yet supported.") end def weight