|
<%= selectable_f f, :type, interfaces_types, {},
|
|
:class => 'interface_type',
|
|
:disabled => !f.object.new_record?,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
|
|
<%= text_f f, :mac,
|
|
:help_inline => popover('', _("Media access control address for this interface. Format must be six groups of two hexadecimal digits separated by colons (:), e.g. 00:11:22:33:44:55. Most virtualization compute resources (e.g. VMware, oVirt, libvirt) will overwrite the provided value with new random MAC address."),
|
|
:rel => 'popover-modal'),
|
|
:class => :interface_mac, :'data-url' => random_name_interfaces_path, :size => "col-md-8", :label_size => "col-md-3" %>
|
|
<%= text_f f, :identifier,
|
|
:label => _("Device identifier"),
|
|
:help_inline => popover('',
|
|
_("Device identifier for this interface. This may be different on various platforms and environments, here are some common examples.<br/><ul>" +
|
|
"<li>Use the basic name for physical interface identifiers, e.g. <strong>eth0</strong> or <strong>em0</strong> with biosdevname.</li>" +
|
|
"<li>For virtual interfaces, use either alias notation (<strong>eth0:1</strong>, name:index) or VLAN notation (<strong>eth0.15</strong>, name.tag).</li>" +
|
|
"<li>For bonds it's common to use <strong>bond0</strong> on Linux, <strong>lagg0</strong> on FreeBSD systems.</li></ul>"),
|
|
:title => _("Device identifier"),
|
|
:rel => 'popover-modal',
|
|
:'data-placement' => "top"
|
|
),
|
|
:class => :interface_identifier,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
<%= text_f f, :name, :label => _("DNS name"), :value => f.object.shortname,
|
|
:help_inline => popover('', _("Primary interface's DNS name and domain define host's FQDN"), :rel => 'popover-modal'),
|
|
:class => :interface_name,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
<% if SETTINGS[:unattended] %>
|
|
<%= select_f f, :domain_id, accessible_resource(f.object, :domain), :id, :to_label,
|
|
{ :include_blank => accessible_resource(f.object, :domain).any? ? true : _("No domains")},
|
|
{ :disabled => accessible_resource(f.object, :domain).empty? ? true : false,
|
|
:help_inline => :indicator,
|
|
:class => 'interface_domain', :'data-url' => domain_selected_hosts_path,
|
|
:size => "col-md-8", :label_size => "col-md-3" } %>
|
|
<%= nic_subnet_field f, :subnet_id, :"Subnet::Ipv4",
|
|
{ :label => _("IPv4 Subnet"),
|
|
:class => 'interface_subnet' } %>
|
|
<%= nic_subnet_field f, :subnet6_id, :"Subnet::Ipv6",
|
|
{ :label => _("IPv6 Subnet"),
|
|
:class => 'interface_subnet6' } %>
|
|
<% end %>
|
|
<%= text_f f, :ip,
|
|
:class => :interface_ip,
|
|
:label => _("IPv4 address"),
|
|
:autocomplete => 'off',
|
|
:help_block => suggest_new_link(f, :subnet , 'suggest_new_ip'),
|
|
:help_inline => popover('',
|
|
_("An IP address will be auto-suggested if you have enabled IPAM on the IPv4 subnet selected above.<br/><br/>The IP address can be left blank when:<br/><ul><li>provisioning tokens are enabled</li><li>the domain does not manage DNS</li><li>the subnet does not manage reverse DNS</li><li>and the subnet does not manage DHCP reservations</li></ul>"),
|
|
:title => _("IP address auto-suggest"),
|
|
:rel => 'popover-modal',
|
|
:'data-placement' => "top"
|
|
).html_safe,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
|
|
<%= text_f f, :ip6,
|
|
:label => _("IPv6 address"),
|
|
:class => :interface_ip6,
|
|
:autocomplete => 'off',
|
|
:help_block => suggest_new_link(f, :subnet6, 'suggest_new_ip6'),
|
|
:help_inline => popover('',
|
|
_("An IP address will be auto-suggested if you have enabled IPAM on the IPv6 subnet selected above."),
|
|
:title => _("IP address auto-suggest"),
|
|
:rel => 'popover-modal',
|
|
:'data-placement' => "top"
|
|
).html_safe,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
|
|
<% if SETTINGS[:unattended] %>
|
|
<%= checkbox_f f, :managed,
|
|
:help_inline => popover('',_("Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?"), :rel => 'popover-modal'),
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
<% end %>
|
|
<%= checkbox_f f, :primary,
|
|
:help_inline => popover('',_("The Primary interface is used for constructing the FQDN of the host"), :rel => 'popover-modal'),
|
|
:class => :interface_primary,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|
|
<%= checkbox_f f, :provision,
|
|
:help_inline => popover('',_("The Provisioning interface is used for TFTP of PXELinux (or SSH for image-based hosts)"), :rel => 'popover-modal'),
|
|
:class => :interface_provision,
|
|
:size => "col-md-8", :label_size => "col-md-3" %>
|