/usr/lib/python3/dist-packages/plainbox/impl/providers/special.py is in python3-plainbox 0.25-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | # This file is part of Checkbox.
#
# Copyright 2012-2015 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox. If not, see <http://www.gnu.org/licenses/>.
"""
:mod:`plainbox.impl.providers.special` -- various special providers
===================================================================
.. warning::
THIS MODULE DOES NOT HAVE STABLE PUBLIC API
"""
import logging
import os
from plainbox.i18n import gettext_noop as N_
from plainbox.impl import get_plainbox_dir
from plainbox.impl.secure.providers.v1 import Provider1
from plainbox.impl.secure.providers.v1 import Provider1Definition
logger = logging.getLogger("plainbox.providers.special")
def get_stubbox_def():
"""
Get a Provider1Definition for stubbox
"""
stubbox_def = Provider1Definition()
stubbox_def.name = "2013.com.canonical.plainbox:stubbox"
stubbox_def.version = "1.0"
stubbox_def.description = N_("StubBox (dummy data for development)")
stubbox_def.secure = False
stubbox_def.gettext_domain = "plainbox-provider-stubbox"
stubbox_def.location = os.path.join(
get_plainbox_dir(), "impl/providers/stubbox")
return stubbox_def
def get_stubbox(**kwargs):
return Provider1.from_definition(get_stubbox_def(), secure=False, **kwargs)
def get_categories_def():
"""
Get a Provider1Definition for the provider that knows all the categories
"""
categories_def = Provider1Definition()
categories_def.name = "2013.com.canonical.plainbox:categories"
categories_def.version = "1.0"
categories_def.description = N_("Common test category definitions")
categories_def.secure = False
categories_def.gettext_domain = "plainbox-provider-categories"
categories_def.location = os.path.join(
get_plainbox_dir(), "impl/providers/categories")
return categories_def
def get_categories():
return Provider1.from_definition(get_categories_def(), secure=False)
def get_manifest_def():
"""
Get a Provider1Definition for the provider that handles the manifest
machinery.
"""
manifest_def = Provider1Definition()
manifest_def.name = "2013.com.canonical.plainbox:manifest"
manifest_def.version = "1.0"
manifest_def.description = N_("Hardware Manifest Provider")
manifest_def.secure = False
manifest_def.gettext_domain = "plainbox-provider-manifest"
manifest_def.location = os.path.join(
get_plainbox_dir(), "impl/providers/manifest")
return manifest_def
def get_manifest():
return Provider1.from_definition(get_manifest_def(), secure=False)
def get_exporters_def():
"""
Get a Provider1Definition for the provider that handles the exporters
machinery.
"""
exporters_def = Provider1Definition()
exporters_def.name = "2013.com.canonical.plainbox:exporters"
exporters_def.version = "1.0"
exporters_def.description = N_("Exporters Provider")
exporters_def.secure = False
exporters_def.gettext_domain = "plainbox-provider-exporters"
exporters_def.location = os.path.join(
get_plainbox_dir(), "impl/providers/exporters")
return exporters_def
def get_exporters():
return Provider1.from_definition(get_exporters_def(), secure=False)
|