pub fn clusterinfo(conf: &Config, ctx: &str, cluster: Option<&str>) -> Result<ClusterInfo> {
    assert!(conf.has_all_regions()); // can't work with reduced configs
    let (clust, reg) = conf.resolve_cluster(ctx, cluster.map(String::from))?;
    let ci = ClusterInfo {
        region: reg.name,
        namespace: reg.namespace,
        environment: reg.environment.to_string(),
        apiserver: clust.api,
        cluster: clust.name,
        vault: reg.vault.url.clone(),
        kong: reg.kong.map(|k| k.config_url),
    };
    println!("{}", serde_json::to_string_pretty(&ci)?);
    Ok(ci)
}
/// Entry point for clusterinfo
///
/// Need explicit region: shipcat get -r preprodca-green clusterinfo
Entry point for clusterinfo
Need explicit region: shipcat get -r preprodca-green clusterinfo
Entry point for clusterinfo Need explicit region : shipcat get - r preprodca - green clusterinfo
pub fn clusterinfo(conf: &Config, ctx: &str, cluster: Option<&str>) -> Result<ClusterInfo> {
    assert!(conf.has_all_regions()); // can't work with reduced configs
    let (clust, reg) = conf.resolve_cluster(ctx, cluster.map(String::from))?;
    let ci = ClusterInfo {
        region: reg.name,
        namespace: reg.namespace,
        environment: reg.environment.to_string(),
        apiserver: clust.api,
        cluster: clust.name,
        vault: reg.vault.url.clone(),
        kong: reg.kong.map(|k| k.config_url),
    };
    println!("{}", serde_json::to_string_pretty(&ci)?);
    Ok(ci)
}
pub fn clusterinfo ( conf : & Config , ctx : & str , cluster : Option < & str > ) -> Result < ClusterInfo > { assert ! ( conf has_all_regions ( ) ) ; // can't work with reduced configs let ( clust , reg ) = conf . resolve_cluster ( ctx , cluster . map ( String :: from ) ) ? ; let ci = ClusterInfo { region : reg . name , namespace : reg . namespace , environment : reg . environment . to_string ( ) , apiserver : clust . api , cluster : clust . name , vault : reg . vault . url . clone ( ) , kong : reg . kong . map ( | k | k . config_url ) , } ; println ! ( " " serde_json to_string_pretty ( ci ) ) ; Ok ( ci ) }
Entry point for clusterinfo
Need explicit region: shipcat get -r preprodca-green clusterinfo
Entry point for clusterinfo Need explicit region : shipcat get - r preprodca - green clusterinfo
conf
&Config
ctx
&str
cluster
Option<&str>
conf
&Config
ctx
&str
cluster
Option<&str>