Skip to content

Commit

Permalink
Prior to renaming netdb to netsvc
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Kelly committed Oct 31, 2010
1 parent f5156df commit 37198b1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/home/_settings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
['Usergroups', usergroups_url]
] if SETTINGS[:login]
%>
<%= select :controller, :id, choices, {:selected => @controller.request.url}, {:id => "settings_dropdown"}%>
<%= select :obj, :name, choices, {:selected => @controller.request.url} , {:id => "settings_dropdown"}%>

<%= observe_field('settings_dropdown', :function => "window.location.href = value;") %>
</span>
1 change: 1 addition & 0 deletions db/migrate/20091212110033_create_vendors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def self.up
end
Vendor.create :name => "Microsoft"
Vendor.create :name => "ISC"
Vendor.create :name => "Generic"
end

def self.down
Expand Down
1 change: 1 addition & 0 deletions db/migrate/20091212110042_create_servertypes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def self.up
end
Servertype.create :name => "DHCP"
Servertype.create :name => "DNS"
Servertype.create :name => "TFTP"
end

def self.down
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20101015100000_add_dns_column.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
class AddDnsColumn < ActiveRecord::Migration
def self.up
add_column :domains, :dns_id, :integer
add_column :domains, :tftp_id, :integer
end

def self.down
remove_column :domains, :tftp_id
remove_column :domains, :dns_id
end
end
6 changes: 5 additions & 1 deletion lib/netdb_manager/host_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ def self.included(base)
base.class_eval do
attr_accessor :dns, :dhcp
before_create :initialize_proxies, :check_netdbs
after_create :create_netdbs
after_create :create_netdbs, :initialize_tftp
after_update :initialize_proxies, :update_netdbs
after_destroy :initialize_proxies, :destroy_netdbs
end
true
end

module InstanceMethods
# Ensure that the tftp bootfiles are available on the proxy host
def initialize_tftp

end
# Checks whether DNS or DHCP entries already exist
# Returns: Boolean true if no entries exists
def check_netdbs
Expand Down

0 comments on commit 37198b1

Please sign in to comment.