baldertest 0.1.0b10__py3-none-any.whl → 0.1.0b12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _balder/_version.py +1 -1
- _balder/cnnrelations/__init__.py +7 -0
- _balder/cnnrelations/and_connection_relation.py +149 -0
- _balder/cnnrelations/base_connection_relation.py +270 -0
- _balder/cnnrelations/or_connection_relation.py +65 -0
- _balder/collector.py +10 -16
- _balder/connection.py +400 -881
- _balder/connection_metadata.py +255 -0
- _balder/controllers/device_controller.py +37 -16
- _balder/controllers/feature_controller.py +63 -99
- _balder/controllers/normal_scenario_setup_controller.py +5 -5
- _balder/controllers/scenario_controller.py +6 -6
- _balder/controllers/setup_controller.py +2 -3
- _balder/decorator_connect.py +12 -10
- _balder/decorator_for_vdevice.py +17 -25
- _balder/decorator_gateway.py +3 -3
- _balder/executor/testcase_executor.py +0 -1
- _balder/executor/variation_executor.py +212 -199
- _balder/feature.py +1 -1
- _balder/feature_replacement_mapping.py +69 -0
- _balder/feature_vdevice_mapping.py +88 -0
- _balder/fixture_manager.py +10 -9
- _balder/objects/connections/osi_3_network.py +2 -2
- _balder/objects/connections/osi_4_transport.py +2 -2
- _balder/routing_path.py +27 -31
- _balder/solver.py +1 -1
- _balder/testresult.py +1 -1
- _balder/utils.py +27 -1
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/METADATA +2 -2
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/RECORD +34 -27
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/WHEEL +1 -1
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/LICENSE +0 -0
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/entry_points.txt +0 -0
- {baldertest-0.1.0b10.dist-info → baldertest-0.1.0b12.dist-info}/top_level.txt +0 -0
_balder/feature.py
CHANGED
|
@@ -16,7 +16,7 @@ class Feature:
|
|
|
16
16
|
:param kwargs: contains a dictionary that references all vDevices of the feature and a real
|
|
17
17
|
scenario :meth:`Device` as value
|
|
18
18
|
"""
|
|
19
|
-
from _balder.controllers import FeatureController
|
|
19
|
+
from _balder.controllers import FeatureController # pylint: disable=import-outside-toplevel
|
|
20
20
|
|
|
21
21
|
#: this property contains the active mapping for the devices
|
|
22
22
|
self.active_vdevices: Dict[VDevice, Union[Device, str]] = {}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
import dataclasses
|
|
3
|
+
from .feature import Feature
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FeatureReplacementMapping:
|
|
7
|
+
"""
|
|
8
|
+
helper object that stores mappings between scenario and setup features - is used in :class:`VariationExecutor`
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
@dataclasses.dataclass
|
|
12
|
+
class FeatureMapping:
|
|
13
|
+
"""
|
|
14
|
+
stores a single mapping
|
|
15
|
+
"""
|
|
16
|
+
#: the feature attribute name in scenario device
|
|
17
|
+
attr_name: str
|
|
18
|
+
#: the scenario feature instance or None if the current variation does not use this setup feature in scenario
|
|
19
|
+
scenario_feature: Union[Feature, None]
|
|
20
|
+
#: the setup feature that is used for the scenario feature
|
|
21
|
+
setup_feature: Feature
|
|
22
|
+
|
|
23
|
+
def __init__(self):
|
|
24
|
+
self._mappings: list[FeatureReplacementMapping.FeatureMapping] = []
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def mappings(self) -> list[FeatureMapping]:
|
|
28
|
+
"""
|
|
29
|
+
returns all existing mappings
|
|
30
|
+
"""
|
|
31
|
+
return list(self._mappings)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def attr_names(self) -> list[str]:
|
|
35
|
+
"""
|
|
36
|
+
returns all used attribute names
|
|
37
|
+
"""
|
|
38
|
+
return [mapping.attr_name for mapping in self._mappings]
|
|
39
|
+
|
|
40
|
+
def add(self, attr_name: str, scenario_feature: Union[Feature, None], setup_feature: Feature):
|
|
41
|
+
"""
|
|
42
|
+
adds a new mapping
|
|
43
|
+
|
|
44
|
+
:param attr_name: the feature attribute name in scenario device
|
|
45
|
+
:param scenario_feature: the scenario feature instance or None if the current variation does not use this setup
|
|
46
|
+
feature in scenario
|
|
47
|
+
:param setup_feature: the setup feature that is used for the scenario feature
|
|
48
|
+
"""
|
|
49
|
+
if attr_name in self.attr_names:
|
|
50
|
+
raise KeyError(f'entry for property name `{attr_name}` already exist - can not define it multiple times')
|
|
51
|
+
self._mappings.append(FeatureReplacementMapping.FeatureMapping(attr_name, scenario_feature, setup_feature))
|
|
52
|
+
|
|
53
|
+
def get_features_for_attr_name(self, attr_name: str) -> tuple[Feature, Feature]:
|
|
54
|
+
"""
|
|
55
|
+
returns the scenario and its mapped setup feature for a specific attribute name used in the scenario device
|
|
56
|
+
"""
|
|
57
|
+
for mapping in self._mappings:
|
|
58
|
+
if mapping.attr_name == attr_name:
|
|
59
|
+
return mapping.scenario_feature, mapping.setup_feature
|
|
60
|
+
raise KeyError(f'entry for property name `{attr_name}` does not exist')
|
|
61
|
+
|
|
62
|
+
def get_replaced_scenario_feature_for(self, setup_feature: Feature) -> Union[Feature, None]:
|
|
63
|
+
"""
|
|
64
|
+
returns the mapped scenario feature for a given setup feature
|
|
65
|
+
"""
|
|
66
|
+
for mapping in self._mappings:
|
|
67
|
+
if mapping.setup_feature == setup_feature:
|
|
68
|
+
return mapping.scenario_feature
|
|
69
|
+
raise KeyError(f'cannot find setup feature for {setup_feature}')
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Type
|
|
3
|
+
import dataclasses
|
|
4
|
+
|
|
5
|
+
from .controllers.feature_controller import FeatureController
|
|
6
|
+
from .device import Device
|
|
7
|
+
from .feature import Feature
|
|
8
|
+
from .vdevice import VDevice
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FeatureVDeviceMapping:
|
|
12
|
+
"""
|
|
13
|
+
helper object that stores mappings between :class:`VDevice` and :class:`Device`
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
@dataclasses.dataclass
|
|
17
|
+
class VDeviceDeviceMapping:
|
|
18
|
+
"""describes the mapping of one VDevice to one Device"""
|
|
19
|
+
#: the vdevice class
|
|
20
|
+
vdevice: Type[VDevice]
|
|
21
|
+
#: the mapped device to this VDevice
|
|
22
|
+
device: Type[Device]
|
|
23
|
+
|
|
24
|
+
@dataclasses.dataclass
|
|
25
|
+
class VDevicesMapping:
|
|
26
|
+
"""
|
|
27
|
+
stores a single mapping
|
|
28
|
+
"""
|
|
29
|
+
#: the feature object, this mapping belongs to
|
|
30
|
+
feature: Feature
|
|
31
|
+
#: the available mapping for this feature (at the moment, we only support one)
|
|
32
|
+
mappings: list[FeatureVDeviceMapping.VDeviceDeviceMapping]
|
|
33
|
+
|
|
34
|
+
def __init__(self):
|
|
35
|
+
self._mappings: list[FeatureVDeviceMapping.VDevicesMapping] = []
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def mappings(self) -> list[VDevicesMapping]:
|
|
39
|
+
"""
|
|
40
|
+
returns all existing mappings
|
|
41
|
+
"""
|
|
42
|
+
return list(self._mappings)
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def features(self) -> list[Feature]:
|
|
46
|
+
"""
|
|
47
|
+
returns all used attribute names
|
|
48
|
+
"""
|
|
49
|
+
return [mapping.feature for mapping in self._mappings]
|
|
50
|
+
|
|
51
|
+
def items(self) -> list[tuple[Feature, list[VDeviceDeviceMapping]]]:
|
|
52
|
+
"""
|
|
53
|
+
:return: a list of Feature/vdevice mapping tuples
|
|
54
|
+
"""
|
|
55
|
+
return [(mapping.feature, mapping.mappings) for mapping in self._mappings]
|
|
56
|
+
|
|
57
|
+
def add(self, feature: Feature, mappings: dict[Type[VDevice], Type[Device]]):
|
|
58
|
+
"""
|
|
59
|
+
adds a new mapping
|
|
60
|
+
|
|
61
|
+
:param feature: the :class:`Feature` class this mapping belongs to
|
|
62
|
+
:param mappings: a dictionary that describes the mapping between the :class:`VDevice` and :class:`Device`. The
|
|
63
|
+
:class:`VDevice` needs to be part of the :class:`Feature`
|
|
64
|
+
"""
|
|
65
|
+
if feature in self.features:
|
|
66
|
+
raise KeyError(f'entry for feature `{feature}` already exist - can not define it multiple times')
|
|
67
|
+
feature_controller = FeatureController.get_for(feature.__class__)
|
|
68
|
+
vdevice_device_mappings = []
|
|
69
|
+
for cur_vdev, cur_dev in mappings.items():
|
|
70
|
+
if not (isinstance(cur_vdev, type) and issubclass(cur_vdev, VDevice)):
|
|
71
|
+
raise TypeError(f'the provided key objects in mappings needs to be a subclass of `{VDevice.__name__}`')
|
|
72
|
+
if not (isinstance(cur_dev, type) and issubclass(cur_dev, Device)):
|
|
73
|
+
raise TypeError(f'the provided value objects in mappings needs to be a subclass of `{Device.__name__}`')
|
|
74
|
+
if cur_vdev not in feature_controller.get_abs_inner_vdevice_classes():
|
|
75
|
+
raise ValueError(f'the provided VDevice `{cur_vdev}` is not part of the provided feature `{feature}`')
|
|
76
|
+
vdevice_device_mappings.append(self.VDeviceDeviceMapping(cur_vdev, cur_dev))
|
|
77
|
+
new_mapping = self.VDevicesMapping(feature=feature, mappings=vdevice_device_mappings)
|
|
78
|
+
|
|
79
|
+
self._mappings.append(new_mapping)
|
|
80
|
+
|
|
81
|
+
def get_mappings_for_feature(self, feature: Feature) -> list[VDeviceDeviceMapping]:
|
|
82
|
+
"""
|
|
83
|
+
returns the list with all mappings for the provided feature
|
|
84
|
+
"""
|
|
85
|
+
for cur_item in self._mappings:
|
|
86
|
+
if cur_item.feature == feature:
|
|
87
|
+
return cur_item.mappings
|
|
88
|
+
raise KeyError(f'entry for feature `{feature}` does not exist')
|
_balder/fixture_manager.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import itertools
|
|
2
4
|
from typing import List, Tuple, Generator, Dict, Union, Type, Callable, Iterable, TYPE_CHECKING
|
|
3
5
|
|
|
4
6
|
import inspect
|
|
@@ -374,15 +376,14 @@ class FixtureManager:
|
|
|
374
376
|
if cur_arg in ignore_attributes:
|
|
375
377
|
continue
|
|
376
378
|
# go to the most specific fixture, because more specific ones overwrite the more global ones
|
|
377
|
-
for cur_possible_namespace in all_possible_namespaces:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
result_dict[cur_arg] = cur_fixture_metadata.retval
|
|
379
|
+
for cur_possible_namespace, cur_level in itertools.product(all_possible_namespaces, FixtureExecutionLevel):
|
|
380
|
+
if cur_level not in self.current_tree_fixtures.keys():
|
|
381
|
+
continue
|
|
382
|
+
# filter only these fixtures that have the same namespace
|
|
383
|
+
for cur_fixture_metadata in self.current_tree_fixtures[cur_level]:
|
|
384
|
+
if (cur_fixture_metadata.namespace == cur_possible_namespace
|
|
385
|
+
and cur_fixture_metadata.callable.__name__ == cur_arg):
|
|
386
|
+
result_dict[cur_arg] = cur_fixture_metadata.retval
|
|
386
387
|
if cur_arg not in result_dict.keys():
|
|
387
388
|
raise FixtureReferenceError(
|
|
388
389
|
f"the argument `{cur_arg}` in fixture `{callable_func.__qualname__}` could not be resolved")
|
|
@@ -20,7 +20,7 @@ class IPv6Connection(Connection):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
IPConnection = Connection.based_on(IPv4Connection
|
|
23
|
+
IPConnection = Connection.based_on(IPv4Connection | IPv6Connection)
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
@insert_into_tree(parents=[IPv4Connection, IPv6Connection])
|
|
@@ -44,4 +44,4 @@ class ICMPv6Connection(Connection):
|
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
ICMPConnection = Connection.based_on(ICMPv4Connection
|
|
47
|
+
ICMPConnection = Connection.based_on(ICMPv4Connection | ICMPv6Connection)
|
|
@@ -20,7 +20,7 @@ class TcpIPv6Connection(Connection):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
TcpConnection = Connection.based_on(TcpIPv4Connection
|
|
23
|
+
TcpConnection = Connection.based_on(TcpIPv4Connection | TcpIPv6Connection)
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
@insert_into_tree(parents=[osi_3_network.IPv4Connection])
|
|
@@ -37,4 +37,4 @@ class UdpIPv6Connection(Connection):
|
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
UdpConnection = Connection.based_on(UdpIPv4Connection
|
|
40
|
+
UdpConnection = Connection.based_on(UdpIPv4Connection | UdpIPv6Connection)
|
_balder/routing_path.py
CHANGED
|
@@ -79,17 +79,13 @@ class RoutingPath:
|
|
|
79
79
|
if alternative_setup_device_cnns is None:
|
|
80
80
|
setup_devices_cnns = []
|
|
81
81
|
for cur_setup_device in device_mapping.values():
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
from_scenario_device = scenario_connection.from_device
|
|
90
|
-
to_scenario_device = scenario_connection.to_device
|
|
91
|
-
from_setup_device = device_mapping[from_scenario_device]
|
|
92
|
-
to_setup_device = device_mapping[to_scenario_device]
|
|
82
|
+
for cur_cnn_list in DeviceController.get_for(cur_setup_device).get_all_absolute_connections().values():
|
|
83
|
+
setup_devices_cnns.extend(cur_cnn_list)
|
|
84
|
+
# remove duplicates
|
|
85
|
+
setup_devices_cnns = list(set(setup_devices_cnns))
|
|
86
|
+
|
|
87
|
+
from_setup_device = device_mapping[scenario_connection.from_device]
|
|
88
|
+
to_setup_device = device_mapping[scenario_connection.to_device]
|
|
93
89
|
|
|
94
90
|
# contains a list with all routes that start and end correctly
|
|
95
91
|
all_completed_routes = []
|
|
@@ -100,27 +96,28 @@ class RoutingPath:
|
|
|
100
96
|
for cur_from_setup_node_conn in setup_devices_cnns:
|
|
101
97
|
# only if there is a connection outgoing from `from_setup_device`
|
|
102
98
|
if cur_from_setup_node_conn.has_connection_from_to(start_device=from_setup_device):
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
all_possible_routes.append(
|
|
100
|
+
RoutingPath(
|
|
101
|
+
cur_from_setup_node_conn,
|
|
102
|
+
start_device=from_setup_device,
|
|
103
|
+
start_node_name=(cur_from_setup_node_conn.from_node_name
|
|
104
|
+
if cur_from_setup_node_conn.from_device == from_setup_device
|
|
105
|
+
else cur_from_setup_node_conn.to_node_name)
|
|
106
|
+
)
|
|
107
|
+
)
|
|
109
108
|
# now go through every possibility and add them - filter all Routes that ``has_loop() == True`` or
|
|
110
109
|
# are completed
|
|
111
110
|
while len(all_possible_routes) > 0:
|
|
112
111
|
|
|
113
112
|
# remove all routings that have a loop
|
|
114
|
-
for
|
|
115
|
-
if cur_routing.has_loop():
|
|
116
|
-
all_possible_routes.remove(cur_routing)
|
|
113
|
+
all_possible_routes = [route for route in all_possible_routes.copy() if not route.has_loop()]
|
|
117
114
|
|
|
118
|
-
# remove all
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
# remove all not working routing because they have the wrong connection type, by checking that one part
|
|
116
|
+
# connection matches the requirements of the given `scenario_connection`
|
|
117
|
+
all_possible_routes = [
|
|
118
|
+
r for r in all_possible_routes
|
|
119
|
+
if scenario_connection.contained_in(r.get_virtual_connection(), ignore_metadata=True)
|
|
120
|
+
]
|
|
124
121
|
|
|
125
122
|
# move all completely routed connections to `all_completed_routes`
|
|
126
123
|
for cur_routing in all_possible_routes.copy():
|
|
@@ -167,7 +164,7 @@ class RoutingPath:
|
|
|
167
164
|
# ---------------------------------- PROPERTIES --------------------------------------------------------------------
|
|
168
165
|
|
|
169
166
|
@property
|
|
170
|
-
def elements(self) -> List[Connection, NodeGateway]:
|
|
167
|
+
def elements(self) -> List[Union[Connection, NodeGateway]]:
|
|
171
168
|
"""returns all elements that belongs to this routing path"""
|
|
172
169
|
return self._routing_elems
|
|
173
170
|
|
|
@@ -269,7 +266,7 @@ class RoutingPath:
|
|
|
269
266
|
"""
|
|
270
267
|
copied_elem = copy.copy(self)
|
|
271
268
|
# also copy list reference
|
|
272
|
-
copied_elem._routing_elems = self._routing_elems.copy()
|
|
269
|
+
copied_elem._routing_elems = self._routing_elems.copy() # pylint: disable=protected-access
|
|
273
270
|
return copied_elem
|
|
274
271
|
|
|
275
272
|
def append_element(self, elem: Union[Connection, NodeGateway]) -> None:
|
|
@@ -324,8 +321,7 @@ class RoutingPath:
|
|
|
324
321
|
# todo
|
|
325
322
|
pass
|
|
326
323
|
# set metadata based on this routing
|
|
327
|
-
virtual_connection.
|
|
328
|
-
virtual_connection.
|
|
329
|
-
to_device_node_name=self.end_node_name)
|
|
324
|
+
virtual_connection.metadata.set_from(from_device=self.start_device, from_device_node_name=self.start_node_name)
|
|
325
|
+
virtual_connection.metadata.set_to(to_device=self.end_device, to_device_node_name=self.end_node_name)
|
|
330
326
|
|
|
331
327
|
return virtual_connection
|
_balder/solver.py
CHANGED
|
@@ -117,7 +117,7 @@ class Solver:
|
|
|
117
117
|
|
|
118
118
|
# ---------------------------------- METHODS -----------------------------------------------------------------------
|
|
119
119
|
|
|
120
|
-
def get_initial_mapping(self) -> List[Tuple[Type[Setup], Type[Scenario], Dict[Device, Device]]]:
|
|
120
|
+
def get_initial_mapping(self) -> List[Tuple[Type[Setup], Type[Scenario], Dict[Type[Device], Type[Device]]]]:
|
|
121
121
|
"""
|
|
122
122
|
This method creates the initial amount of data for `self._mapping`. Only those elements are returned where the
|
|
123
123
|
:meth:`Setup` class has more or the same amount of :meth:`Device`'s than the :meth:`Scenario` class.
|
_balder/testresult.py
CHANGED
|
@@ -95,7 +95,7 @@ class BranchBodyResult(_Result):
|
|
|
95
95
|
"""
|
|
96
96
|
|
|
97
97
|
def __init__(self, executor: BasicExecutor):
|
|
98
|
-
from _balder.executor.testcase_executor import TestcaseExecutor
|
|
98
|
+
from _balder.executor.testcase_executor import TestcaseExecutor # pylint: disable=import-outside-toplevel
|
|
99
99
|
|
|
100
100
|
if isinstance(executor, TestcaseExecutor):
|
|
101
101
|
raise TypeError("testcase executors are not allowed to use in `BranchBodyResult`")
|
_balder/utils.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
from typing import List, Type, Tuple, Union, Literal
|
|
2
|
+
from typing import List, Type, Tuple, Union, Literal, TYPE_CHECKING
|
|
3
3
|
|
|
4
4
|
import sys
|
|
5
5
|
import inspect
|
|
@@ -8,6 +8,10 @@ from _balder.exceptions import InheritanceError
|
|
|
8
8
|
|
|
9
9
|
MethodLiteralType = Literal["function", "classmethod", "staticmethod", "instancemethod"]
|
|
10
10
|
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from _balder.connection import Connection
|
|
13
|
+
from _balder.cnnrelations.base_connection_relation import BaseConnectionRelationT
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
def get_scenario_inheritance_list_of(scenario: Type[Scenario]) -> List[Type[Scenario]]:
|
|
13
17
|
"""
|
|
@@ -45,6 +49,28 @@ def get_class_that_defines_method(meth):
|
|
|
45
49
|
return None # not required since None would have been implicitly returned anyway
|
|
46
50
|
|
|
47
51
|
|
|
52
|
+
def cnn_type_check_and_convert(elem: Union[Connection, Type[Connection], BaseConnectionRelationT]) \
|
|
53
|
+
-> Union[Connection, BaseConnectionRelationT]:
|
|
54
|
+
"""
|
|
55
|
+
converts possible type object to instance and checks if the element is a connection type
|
|
56
|
+
|
|
57
|
+
:param elem: the connection object to be converted/checked
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
from .connection import Connection # pylint: disable=import-outside-toplevel
|
|
61
|
+
from .cnnrelations.and_connection_relation import AndConnectionRelation # pylint: disable=import-outside-toplevel
|
|
62
|
+
from .cnnrelations.or_connection_relation import OrConnectionRelation # pylint: disable=import-outside-toplevel
|
|
63
|
+
|
|
64
|
+
if isinstance(elem, type):
|
|
65
|
+
if issubclass(elem, Connection):
|
|
66
|
+
return elem()
|
|
67
|
+
elif isinstance(elem, (Connection, AndConnectionRelation, OrConnectionRelation)):
|
|
68
|
+
# okay
|
|
69
|
+
return elem
|
|
70
|
+
raise TypeError(f'object needs to be a `Connection`, a connection relation or a `Type[Connection]` - no '
|
|
71
|
+
f'`{elem}`')
|
|
72
|
+
|
|
73
|
+
|
|
48
74
|
def inspect_method(func) -> Tuple[Union[type, None], MethodLiteralType]:
|
|
49
75
|
"""
|
|
50
76
|
This helper function returns the related class and the type of the method (`staticmethod`, `classmethod`,
|
|
@@ -1,48 +1,55 @@
|
|
|
1
1
|
_balder/__init__.py,sha256=Qk4wkVInPlXLFV36Yco5K7PDawJoeeWQVakzj6g5pmA,195
|
|
2
|
-
_balder/_version.py,sha256=
|
|
2
|
+
_balder/_version.py,sha256=S15DTS8dk0LprNo0fc6N8N7MUlyHFciSG3FMI5y2iZE,414
|
|
3
3
|
_balder/balder_plugin.py,sha256=EQzJP1dwwVDydhMLJtAmTCXOczlDuXBJur05lalmK_k,3136
|
|
4
4
|
_balder/balder_session.py,sha256=ezT86gC_VzPQZOQ4r5qQ75IEm6rXZHiIpEqZDczkRsE,16149
|
|
5
5
|
_balder/balder_settings.py,sha256=U96PVep7dGSaTXrMfeZMYf6oCIcEDPEqrBlFcoX476s,582
|
|
6
|
-
_balder/collector.py,sha256=
|
|
7
|
-
_balder/connection.py,sha256=
|
|
8
|
-
_balder/
|
|
6
|
+
_balder/collector.py,sha256=uymS7CwymrZNxzKDG9_kPOK7HGKtnX3FNwX7Dk2LuC0,47567
|
|
7
|
+
_balder/connection.py,sha256=j6wI7m3h23q9aCApRDmLyeerxUXQ0j267v4FgjP4p6E,41770
|
|
8
|
+
_balder/connection_metadata.py,sha256=FrTj6NNBBUl6QuFx8DWy6HRueufXB93WTBkdc41uFaE,13632
|
|
9
|
+
_balder/decorator_connect.py,sha256=67CojFZH9dZ_qwnvb6rkqxe3adtQlgHVi_0etmP5Hyw,5881
|
|
9
10
|
_balder/decorator_covered_by.py,sha256=Y6WMUuyn_uvFkjGfbts8OE5Bsir_7LTRB-jxYGaYk4Y,4069
|
|
10
11
|
_balder/decorator_fixture.py,sha256=vVd3pXVWEaaVP2rxgW4nKoskmDByafHuSFHC0v_LMoI,1045
|
|
11
|
-
_balder/decorator_for_vdevice.py,sha256=
|
|
12
|
-
_balder/decorator_gateway.py,sha256=
|
|
12
|
+
_balder/decorator_for_vdevice.py,sha256=adEzLc0otuvCpj2TntuJWMQX_mq2oLtYRXFFbIhQVYo,5917
|
|
13
|
+
_balder/decorator_gateway.py,sha256=Qa8Cjm50I1OSHhADU8LmeSQh2QSuH9qGRuedWAlLfu4,1381
|
|
13
14
|
_balder/decorator_insert_into_tree.py,sha256=l3nkaTzKzt3TIFYLJoehYwT3xxRRNz83fq8JhvR6DfQ,2069
|
|
14
15
|
_balder/decorator_parametrize.py,sha256=lHxADbHZVnWOhvQTUQgaYU1hQ8NF3ghMU57Z3r_oWVE,912
|
|
15
16
|
_balder/decorator_parametrize_by_feature.py,sha256=r0iySfWcFxXIVu0BNWIRU_E6_o2-lSzpL5aUifoqiyU,1381
|
|
16
17
|
_balder/device.py,sha256=5O3tqj_iLKfHb5Zi_viJ76VH82cMOzX58OzRrMRRv0k,833
|
|
17
18
|
_balder/exceptions.py,sha256=_zQFUK4kYKaVGUtH9IcH0q-GOyBb9qzqSU6BOsUnG7Y,4375
|
|
18
19
|
_balder/exit_code.py,sha256=P0oFWKfjMo36Frv13ADRcm8eSPN3kE-WmZBE9qZJHdA,513
|
|
19
|
-
_balder/feature.py,sha256=
|
|
20
|
+
_balder/feature.py,sha256=Da6BP4H1X0eKm0DyQKRdSnrQeqV8QeCFE4JybI_wYSc,3888
|
|
21
|
+
_balder/feature_replacement_mapping.py,sha256=fCUnWY3pSJqPrdN_kA4jzkfzx7UYSkBDm6NbC2A522c,2766
|
|
22
|
+
_balder/feature_vdevice_mapping.py,sha256=aAQ8R48orYiOr_9_L8nZCz3jq5-qlq9gfY7DeTzmUyM,3576
|
|
20
23
|
_balder/fixture_definition_scope.py,sha256=0MP0U2fcM9iS28Ytkfuu3TzZ4cUNG5u81GBWGBm9ucw,709
|
|
21
24
|
_balder/fixture_execution_level.py,sha256=-y7-4bihTSMzhYvM2O1Qc40ovyvW7SP25rHvWHZpD6g,655
|
|
22
|
-
_balder/fixture_manager.py,sha256=
|
|
25
|
+
_balder/fixture_manager.py,sha256=RjAQjpvBBGy-loCVCHlkArvyr35rr4shNWUpeY-0QP4,29227
|
|
23
26
|
_balder/fixture_metadata.py,sha256=4vls8-I0bsRxLDNbD5Du4Cm2ZPYwxqfuSeEY6D654jE,872
|
|
24
27
|
_balder/node_gateway.py,sha256=64mv7Nx82JVknnQ09UXC-AcdDl6i_OB6NOsq_uBxeYo,4710
|
|
25
28
|
_balder/parametrization.py,sha256=SnaGeGpf7-5H-y107CBDx5V-onX-oiLS1KU1IquZwcU,2678
|
|
26
29
|
_balder/plugin_manager.py,sha256=Ev2jnx4NtFHDsZ3C6h0HrJtQisqLO-V34JRM3wzTnFM,6921
|
|
27
30
|
_balder/previous_executor_mark.py,sha256=gwpGu7d-kwPzQT8CmaPfuEG6fess2Upf5Q-zX6Oi6NY,835
|
|
28
|
-
_balder/routing_path.py,sha256=
|
|
31
|
+
_balder/routing_path.py,sha256=pyPaLD_-SyX3PZDWI6BUHHrIIPg3k5swfxFI6ncf2iA,16803
|
|
29
32
|
_balder/scenario.py,sha256=ATowBUl2HYQBmJHZ-eBpliqjPsWPnZAme9kwIeX3Tak,840
|
|
30
33
|
_balder/setup.py,sha256=zSgtzNIWTVBjiZ5mn-qfpqIAnP3Im73t3Lqoaw0gWEI,763
|
|
31
|
-
_balder/solver.py,sha256=
|
|
32
|
-
_balder/testresult.py,sha256=
|
|
34
|
+
_balder/solver.py,sha256=NbpAdvrGWdJTY6eZmNZFr7YDubyggY0yW64rDB3JkT0,13121
|
|
35
|
+
_balder/testresult.py,sha256=Tm5m0Rnpn3JgdQp22izsMIPoVxRU0ngJjUuS73eRboM,6826
|
|
33
36
|
_balder/unmapped_vdevice.py,sha256=oKr01YVTLViWtZkYz8kx8ccTx-KmwgNrHuQqqD4eLQw,513
|
|
34
|
-
_balder/utils.py,sha256=
|
|
37
|
+
_balder/utils.py,sha256=7bfjap7KKpFaRFusCimMpk-UYR4X1LR-pdA_q7DN28E,4271
|
|
35
38
|
_balder/vdevice.py,sha256=fc2xuMnTuN1RyfWh9mqFgLdSO9yGA75eERobTXUQ9JA,215
|
|
39
|
+
_balder/cnnrelations/__init__.py,sha256=LDnjVlJmclxmfKs3snKsK2RDMg8N7Xc6OeDVioxHR58,187
|
|
40
|
+
_balder/cnnrelations/and_connection_relation.py,sha256=mrio_jyMuJ2VmJtiFAKQ8BMqjHYiKIpWmuc4KpgcIMM,8048
|
|
41
|
+
_balder/cnnrelations/base_connection_relation.py,sha256=s9DufjB9EHkqVUHhjDurMGiPxtTte-yvwCQ2nFAHZeY,11402
|
|
42
|
+
_balder/cnnrelations/or_connection_relation.py,sha256=hPqC86qXRRgaOA6SeIzGnqxY6zd9OJ1KU5jwKbERo7s,2730
|
|
36
43
|
_balder/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
44
|
_balder/console/balder.py,sha256=rF1qgW6h35hKqGijGbZgGD2_y0Sd9Mbs_EXF2v_EUCk,2581
|
|
38
45
|
_balder/controllers/__init__.py,sha256=UNb6QzMj4TqPI15OSvXyUJlA-NSai0CKkQhV5JIsba0,570
|
|
39
46
|
_balder/controllers/base_device_controller.py,sha256=g-vY2SqKFUC9yGOvHLfbdmILT3sK2YyaWKSfvTRcC0o,3174
|
|
40
47
|
_balder/controllers/controller.py,sha256=XGRE5LKWxxftEf-bZODvKxXwULu09iG131wMwRoz4Fk,803
|
|
41
|
-
_balder/controllers/device_controller.py,sha256=
|
|
42
|
-
_balder/controllers/feature_controller.py,sha256=
|
|
43
|
-
_balder/controllers/normal_scenario_setup_controller.py,sha256=
|
|
44
|
-
_balder/controllers/scenario_controller.py,sha256=
|
|
45
|
-
_balder/controllers/setup_controller.py,sha256=
|
|
48
|
+
_balder/controllers/device_controller.py,sha256=_Leg_qYnuAQGVmqO77oJOm77EXSYRi7I1e38ZevgcEw,24343
|
|
49
|
+
_balder/controllers/feature_controller.py,sha256=ve7t9zwhkPP-L_LZbKghdD6An2LO2TYWErAfN9dfRdQ,41405
|
|
50
|
+
_balder/controllers/normal_scenario_setup_controller.py,sha256=w7VBxnrFu7_NBeTRD-XZBRflBjA8MPD_aL0DTh7w_pU,21924
|
|
51
|
+
_balder/controllers/scenario_controller.py,sha256=sfCpR4NfWgEIksVV3dP8gko95vu_6FBMseU5Pb_CBZk,22354
|
|
52
|
+
_balder/controllers/setup_controller.py,sha256=1jX_K_7iHQ2jWBZv-urC0_9lCi4RjrwxvtW7oWMVb7s,7082
|
|
46
53
|
_balder/controllers/vdevice_controller.py,sha256=6-PidCKgvUteZVJsbGkKX69f3cYYYnolONl5Gja16W8,5777
|
|
47
54
|
_balder/executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
55
|
_balder/executor/basic_executable_executor.py,sha256=Mta7a9stCiKPMQ6Hafe4jhlhLSeP6Bk7EWIPXUzrwNE,5135
|
|
@@ -51,15 +58,15 @@ _balder/executor/executor_tree.py,sha256=I3zy5qOrQWoT3_3YnGDvGvfJE829J0X9xT7WtSr
|
|
|
51
58
|
_balder/executor/parametrized_testcase_executor.py,sha256=uR_CwdIRxiL1vqJP2P2htc0JPPevMGarIQs7cqHNzmU,2106
|
|
52
59
|
_balder/executor/scenario_executor.py,sha256=3-CkamjyIatDxS3INcYGTXDOtGR-bokcMLaMxC10Ytg,11344
|
|
53
60
|
_balder/executor/setup_executor.py,sha256=Icn-b3MHLMCGGOIGAPB01KWC6LkkZ-ikD_0XqcQjK0Y,8570
|
|
54
|
-
_balder/executor/testcase_executor.py,sha256=
|
|
61
|
+
_balder/executor/testcase_executor.py,sha256=xSOjDexvcUET6vfwn1ogOs1Xi-9yeCt2AsnivXZkTao,7702
|
|
55
62
|
_balder/executor/unresolved_parametrized_testcase_executor.py,sha256=nwScqqiJD7Clkk3YcrPqXJnGEWjvunAlUYAwYvpUI2s,9075
|
|
56
|
-
_balder/executor/variation_executor.py,sha256=
|
|
63
|
+
_balder/executor/variation_executor.py,sha256=PBkhNvucf7oPIrDiFSbcy8f7g-KfLOKMLSfTWAuCDVk,53093
|
|
57
64
|
_balder/objects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
65
|
_balder/objects/connections/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
66
|
_balder/objects/connections/osi_1_physical.py,sha256=74lKWJd6ETEtvNXH0_dmTbkZlStJ_af218pQkUht0aA,2189
|
|
60
67
|
_balder/objects/connections/osi_2_datalink.py,sha256=0k1imyx6x_YeSvtf5CG27rcLeDzpmz76DUbjWyIGJqg,875
|
|
61
|
-
_balder/objects/connections/osi_3_network.py,sha256=
|
|
62
|
-
_balder/objects/connections/osi_4_transport.py,sha256=
|
|
68
|
+
_balder/objects/connections/osi_3_network.py,sha256=7s4gEYxR38LE3yUTPoDaYT6kJiWBQdcU9OBFO29E2j0,1175
|
|
69
|
+
_balder/objects/connections/osi_4_transport.py,sha256=9INPME_TWiZQ9rXUzIV__yOPsLQXcdf-7F336WijFOo,983
|
|
63
70
|
_balder/objects/connections/osi_5_session.py,sha256=cMSIBMGk80VSgmFdqWaYI3HQLOvJHi4uTaqDMqWaU5Q,390
|
|
64
71
|
_balder/objects/connections/osi_6_presentation.py,sha256=zCQXocR14CC8rFONFHUethvsoHh4b92e0CC3nLDqNZs,394
|
|
65
72
|
_balder/objects/connections/osi_7_application.py,sha256=VPTlKKCEd9FFusce2wVbScIBPzpikPQtpSPE7PHxMUI,2304
|
|
@@ -70,9 +77,9 @@ balder/connections.py,sha256=H6rf7UsiVY_FeZLngZXCT9WDw9cQqpiDiPbz_0J4yjM,2331
|
|
|
70
77
|
balder/devices.py,sha256=zupHtz8yaiEjzR8CrvgZU-RzsDQcZFeN5mObfhtjwSw,173
|
|
71
78
|
balder/exceptions.py,sha256=iaR4P2L7K3LggYSDnjCGLheZEaGgnMilxDQdoYD5KHQ,1954
|
|
72
79
|
balder/parametrization.py,sha256=R8U67f6DEnXdDc9cGOgS8yFTEAfhglv1v9mnAUAExUg,150
|
|
73
|
-
baldertest-0.1.
|
|
74
|
-
baldertest-0.1.
|
|
75
|
-
baldertest-0.1.
|
|
76
|
-
baldertest-0.1.
|
|
77
|
-
baldertest-0.1.
|
|
78
|
-
baldertest-0.1.
|
|
80
|
+
baldertest-0.1.0b12.dist-info/LICENSE,sha256=Daz9qTpqbiq-klWb2Q9lYOmn3rJ5oIQnbs62sGcqOZ4,1084
|
|
81
|
+
baldertest-0.1.0b12.dist-info/METADATA,sha256=UmZEcpV1c0RcuZGHol2Q08Z5OPKkcYop47aM2iPjBoU,15784
|
|
82
|
+
baldertest-0.1.0b12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
83
|
+
baldertest-0.1.0b12.dist-info/entry_points.txt,sha256=hzqu_nrMKTCi5IJqzS1fhIXWEiL7mTGZ-kgj2lUYlRU,65
|
|
84
|
+
baldertest-0.1.0b12.dist-info/top_level.txt,sha256=RUkIBkNLqHMemx2C9aEpoS65dpqb6_jU-oagIPxGQEA,15
|
|
85
|
+
baldertest-0.1.0b12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|