Hide raw source types behind semantic scenario API

This commit is contained in:
andrussal 2026-03-08 14:08:42 +01:00
parent 4d8349679e
commit a523024279
3 changed files with 19 additions and 4 deletions

View File

@ -139,6 +139,21 @@ impl<E: Application, Caps> Scenario<E, Caps> {
self.sources.external_nodes()
}
#[must_use]
pub const fn is_managed(&self) -> bool {
self.sources.is_managed()
}
#[must_use]
pub const fn is_external_only(&self) -> bool {
self.sources.is_external_only()
}
#[must_use]
pub fn has_external_nodes(&self) -> bool {
!self.sources.external_nodes().is_empty()
}
#[must_use]
pub const fn source_orchestration_plan(&self) -> &SourceOrchestrationPlan {
&self.source_orchestration_plan

View File

@ -52,8 +52,8 @@ pub use runtime::{
wait_http_readiness, wait_until_stable,
};
#[doc(hidden)]
pub use sources::AttachSource;
pub use sources::{ExistingCluster, ExternalNodeSource, ScenarioSources};
pub use sources::{AttachSource, ScenarioSources};
pub use sources::{ExistingCluster, ExternalNodeSource};
pub use workload::Workload;
pub use crate::env::Application;

View File

@ -1,5 +1,5 @@
mod model;
#[doc(hidden)]
pub use model::AttachSource;
pub use model::{ExistingCluster, ExternalNodeSource, ScenarioSources};
pub use model::{AttachSource, ScenarioSources};
pub use model::{ExistingCluster, ExternalNodeSource};