cml 0.1.6

A library to programmatically and safely interact with the rest API of Cisco Modeling Labs (CML), formerly VIRL2
Documentation
1
2
3
4
5
6
7
8
9
10

use crate::rest_types as rt;

pub fn node_definitions_with_consoles<'a, II: IntoIterator<Item = &'a rt::SimpleNodeDefinition>>(defs: II) -> Vec<rt::NodeDefinition> {
	defs.into_iter()
		.filter(|nd| nd.data.sim.console)
		.map(|nd| nd.id.clone())
		.collect::<Vec<rt::NodeDefinition>>()
}