Mohammed Morsi
2009-Sep-23 21:06 UTC
[Ovirt-devel] [PATCH server] add network boot protocol 'none'
---
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 <mmorsi at redhat.com>
+#
+# 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
Reasonably Related Threads
- [PATCH server] use service layer for Network controller.
- [PATCH server] Add network QMF apis.
- [PATCH server] permit many-to-many vms / networks relationship
- [PATCH server] suggest ip address for nics/bondings on edit host/vm network forms
- [PATCH server] fixes to the multiple vm/nets component
