simbricks-i40e-sim-bm-py 0.5.0__tar.gz

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.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: simbricks-i40e-sim-bm-py
3
+ Version: 0.5.0
4
+ Summary: Intel I40E NIC behavioral model integration into SimBricks
5
+ Author: Team SimBricks
6
+ Author-email: team@simbricks.io
7
+ Classifier: Programming Language :: Python :: 2
8
+ Classifier: Programming Language :: Python :: 2.7
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.4
11
+ Classifier: Programming Language :: Python :: 3.5
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Dist: simbricks-orchestration (>=0.5.0)
22
+ Requires-Dist: simbricks-utils (>=0.5.0)
23
+ Project-URL: Homepage, https://www.simbricks.io/
@@ -0,0 +1,44 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ [tool.black]
24
+ line-length = 100
25
+
26
+ [build-system]
27
+ requires = ["poetry-core>=1.0.0"]
28
+ build-backend = "poetry.core.masonry.api"
29
+
30
+ [tool.poetry]
31
+ name = "simbricks-i40e-sim-bm-py"
32
+ version = "0.5.0"
33
+ description = "Intel I40E NIC behavioral model integration into SimBricks"
34
+ authors = [
35
+ "Team SimBricks <team@simbricks.io>"
36
+ ]
37
+ homepage = "https://www.simbricks.io/"
38
+ packages = [
39
+ { include = "simbricks" }
40
+ ]
41
+
42
+ [tool.poetry.dependencies]
43
+ simbricks-orchestration = ">=0.5.0"
44
+ simbricks-utils = ">=0.5.0"
@@ -0,0 +1,25 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ from .i40e import I40eNicSim
24
+
25
+ __all__ = ["I40eNicSim"]
@@ -0,0 +1,62 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ from __future__ import annotations
24
+
25
+ import typing_extensions as tpe
26
+
27
+ from simbricks.components.i40e.system import i40e as i40e_sys
28
+ from simbricks.orchestration.instantiation import base as inst_base
29
+ from simbricks.orchestration.simulation import base as sim_base
30
+ from simbricks.orchestration.simulation import pcidev
31
+ from simbricks.utils import base as utils_base
32
+
33
+
34
+ class I40eNicSim(pcidev.NICSim):
35
+
36
+ def __init__(self, simulation: sim_base.Simulation):
37
+ super().__init__(
38
+ simulation=simulation,
39
+ executable="simb_i40e_bm",
40
+ )
41
+ self.name = f"NICSim-{self._id}"
42
+
43
+ def toJSON(self) -> dict:
44
+ json_obj = super().toJSON()
45
+ return json_obj
46
+
47
+ @classmethod
48
+ def fromJSON(cls, simulation: sim_base.Simulation, json_obj: dict) -> tpe.Self:
49
+ instance = super().fromJSON(simulation, json_obj)
50
+ return instance
51
+
52
+ def add(self, nic: i40e_sys.IntelI40eNIC):
53
+ utils_base.has_expected_type(nic, i40e_sys.IntelI40eNIC)
54
+ super().add(nic)
55
+
56
+ def run_cmd(self, inst: inst_base.Instantiation) -> str:
57
+ cmd = super().run_cmd(inst)
58
+ if self.mac:
59
+ cmd += " " + ("".join(reversed(self.mac.split(":"))))
60
+ if self.log_file:
61
+ cmd += f" {self.log_file}"
62
+ return cmd