Project

General

Profile

« Previous | Next » 

Revision 8838eb42

Added by Ohad Levy over 11 years ago

  • ID 8838eb42a2a292f50126966d3fa768edad3a237a

fixes #1814 - converts sp_* attributes into a BMC interface class

this patch also includes the following

  • added a new interfaces table, and STI objects to represent a NIC, BMC, Managed
    and a bootable interface.
  • refactored DHCP/DNS orchestation code, so they can work on the
    interface objects and on the primary interface information that still
    reside in the hosts table.
  • added basic UI for interface selection

this refactor also helps to simply refactoring the host object into
multiple objects.

this patch also fixes
fixes #1325 - BMC NIC should also create DNS entry
fixes #1813 - allow to support multiple NIC per host

View differences:

test/functional/subnets_controller_test.rb
def test_destroy
subnet = Subnet.first
subnet.hosts.clear
subnet.sps.clear
subnet.interfaces.clear
delete :destroy, {:id => subnet}, set_session_user
assert_redirected_to subnets_url
assert !Subnet.exists?(subnet.id)
......
def test_destroy_json
subnet = Subnet.first
subnet.hosts.clear
subnet.sps.clear
subnet.interfaces.clear
delete :destroy, {:format => "json", :id => subnet}, set_session_user
subnet = ActiveSupport::JSON.decode(@response.body)
assert_response :ok

Also available in: Unified diff