Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
409fbeb0
Commit
409fbeb0
authored
6 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
probe class now passes the plugin as needed.
parent
321dfdd6
No related branches found
No related tags found
1 merge request
!130
Safer plugin import - 2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/tests/probe_classes/factory_registry_plugin.py
+12
-5
12 additions, 5 deletions
force_bdss/tests/probe_classes/factory_registry_plugin.py
with
12 additions
and
5 deletions
force_bdss/tests/probe_classes/factory_registry_plugin.py
+
12
−
5
View file @
409fbeb0
from
traits.api
import
List
,
HasStrictTraits
,
provides
from
traits.api
import
List
,
HasStrictTraits
,
provides
,
Any
from
force_bdss.factory_registry_plugin
import
IFactoryRegistryPlugin
from
force_bdss.factory_registry_plugin
import
IFactoryRegistryPlugin
from
force_bdss.tests.probe_classes.probe_extension_plugin
import
\
ProbeExtensionPlugin
from
.mco
import
ProbeMCOFactory
from
.mco
import
ProbeMCOFactory
from
.data_source
import
ProbeDataSourceFactory
from
.data_source
import
ProbeDataSourceFactory
...
@@ -15,17 +17,22 @@ class ProbeFactoryRegistryPlugin(HasStrictTraits):
...
@@ -15,17 +17,22 @@ class ProbeFactoryRegistryPlugin(HasStrictTraits):
notification_listener_factories
=
List
()
notification_listener_factories
=
List
()
ui_hooks_factories
=
List
()
ui_hooks_factories
=
List
()
plugin
=
Any
()
def
_plugin_default
(
self
):
return
ProbeExtensionPlugin
()
def
_mco_factories_default
(
self
):
def
_mco_factories_default
(
self
):
return
[
ProbeMCOFactory
(
None
)]
return
[
ProbeMCOFactory
(
self
.
plugin
)]
def
_data_source_factories_default
(
self
):
def
_data_source_factories_default
(
self
):
return
[
ProbeDataSourceFactory
(
None
)]
return
[
ProbeDataSourceFactory
(
self
.
plugin
)]
def
_notification_listener_factories_default
(
self
):
def
_notification_listener_factories_default
(
self
):
return
[
ProbeNotificationListenerFactory
(
None
)]
return
[
ProbeNotificationListenerFactory
(
self
.
plugin
)]
def
_ui_hooks_factories_default
(
self
):
def
_ui_hooks_factories_default
(
self
):
return
[
ProbeUIHooksFactory
(
None
)]
return
[
ProbeUIHooksFactory
(
self
.
plugin
)]
def
data_source_factory_by_id
(
self
,
id
):
def
data_source_factory_by_id
(
self
,
id
):
for
ds
in
self
.
data_source_factories
:
for
ds
in
self
.
data_source_factories
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment