Project

General

Profile

0001-fixes-1600-delete-unmanaged-host.patch

Mikael Fridh, 05/03/2012 10:11 AM

View differences:

app/models/host_common.rb
24 24
    end
25 25

  
26 26
    def puppetca?
27
      return false if self.respond_to?(:managed?) and !managed?
27 28
      (!puppetproxy_id.nil? and !puppetproxy.url.empty?)
28 29
    end
29 30

  
app/models/orchestration/dhcp.rb
11 11
  module InstanceMethods
12 12

  
13 13
    def dhcp?
14
      !subnet.nil? and subnet.dhcp? and errors.empty?
14
      !subnet.nil? and subnet.dhcp? and errors.empty? and managed?
15 15
    end
16 16

  
17 17
    def sp_dhcp?
app/models/orchestration/dns.rb
10 10
  module InstanceMethods
11 11

  
12 12
    def dns?
13
      !domain.nil? and !domain.proxy.nil? and errors.empty?
13
      !domain.nil? and !domain.proxy.nil? and errors.empty? and managed?
14 14
    end
15 15

  
16 16
    def dns_a_record
app/models/orchestration/tftp.rb
14 14
  module InstanceMethods
15 15

  
16 16
    def tftp?
17
      !!(subnet and subnet.tftp?)
17
      !!(subnet and subnet.tftp?) and managed?
18 18
    end
19 19

  
20 20
    def tftp
21
-