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