Skip to main content

get_service_inventory/
get_service_inventory.rs

1//! TMF638 Service Inventory API Example
2
3use tmf_client::common::tmf_error::TMFError;
4
5#[cfg(feature = "blocking")]
6use tmf_client::{BlockingOperations, TMFClient};
7
8fn main() -> Result<(), TMFError> {
9    #[cfg(feature = "blocking")]
10    {
11        use tmf_client::QueryOptions;
12
13        let opt = QueryOptions::default()
14            // .name("SD L3 Service CFS Instance #0123087452")
15            .limit(1)
16            .offset(1);
17
18        let services = TMFClient::new("https://localhost", None)
19            .tmf638()
20            .service()
21            // .list(Some(opt))?;
22            .list(Some(opt))?;
23
24        let service = services.first().unwrap();
25
26        let bandwidth = service.get_characteristics("bandwidth");
27
28        dbg!(bandwidth);
29    }
30
31    Ok(())
32}