Skip to content

Commit

Permalink
chore(rust): do not remove space when resetting app
Browse files Browse the repository at this point in the history
This reverts commit c9348e8.
  • Loading branch information
adrianbenavides committed Nov 8, 2023
1 parent 739124d commit 258fa2d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions implementations/rust/ockam/ockam_app_lib/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use ockam_api::cli_state::{
};
use ockam_api::cloud::enroll::auth0::UserInfo;
use ockam_api::cloud::project::Project;
use ockam_api::cloud::space::Spaces;
use ockam_api::cloud::{AuthorityNode, Controller};
use ockam_api::nodes::models::portal::OutletStatus;
use ockam_api::nodes::models::transport::{CreateTransportJson, TransportMode, TransportType};
Expand Down Expand Up @@ -269,7 +268,6 @@ impl AppState {
}

async fn reset_state(&self) -> miette::Result<()> {
self.reset_orchestrator().await?;
let mut state = self.state.write().await;
match state.reset().await {
Ok(s) => {
Expand All @@ -281,17 +279,6 @@ impl AppState {
Ok(())
}

async fn reset_orchestrator(&self) -> miette::Result<()> {
let ctx = self.context();
let controller = self.controller().await?;
for space in self.state().await.spaces.list()? {
controller
.delete_space(&ctx, space.config().id.clone())
.await?;
}
Ok(())
}

/// Recreate a new NodeManagerWorker instance, which will restart the necessary
/// child workers as described in its Worker trait implementation.
pub async fn reset_node_manager(&self) -> miette::Result<()> {
Expand Down

0 comments on commit 258fa2d

Please sign in to comment.