Minor fixes based on code review
This commit is contained in:
@@ -346,7 +346,7 @@ class NicObservation(AbstractObservation):
|
|||||||
|
|
||||||
:param where: Where in the simulation state dictionary to find the relevant information for this NIC. A typical
|
:param where: Where in the simulation state dictionary to find the relevant information for this NIC. A typical
|
||||||
example may look like this:
|
example may look like this:
|
||||||
['network','nodes',<node_hostname>,'NICs',<nic_index>]
|
['network','nodes',<node_hostname>,'NICs',<nic_number>]
|
||||||
If None, this denotes that the NIC does not exist and the observation will be populated with zeroes.
|
If None, this denotes that the NIC does not exist and the observation will be populated with zeroes.
|
||||||
:type where: Optional[Tuple[str]], optional
|
:type where: Optional[Tuple[str]], optional
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class DatabaseFileIntegrity(AbstractReward):
|
|||||||
node_hostname = config.get("node_hostname")
|
node_hostname = config.get("node_hostname")
|
||||||
folder_name = config.get("folder_name")
|
folder_name = config.get("folder_name")
|
||||||
file_name = config.get("file_name")
|
file_name = config.get("file_name")
|
||||||
if not node_hostname and folder_name and file_name:
|
if not (node_hostname and folder_name and file_name):
|
||||||
msg = f"{cls.__name__} could not be initialised with parameters {config}"
|
msg = f"{cls.__name__} could not be initialised with parameters {config}"
|
||||||
_LOGGER.error(msg)
|
_LOGGER.error(msg)
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
@@ -148,8 +148,8 @@ class WebServer404Penalty(AbstractReward):
|
|||||||
|
|
||||||
:param node_hostname: Hostname of the node which contains the web server service.
|
:param node_hostname: Hostname of the node which contains the web server service.
|
||||||
:type node_hostname: str
|
:type node_hostname: str
|
||||||
:param service_node: Name of the web server service.
|
:param service_name: Name of the web server service.
|
||||||
:type service_node: str
|
:type service_name: str
|
||||||
"""
|
"""
|
||||||
self.location_in_state = ["network", "nodes", node_hostname, "services", service_name]
|
self.location_in_state = ["network", "nodes", node_hostname, "services", service_name]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user