Project

General

Profile

Feature #13216

Add API extensions for facets

Added by Shimon Shtein over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins-Engines
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Add the ability to add facet's properties to host's show and list API requests.


Related issues

Related to Foreman - Bug #13355: facet_test table missing causes test failures in pluginsClosed2016-01-25
Related to Foreman - Bug #13567: locale:pack failure in facets/managed_host_extensions.rbClosed2016-02-04

Associated revisions

Revision c804d530 (diff)
Added by Shimon Shtein over 3 years ago

Fixes #13216 - Added ability to extend API by creating facet subnode
This commit adds the ability for plugins to extend Host model with custom data that will be stored in a facet model.
In order to show this data an extension point is added to Host's view API, so the properties list can be extended by the facet.
Parts that are contained in this PR:
1. Added extension point to API V2: Now each facet will be able to add facet's properties to host's details
2. Added model extensions, now you can enumerate all active facets using Host#facets and Host#facets_with_definitions methods
3. Host#attributes will include the facets by default
4. Includes facets in Host#clone

History

#1 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3076 added

#2 Updated by Shimon Shtein over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal over 3 years ago

  • Category set to Plugins-Engines
  • Legacy Backlogs Release (now unused) set to 71

#4 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13355: facet_test table missing causes test failures in plugins added

#5 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13567: locale:pack failure in facets/managed_host_extensions.rb added

Also available in: Atom PDF