From 005317037d50ef7be52d90f06e827b69990d63ac Mon Sep 17 00:00:00 2001 From: David Andruczyk Date: Wed, 3 Jun 2020 17:59:16 -0400 Subject: [PATCH 1/3] Added nodes.read endpoint so you can quey by hostname to get the system_id indirectly --- maas/client/facade.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maas/client/facade.py b/maas/client/facade.py index 5eb83249..4fe4b85b 100644 --- a/maas/client/facade.py +++ b/maas/client/facade.py @@ -185,6 +185,12 @@ def maas(origin): if isinstance(attr, enum.EnumMeta) or name.startswith(("get_", "set_")) } + @facade + def nodes(origin): + return { + "read": origin.Nodes.read, + } + @facade def machines(origin): return { From 9a1216f5234e68735ab163790b1792f91c5982f6 Mon Sep 17 00:00:00 2001 From: David Andruczyk Date: Mon, 5 Apr 2021 19:59:07 -0400 Subject: [PATCH 2/3] Add enpoints to facade for machine unlock, lock, release --- maas/client/facade.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maas/client/facade.py b/maas/client/facade.py index 4fe4b85b..7db30294 100644 --- a/maas/client/facade.py +++ b/maas/client/facade.py @@ -198,6 +198,9 @@ def machines(origin): "create": origin.Machines.create, "get": origin.Machine.read, "list": origin.Machines.read, + "release": origin.Machines.release, + "unlock": origin.Machines.unlock, + "lock": origin.Machines.lock, "get_power_parameters_for": origin.Machines.get_power_parameters_for, } From 1896d59d3160c48931efcf39627f086d3a80ee0e Mon Sep 17 00:00:00 2001 From: David Andruczyk Date: Mon, 5 Apr 2021 20:17:44 -0400 Subject: [PATCH 3/3] Remove incorrect addition --- maas/client/facade.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/maas/client/facade.py b/maas/client/facade.py index 7db30294..4fe4b85b 100644 --- a/maas/client/facade.py +++ b/maas/client/facade.py @@ -198,9 +198,6 @@ def machines(origin): "create": origin.Machines.create, "get": origin.Machine.read, "list": origin.Machines.read, - "release": origin.Machines.release, - "unlock": origin.Machines.unlock, - "lock": origin.Machines.lock, "get_power_parameters_for": origin.Machines.get_power_parameters_for, }