Skip to content
Snippets Groups Projects

CostMetric Code Implemented

Closed Syed Mafooq Ull Hassan requested to merge max-line-length into master
10 files
+ 171
8
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 12
7
@@ -29,16 +29,23 @@ def test_command() -> None:
@click.option("--dry-run", is_flag=True, help="Explain the command's function")
def run(dry_run: bool) -> None:
network_interfaces = utils.get_network_interfaces_annotations()
monetary_cost = utils.get_monetary_cost_annotation()
energy_raw, energy_label = utils.get_energy_efficiency_annotation()
all_annotations = {
**network_interfaces,
**monetary_cost,
**energy_raw,
**energy_label,
}
if dry_run:
click.echo("[DRY-RUN] The following attributes would be applied: \n")
click.echo("[DRY-RUN] The following attributes would be applied:\n")
click.echo("Annotations:")
for key, value in network_interfaces.items():
for key, value in all_annotations.items():
click.echo(f"\t{key}: {value}")
return
pass
@click.command("start_daemon", short_help="Start the diagnostics.")
def start_daemon() -> None:
@@ -46,9 +53,7 @@ def start_daemon() -> None:
try:
config.load_incluster_config()
except ConfigException:
raise exceptions.HyperToolKubernetesError(
"Error loading in-cluster config"
)
raise exceptions.HyperToolKubernetesError("Error loading in-cluster config")
v1 = client.CoreV1Api()
Loading