Bug 6515 - Ability to add custom layer directory sources for Toaster
Summary: Ability to add custom layer directory sources for Toaster
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.8 M1
Assignee: Alexandru Damian
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-07-09 05:15 UTC by David Reyna
Modified: 2015-05-27 07:41 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Reyna 2014-07-09 05:15:17 UTC
In the new project creation design for Toaster, there is the ability to select and add layers from the known YP layer directory sources.

We however also need the ability to specify additional custom layer directory sources from which Toaster can select from.

This is necessary because (a) for customers we have strongly encouraged the use of layers to add their custom content, and (b) for commercialization partners they wish to expose their value-add layers for use by the customer.

Ideally the Toaster interface would provide a setup page where such extra layer directories can be added and managed. As a minimal solution there should be a way in the Toaster set up files to specify such a list (much like one would set a remote database path).
Comment 1 Belen Barros Pena 2014-08-06 09:37:04 UTC
This is assigned to me, but on the first go the configuration of layer sources will probably be done via editing directly the Toaster settings and configuration files. 

Changing assignee to Alex.
Comment 2 Alexandru Damian 2014-08-29 16:48:10 UTC
Implemented the "Local" layer source, with layers URLs set to localhost directories.

The layer sources are managed through the admin interface.

The layers can be imported as local layer sources through the layer import functionality.

A project with local layers can only be built on the localhost build environment, and it cannot be exported (implementation in progress).
Comment 3 Ionut Chisanovici 2014-10-08 12:08:11 UTC
I tried to add a new layer in the admin page and that worked and the backend table orm_layersource was populated with the manual added layer:

select * from orm_layersource;
        id = 1
      name = Local Poky
sourcetype = 0
    apiurl = /home/ionut/work/weekly/poky/

        id = 2
      name = meta-selftest
sourcetype = 0
    apiurl = /home/ionut/work/weekly/poky/meta-selftest

The only thing for which I cannot validate this feature as Verified Fixed is that I cannot see/add the layer in the "New project page".

Is there another way to check that the manually added layer will be taken into consideration for the next build ?

Cheers,
Ionut
Comment 4 Ionut Chisanovici 2014-10-08 12:08:43 UTC
See above.
Comment 5 Paul Eggleton 2014-12-04 16:32:50 UTC
According to Alex this is a duplicate of 6595. When it comes time to test that, Michael or Alex can explain how to verify the layer has been added from the backend (although I would have thought the best way to test it would be to actually run the build.)

*** This bug has been marked as a duplicate of bug 6595 ***
Comment 6 Paul Eggleton 2015-01-06 14:17:25 UTC
According to Belen this is not in fact a duplicate of 6595. Her comments:

"[This bug] is about providing Toaster administrators with a way of creating their own layer sources, a process
which involves 2 steps:

1. Create and populate your own instance of the layer index
2. Configure Toaster to pull information from that layer index

Bug 6595 is about providing "normal" Toaster users (i.e. not administrators) a
way of importing a layer. The import layer page does this.

So these are not duplicates, and the ability to configure a custom layer
source in Toaster should be tested."
Comment 7 Alexandru Damian 2015-01-06 17:03:55 UTC
Sorry for the confusion. This bug is fixed, as it is possible to add custom layer sources through the Django admin interface. 

The layer sources do not appear in the "New Project" page. The proper way to test this functionality is:

1. Install a local copy of the layerindex application
2. Add a particular layer info in this layer index application instance
3. Add the layer index instance as a new layer source inside Toaster
4. Perform "lsupdates" comman in toaster manage.py and verify that it completes
5. Verify the layer added at 2. is available in "All layers" list in Toaster.

Pay attention to the branch names used at step 2 - they need to match with the release names used at step 5.