---
 src/app/models/boot_type.rb              |    2 +-
 src/db/migrate/043_add_bootproto_none.rb |   28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 src/db/migrate/043_add_bootproto_none.rb

diff --git a/src/app/models/boot_type.rb b/src/app/models/boot_type.rb
index 6cfdb04..20761b0 100644
--- a/src/app/models/boot_type.rb
+++ b/src/app/models/boot_type.rb
@@ -22,5 +22,5 @@ class BootType < ActiveRecord::Base
   validates_uniqueness_of :label,
     :message => 'Label must be unique'
   validates_inclusion_of :proto,
-    :in => %w( static dhcp bootp )
+    :in => %w( static dhcp bootp none )
 end
diff --git a/src/db/migrate/043_add_bootproto_none.rb 
b/src/db/migrate/043_add_bootproto_none.rb
new file mode 100644
index 0000000..7d17279
--- /dev/null
+++ b/src/db/migrate/043_add_bootproto_none.rb
@@ -0,0 +1,28 @@
+# Copyright (C) 2008 Red Hat, Inc.
+# Written by Mohammed Morsi <[email protected]>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+# introduce networks and ip_addresses tables, refactor relationships
+class AddBootprotoNone < ActiveRecord::Migration
+  def self.up
+    BootType.create(:label => 'None', :proto => 'none')
+  end
+
+  def self.down
+    BootType.destroy_all(:proto => 'none')
+  end
+end
-- 
1.6.0.6

_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel

Reply via email to