Skip to content

Commit

Permalink
Merge pull request #96 from spacetelescope/feature/add_new_mode
Browse files Browse the repository at this point in the history
add a mode property to testbed
  • Loading branch information
ehpor authored Jun 8, 2023
2 parents 23ecc5c + fb5f901 commit 029c8c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion catkit_bindings/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ PYBIND11_MODULE(catkit_bindings, m)
.def_property_readonly("tracing_egress_port", &TestbedProxy::GetTracingEgressPort)
.def_property_readonly("base_data_path", &TestbedProxy::GetBaseDataPath)
.def_property_readonly("support_data_path", &TestbedProxy::GetSupportDataPath)
.def_property_readonly("long_term_monitoring_path", &TestbedProxy::GetLongTermMonitoringPath);
.def_property_readonly("long_term_monitoring_path", &TestbedProxy::GetLongTermMonitoringPath)
.def_property_readonly("mode", &TestbedProxy::GetMode);

py::class_<DataFrame>(m, "DataFrame")
.def_property_readonly("id", [](const DataFrame &f)
Expand Down
7 changes: 7 additions & 0 deletions catkit_core/TestbedProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ int TestbedProxy::GetTracingEgressPort()
return m_TracingEgressPort;
}

std::string TestbedProxy::GetMode()
{
GetTestbedInfo();

return m_Config["testbed"]["mode"];
}

std::vector<std::string> TestbedProxy::GetActiveServices()
{
return std::vector<std::string>();
Expand Down
2 changes: 2 additions & 0 deletions catkit_core/TestbedProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class TestbedProxy : public Client, public std::enable_shared_from_this<TestbedP
int GetTracingIngressPort();
int GetTracingEgressPort();

std::string GetMode();

std::vector<std::string> GetActiveServices();
std::vector<std::string> GetInactiveServices();

Expand Down

0 comments on commit 029c8c1

Please sign in to comment.