core/rails/app/models/network.rb
# for auto, we add an IPv6 prefix
for auto, we add an IPv6 prefix
for auto we add an IPv6 prefix
def auto_prefix
    if (v6prefix == V6AUTO)
      Role.logger.info("Network: Creating automatic IPv6 prefix for #{name}")
      user = User.admin.first
      cluster_prefix = user.settings(:network).v6prefix[name]
      if cluster_prefix.nil? or cluster_prefix.eql? V6AUTO
        cluster_prefix = Network.make_global_v6prefix
        user.settings(:network).v6prefix[name] = cluster_prefix
      end
      prefix = sprintf("#{cluster_prefix}:%04x",id)
      Network.transaction do
        update_column("v6prefix", prefix)
      end
      Rails.logger.info("Network: Created #{prefix} for #{name}")
      create_auto_v6_range
    end
  end
def auto_prefix if ( v6prefix == V6AUTO ) Role . logger . info ( "Network: Creating automatic IPv6 prefix for #{name}" ) user = User . admin . first cluster_prefix = user . settings ( :network ) . v6prefix [ name ] if cluster_prefix . nil? or cluster_prefix . eql? V6AUTO cluster_prefix = Network . make_global_v6prefix user . settings ( :network ) . v6prefix [ name ] = cluster_prefix end prefix = sprintf ( "#{cluster_prefix}:%04x" , id ) Network . transaction do update_column ( "v6prefix" , prefix ) end Rails . logger . info ( "Network: Created #{prefix} for #{name}" ) create_auto_v6_range end end
for auto, we add an IPv6 prefix
for auto we add an IPv6 prefix
# Add our IPv6 prefix. # this config code really needs to move to Rebar base