core/rails/app/controllers/support_controller.rb
# used by BDD to create Admin node
used by BDD to create Admin node
used by BDD to create Admin node
def bootstrap_post
    if Network.where(:name=>'admin').count == 0
      deployment = Deployment.system
      Network.transaction do
        net = Network.create :name=>'admin', :description=>I18n.t('support.bootstrap.admin_net', :default=>""),  :deployment_id=>deployment.id, :conduit=>Network::DEFAULTCONDUIT, :v6prefix => Network::V6AUTO, :category => "admin"
        NetworkRange.create :name=>'admin', :network_id=>net.id, :first=>"192.168.124.10/24", :last=>"192.168.124.11/24"
        NetworkRange.create :name=>'dhcp', :network_id=>net.id, :first=>"192.168.124.21/24", :last=>"192.168.124.80/24"
        NetworkRange.create :name=>'host', :network_id=>net.id, :first=>"192.168.124.81/24", :last=>"192.168.124.254/24"
        bmc = Network.create :name=>'bmc', :description=>I18n.t('support.bootstrap.bmc_net', :default=>""),  :deployment_id=>deployment.id, :conduit=>Network::BMCCONDUIT, :v6prefix => Network::V6AUTO, :category => "bmc"
        NetworkRange.create :name=>'admin', :network_id=>bmc.id, :first=>"192.168.128.10/24", :last=>"192.168.128.20/24"
        NetworkRange.create :name=>'host', :network_id=>bmc.id, :first=>"192.168.128.21/24", :last=>"192.168.128.254/24"
      end
    end
  end
def bootstrap_post if Network . where ( :name => 'admin' ) . count == 0 deployment = Deployment . system Network . transaction do net = Network . create :name => 'admin' , :description => I18n . t ( 'support.bootstrap.admin_net' , :default => "" ) , :deployment_id => deployment . id , :conduit => Network :: DEFAULTCONDUIT , :v6prefix => Network :: V6AUTO , :category => "admin" NetworkRange . create :name => 'admin' , :network_id => net . id , :first => "192.168.124.10/24" , :last => "192.168.124.11/24" NetworkRange . create :name => 'dhcp' , :network_id => net . id , :first => "192.168.124.21/24" , :last => "192.168.124.80/24" NetworkRange . create :name => 'host' , :network_id => net . id , :first => "192.168.124.81/24" , :last => "192.168.124.254/24" bmc = Network . create :name => 'bmc' , :description => I18n . t ( 'support.bootstrap.bmc_net' , :default => "" ) , :deployment_id => deployment . id , :conduit => Network :: BMCCONDUIT , :v6prefix => Network :: V6AUTO , :category => "bmc" NetworkRange . create :name => 'admin' , :network_id => bmc . id , :first => "192.168.128.10/24" , :last => "192.168.128.20/24" NetworkRange . create :name => 'host' , :network_id => bmc . id , :first => "192.168.128.21/24" , :last => "192.168.128.254/24" end end end
used by BDD to create Admin node
used by BDD to create Admin node
# only create if no other netwroks # admin network # bmc network