From 3f3655e8370067fd4a133592a75778778c8e6eef Mon Sep 17 00:00:00 2001
From: Javier Cano Cano <jcanocan@redhat.com>
Date: Wed, 11 Oct 2023 15:12:14 +0200
Subject: [PATCH] fence_azure_arm: fix get virtual machines call

The function virtual_machines.get() has changed it's signature from:

```
def get(
    self,
    resource_group_name,
    expand=None,
    **kwargs
):
```
to:

```
def get(
    self,
    resource_group_name: str,
    machine_name: str,
    expand: Optional[Union[str, _models.InstanceViewTypes]] = None,
    **kwargs: Any
    ) -> _models.Machine:
```

Therefore, the number of positional arguments has been reduced to two:
`resource_group_name` and `machine_name`, while  the `expand`
parameter has swift from a *positional argument* to a *keyword-only
argument*.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>

Origin: upstream, https://github.com/ClusterLabs/fence-agents/commit/3f3655e8370067fd4a133592a75778778c8e6eef
Last-Update: 2024-04-16
---
 agents/azure_arm/fence_azure_arm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py
index e3b7c85c7..515aae294 100755
--- a/agents/azure_arm/fence_azure_arm.py
+++ b/agents/azure_arm/fence_azure_arm.py
@@ -72,7 +72,7 @@ def get_power_status(clients, options):
 
         powerState = "unknown"
         try:
-            vmStatus = compute_client.virtual_machines.get(rgName, vmName, "instanceView")
+            vmStatus = compute_client.virtual_machines.get(rgName, vmName, expand="instanceView")
         except Exception as e:
             fail_usage("Failed: %s" % e)
 
