Refactor #10425
openRemove name/fqdn/shortname/hostname duplication
Description
The storage of names with and without domain names appended should be refactored to be consistent, as it currently depends on the unattended setting for more compatibility with Puppet storeconfigs (not shared any more).
There are a lot of different methods in the Nic::* and Host::* classes for determining the FQDN, hostname, name and shortname, which should be unified. It should be possibly for fqdn, name and hostname to always be the same, and shortname to return consistently without as many methods as we currently have.
Updated by Dominic Cleal over 9 years ago
https://github.com/theforeman/foreman/blob/1.8.0/app/models/nic/base.rb#L110-L112
https://github.com/theforeman/foreman/blob/1.8.0/app/models/nic/base.rb#L119-L122
https://github.com/theforeman/foreman/blob/1.8.0/app/models/nic/interface.rb#L52
https://github.com/theforeman/foreman/blob/1.8.0/app/models/nic/interface.rb#L71-L95
https://github.com/theforeman/foreman/blob/1.8.0/app/models/nic/managed.rb#L37-L43
https://github.com/theforeman/foreman/blob/1.8.0/app/models/host/base.rb#L31
https://github.com/theforeman/foreman/blob/1.8.0/app/models/host/base.rb#L84-L85 (31 above aliases hostname, this delegates)
Updated by Dominic Cleal over 9 years ago
- Related to Bug #10403: Smart Class Parameter Overrides using the FQDN fact as a match no longer applies the override added