# File lib/puppet/type/zone.rb, line 153
153:         def sync
154:             method = nil
155:             if up?
156:                 direction = :up
157:             else
158:                 direction = :down
159:             end
160: 
161:             # We need to get the state we're currently in and just call
162:             # everything between it and us.
163:             self.class.state_sequence(self.retrieve, self.should).each do |state|
164:                 if method = state[direction]
165:                     warned = false
166:                     while provider.processing?
167:                         unless warned
168:                             info "Waiting for zone to finish processing"
169:                             warned = true
170:                         end
171:                         sleep 1
172:                     end
173:                     provider.send(method)
174:                 else
175:                     raise Puppet::DevError, "Cannot move %s from %s" %
176:                         [direction, st[:name]]
177:                 end
178:             end
179: 
180:             return ("zone_" + self.should.to_s).intern
181:         end