File 0003-fence_azure_arm-move-option-definitions-to-define_new_opts.patch of Package fence-agents.4605

commit 9a579753b97fe933bedcc3fba02c636b607a4c4a
Author: Sebastian Dusch <sedusch@microsoft.com>
Date:   Mon Nov 7 16:06:55 2016 +0100

    fence_azure_arm: move option definitions to define_new_opts

diff --git a/fence/agents/azure_arm/fence_azure_arm.py b/fence/agents/azure_arm/fence_azure_arm.py
index a3211a2..4638930 100644
--- a/fence/agents/azure_arm/fence_azure_arm.py
+++ b/fence/agents/azure_arm/fence_azure_arm.py
@@ -63,14 +63,7 @@ def set_power_status(conn, options):
 
     sys.exit(1)
 
-# Main agent method
-def main():
-    global compute_client
-
-    device_opt = ["resourceGroup", "login", "passwd", "tenantId", "subscriptionId","port"]
-
-    atexit.register(atexit_handler)
-
+def define_new_opts():
     all_opt["resourceGroup"] = {
         "getopt" : "rg:",
         "longopt" : "resourceGroup",
@@ -96,6 +89,15 @@ def main():
         "order" : 4
     }
 
+# Main agent method
+def main():
+    global compute_client
+
+    device_opt = ["resourceGroup", "login", "passwd", "tenantId", "subscriptionId","port"]
+
+    atexit.register(atexit_handler)
+
+    define_new_opts()
     options = check_input(device_opt, process_input(device_opt))
 
     docs = {}
openSUSE Build Service is sponsored by