Merged PR 235: Refactor describe_state to use name/hostname instead of UUID as primary key
## Summary - Refactor Simulator state to use service/application name instead of UUID, and node hostname instead of UUID. - Refactor observations to read the hostname/name instead of UUID. - Refactor rewards as well. - Refactor configs to specify name instead of reference that will be translated to UUID. ## Test process Existing unit tests pass. Inspected the printout from running 'describe_state' on arcd_uc2_network' to verify that names are used to report state. ## Checklist - [x] PR is linked to a **work item** - [x] **acceptance criteria** of linked ticket are met - [x] performed **self-review** of the code - [na] written **tests** for any new functionality added with this PR - [na] updated the **documentation** if this PR changes or adds functionality - [x] written/updated **design docs** if this PR implements new functionality - [na] updated the **change log** - [x] ran **pre-commit** checks for code style - [x] attended to any **TO-DOs** left in the code Related work items: #2131
This commit is contained in:
@@ -14,7 +14,7 @@ def test_file_observation():
|
||||
state = sim.describe_state()
|
||||
|
||||
dog_file_obs = FileObservation(
|
||||
where=["network", "nodes", pc.uuid, "file_system", "folders", "root", "files", "dog.png"]
|
||||
where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"]
|
||||
)
|
||||
assert dog_file_obs.observe(state) == {"health_status": 1}
|
||||
assert dog_file_obs.space == spaces.Dict({"health_status": spaces.Discrete(6)})
|
||||
|
||||
Reference in New Issue
Block a user