-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
import pytest | ||
import os | ||
import sys | ||
import os | ||
|
||
sys.path.extend( | ||
[ | ||
os.path.join(os.path.dirname(__file__), ".."), | ||
os.path.join(os.path.dirname(__file__), "../generated"), | ||
] | ||
) | ||
for directory_piece in ["..", "generated", "tests"]: | ||
sys.path.append(os.path.join(os.path.dirname(__file__), directory_piece)) | ||
|
||
from infra_pb2 import Device | ||
import pytest | ||
from keysight_chakra.generated.infra_pb2 import Device, Component, Link, LinkType, Bandwidth, Npu, Nic | ||
from service import Service | ||
|
||
|
||
@pytest.fixture | ||
def service() -> Service: | ||
return Service() | ||
|
||
|
||
@pytest.fixture | ||
def device(): | ||
host = Device(name="host") | ||
return host | ||
def host() -> Device: | ||
device = Device( | ||
name="aic-sb203-lx", | ||
components={ | ||
"tesla-t4": Component(name="tesla-t4", count=1, npu=Npu()), | ||
"cx6": Component(name="cx6", count=1, nic=Nic()), | ||
}, | ||
links={"pcie-3": Link(name="pcie-3", type=LinkType.LINK_PCIE, bandwidth=Bandwidth(gbps=32))}, | ||
connections=["tesla-t4.0.pcie-3.cx6.0"], | ||
) | ||
return device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters