search for: f50eeff

Displaying 2 results from an estimated 2 matches for "f50eeff".

Did you mean: f50daff
2009 Aug 05
1
[PATCH server] associated nics w/ network base class as it is in the db
...many :usages, :join_table => 'networks_usages' + has_many :nics + validates_presence_of :type, :message => 'A type must be specified.' validates_presence_of :name, diff --git a/src/app/models/physical_network.rb b/src/app/models/physical_network.rb index 52a748a..f50eeff 100644 --- a/src/app/models/physical_network.rb +++ b/src/app/models/physical_network.rb @@ -17,8 +17,6 @@ # also available at http://www.gnu.org/copyleft/gpl.html. class PhysicalNetwork < Network - has_many :nics - def is_destroyable? nics.empty? end diff --git a/src/app/models...
2009 Nov 03
0
[PATCH server] suggest ip address for nics/bondings on edit host/vm network forms
...ray of addreses already used + def gen_address(used_addresses = []) + return nil if ip_addresses.nil? || ip_addresses.size == 0 + ip_addresses[0].first_available_address(used_addresses) + end end diff --git a/src/app/models/physical_network.rb b/src/app/models/physical_network.rb index f50eeff..17a325e 100644 --- a/src/app/models/physical_network.rb +++ b/src/app/models/physical_network.rb @@ -20,4 +20,10 @@ class PhysicalNetwork < Network def is_destroyable? nics.empty? end + + # generate an ip address for this network based on associated ip and + # addresses already ass...