1- Subnet object should have the netmask in CIDR form 2- Customer info: Account number: #1484012 CSM customer: no TAM customer: no Strategic Customer: no 3- What is the nature and description of the request? When customizing the provisioning template, hosts' subnet has the netmask value in 255.255.255.0 format. It should be available in CIDR format e.g. '/24'. In some scenarios CIDR form is accepted(e.g. nmcli command accepts the ipv4.addresses as 255.255.255.0/24). 4. Why does the customer need this? (List the business requirements here) customer's verbatim- "We use Satellite Provisisioning to build many physical and virtual hosts all the time. Most importantly the underlying techololgy for Teaming-vs-Bonding interfaces is different with teaming on RHEL7. We should be using Teaming. To establish Team interfaces you use nmcli to establshh the NetworkManager Connection type-team object. We cant do that without the nmcli command and the current information exported from Satellite for Foreman. A potential work-aournd would be to script a map to translate subnet masks to bits - but that would be pretty ugly." 5. How would the customer like to achieve this? (List the functional requirements here) Configure Foreman to export @host.interfaces.subnet.bits in addition to @host.interfaces.subnet.mask. Note: Without the prefix bits from foreman it is impossible to set up NetworkManager with or without "team" interfaces. 6. For each functional requirement listed in question 5, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. 7. Is there already an existing RFE upstream or in Red Hat bugzilla? No 8. Does the customer have any specific timeline dependencies? NA 9. Is the sales team involved in this request and do they have any additional input? No 10. List any affected packages or components. 11. Would the customer be able to assist in testing this functionality if implemented? Yes
Sorry for my ignorance, but do I understand correctly that customer wants to have a way in provisioning templates to get the subnet netmask in CIDR notation? Looking at code, there're network and cidr macros available. Could you test if <%= @host.interfaces.subnet.network -%>/<%= @host.interfaces.subnet.cidr -%> renders what customer wants? We could potentially allow new macro "network_address" that combines both.
@host.interfaces.subnet.cidr does provide the (24) bits as required - thank you so much. Provisioning ERB: <% @host.interfaces.each do |i| -%> <% if i.domain.to_s.match(/oob/) -%> nmcli con add con-name OOB \ type ethernet \ autoconnect yes \ mac <%= i.mac %> \ ifname <%= i.identifier %> \ ipv4.method manual \ ipv6.method ignore \ ipv4.addresses <%= i.ip %>/<%= i.subnet.cidr -%> \ ipv4.ignore-auto-dns yes ... Generated output: vi goThanks again
Generated output: nmcli con add con-name OOB \ type ethernet \ autoconnect yes \ mac d8:d3:85:b3:c5:86 \ ifname enp3s0f0 \ ipv4.method manual \ ipv6.method ignore \ ipv4.addresses 192.168.1.51/24 \ << Here ipv4.ignore-auto-dns yes
Thanks for letting us know, closin is not a bug. Please let me know if I misunderstood.