diff --git a/fcos-graph-builder/src/main.rs b/fcos-graph-builder/src/main.rs index 76c7580..e6ff034 100644 --- a/fcos-graph-builder/src/main.rs +++ b/fcos-graph-builder/src/main.rs @@ -73,7 +73,7 @@ fn main() -> Fallible<()> { .data(gb_service.clone()) .route("/v1/graph", web::get().to(gb_serve_graph)) }) - .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 8080))? + .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 5050))? .run(); // Graph-builder status service. @@ -83,7 +83,7 @@ fn main() -> Fallible<()> { .data(gb_status.clone()) .route("/metrics", web::get().to(metrics::serve_metrics)) }) - .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 9080))? + .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 6060))? .run(); sys.run()?; diff --git a/fcos-policy-engine/src/main.rs b/fcos-policy-engine/src/main.rs index dc42bb4..6fe6576 100644 --- a/fcos-policy-engine/src/main.rs +++ b/fcos-policy-engine/src/main.rs @@ -63,7 +63,7 @@ fn main() -> Fallible<()> { .data(pe_service.clone()) .route("/v1/graph", web::get().to(pe_serve_graph)) }) - .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 8081))? + .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 5051))? .run(); // Policy-engine status service. @@ -73,7 +73,7 @@ fn main() -> Fallible<()> { .data(pe_status.clone()) .route("/metrics", web::get().to(metrics::serve_metrics)) }) - .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 9081))? + .bind((IpAddr::from(Ipv4Addr::UNSPECIFIED), 6061))? .run(); sys.run()?; diff --git a/fcos-policy-engine/src/utils.rs b/fcos-policy-engine/src/utils.rs index ba581f5..38ad108 100644 --- a/fcos-policy-engine/src/utils.rs +++ b/fcos-policy-engine/src/utils.rs @@ -7,7 +7,7 @@ use std::time::Duration; /// Default timeout for HTTP requests (30 minutes). const DEFAULT_HTTP_REQ_TIMEOUT: Duration = Duration::from_secs(30 * 60); /// Default address of fcos-graph-builder, which is the same as fcos-policy-builer -const DEFAULT_GB_ADDR: &str = "http://127.0.0.1:8080/v1/graph"; +const DEFAULT_GB_ADDR: &str = "http://127.0.0.1:5050/v1/graph"; /// Return a request builder with base URL and parameters set. fn new_request( @@ -21,6 +21,7 @@ fn new_request( Ok(builder) } +/// Fetch the graph from the fcos-graph-builder instance with the query specified. pub(crate) fn fetch_graph_from_gb( query: String ) -> impl Future> {