Displaying 2 results from an estimated 2 matches for "e34dddc".
Did you mean:
ae94dddc
2009 Aug 05
1
[PATCH server] associated nics w/ network base class as it is in the db
...+++ 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/vlan.rb b/src/app/models/vlan.rb
index 217a89c..e34dddc 100644
--- a/src/app/models/vlan.rb
+++ b/src/app/models/vlan.rb
@@ -19,8 +19,6 @@
class Vlan < Network
has_many :bondings
- has_many :nics
-
validates_presence_of :number,
:message => 'A number must be specified.'
--
1.6.0.6
2009 Nov 03
0
[PATCH server] suggest ip address for nics/bondings on edit host/vm network forms
...is_destroyable?
nics.empty?
end
+
+ # generate an ip address for this network based on associated ip and
+ # addresses already associated w/ nics
+ def gen_address
+ super(nics.collect { |n| n.ip_address})
+ end
end
diff --git a/src/app/models/vlan.rb b/src/app/models/vlan.rb
index e34dddc..ca80dfc 100644
--- a/src/app/models/vlan.rb
+++ b/src/app/models/vlan.rb
@@ -26,6 +26,12 @@ class Vlan < Network
bondings.empty? && nics.empty?
end
+ # generate an ip address for this network based on associated ip and
+ # addresses already associated w/ bondings/nics
+ def...