-
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
17 changed files
with
160 additions
and
65 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class IHost(ABC): | ||
def __init__(self): | ||
pass | ||
|
||
@abstractmethod | ||
def cmd(self, input: str) -> str: | ||
"""Execute a command on the host. | ||
""" |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import logging | ||
from abc import ABC, abstractmethod | ||
from containernet.topology import (ITopology) | ||
from test_suites.test import ITestSuite | ||
|
||
|
||
class INetwork(ABC): | ||
def __init__(self): | ||
self.test_suites = [] | ||
|
||
@abstractmethod | ||
def start(self): | ||
pass | ||
|
||
@abstractmethod | ||
def stop(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_hosts(self): | ||
pass | ||
|
||
@abstractmethod | ||
def reload(self, top: ITopology): | ||
pass | ||
|
||
def add_test_suite(self, test_suite: ITestSuite): | ||
self.test_suites.append(test_suite) | ||
|
||
def perform_test(self): | ||
if self.test_suites is None: | ||
logging.error("No test suite set") | ||
for test in self.test_suites: | ||
test.run(self) | ||
|
||
def reset_test_suites(self): | ||
self.test_suites = [] |
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
Empty file.
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
Oops, something went wrong.