Multiple Namespaces

Sylvain Pineau sylvain.pineau at canonical.com
Thu Sep 10 20:47:39 UTC 2015


On 10/09/2015 21:12, Jeffrey Lane wrote:
> I asked on both IRC channels and got no response, so trying here instead:
>
> Does anyone know how to use multiple namespaces with checkbox-ng?
>
> I have a provider based on the server-cert provider.  The current 
> published version of this provider uses the same namespace as the 
> checkbox provider and works pretty well.
>
> However, the experimental version of this has been changed to use a 
> different namespace.  Now trying to run the experimental version fails 
> with some errors about a missing dependencies.
>
> http://paste.ubuntu.com/12329119/
>
> Shows the console output I get when running the new version.  keep in 
> mind this is the ONLY change I've made:
>
> === modified file 'manage.py'
> --- manage.py2015-02-23 22:46:57 +0000
> +++ manage.py2015-09-08 22:36:04 +0000
> @@ -77,8 +77,8 @@
>  setup(
> -  name='2013.com.canonical.certification:opencompute-testing',
> +  name='2015.org.opencompute.certification:opencompute-testing',
>      version="1.0",
>      description=N_("OpenCompute Certification provider"),
> -  gettext_domain="2013_com_canonical_certification_opencompute-testing",
> + 
>  gettext_domain="2015_org_opencompute_certification_opencompute-testing",
>  )
>
> which just changes the namespace from the Canonical one to an OCP one.
>
> I have a feeling I will need to change the whitelists to test plan 
> units to make this work so I can call the resource stuff by the 
> canonical namespace, but I wanted to check here before I dived in that 
> deeply.
Hi Jeff,

switching to a testplan is the first thing to do as we develop features 
that are only possible with test plans
(mandatory jobs for example, but it's not the topic)

And you're right about the canonical namespace, you'll have to prefix 
all the jobs from the canonical providers with
2013.com.canonical.certification::
You'll find an example of such testplan in the doc [1].

To use resources from another namespace use the import [2] statement in 
the job definition, as follow:
[...]
plugin: manual
requires:
     device.category == 'CAPTURE'
imports: from 2013.com.canonical.certification import device
estimated_duration: 30

The only issue that it hard to solve is using scripts from another 
namespace.
providers belonging to the same namespace can share their scripts.
It's not possible if you switch to a new namespace.

network_device_info (taken as a example for your pastebin) needs to be 
duplicated in the new opencompute provider.

Sylvain

[1] 
http://plainbox.readthedocs.org/en/latest/manpages/plainbox-test-plan-units.html?highlight=test%20plan#examples
[2] 
http://plainbox.readthedocs.org/en/latest/manpages/plainbox-job-units.html?highlight=job


>
> So am I at least on the right track?  Has ANYONE actually used 
> separate namespaces on plainbox providers?
> -- 
> "Entropy isn't what it used to be."
>
> Jeff Lane - Server Certification Lead, OCP Certification Tools 
> Engineering Lead,
>                   Warrior Poet, Biker, Lover of Pie
> Phone: 919-442-8649
> Ubuntu Ham: W4KDH                          Freenode IRC: bladernr or 
> bladernr_
> gpg: 1024D/3A14B2DD 8C88 B076 0DD7 B404 1417  C466 4ABD 3635 3A14 B2DD
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/checkbox-devel/attachments/20150910/0a776848/attachment.html>


More information about the Checkbox-devel mailing list