Actions
Refactor #10287
closedProvide helper methods for proxy features
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
The code is sprinkled with various finds, selects, detects, maps, and so forth to determine if a proxy has a particular feature. It should be refactored to provide nice methods like "proxy.has_puppet_ca?"
Updated by Dominic Cleal over 9 years ago
It's probably best to avoid methods named after the feature names as the features are dynamic, based on what's in the database. We used to do this when looking up smart proxies, and it was terrible (https://github.com/theforeman/foreman/blob/1.8.0/app/models/smart_proxy.rb#L42-L48) because the behaviour was defined when the class was evaluated, not at runtime - making it hard to test and sometimes buggy.
#has_feature?(:puppet)
or similar might be better.
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2329 added
- Pull request deleted (
)
Updated by Anonymous over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 8f657a8422a1ab85defaa9a999cc79c32ccfb1c6.
Updated by Dominic Cleal over 9 years ago
- Assignee set to Stephen Benjamin
- Translation missing: en.field_release set to 35
Actions