Add test for backend._GetBlockDevSymlinkPath
[ganeti-local] / lib / rapi / rlib2.py
index a18e12d..bfd5415 100644 (file)
@@ -98,7 +98,7 @@ NET_FIELDS = ["name", "network", "gateway",
               "free_count", "reserved_count",
               "map", "group_list", "inst_list",
               "external_reservations", "tags",
-             ] 
+              ]
 
 G_FIELDS = [
   "alloc_policy",
@@ -155,7 +155,7 @@ _NODE_MIGRATE_REQV1 = "node-migrate-reqv1"
 # Feature string for node evacuation with LU-generated jobs
 _NODE_EVAC_RES1 = "node-evac-res1"
 
-ALL_FEATURES = frozenset([
+ALL_FEATURES = compat.UniqueFrozenset([
   _INST_CREATE_REQV1,
   _INST_REINSTALL_REQV1,
   _NODE_MIGRATE_REQV1,
@@ -295,7 +295,7 @@ class R_2_jobs(baserlib.ResourceBase):
     @return: a dictionary with jobs id and uri.
 
     """
-    client = self.GetClient()
+    client = self.GetClient(query=True)
 
     if self.useBulk():
       bulkdata = client.QueryJobs(None, J_FIELDS_BULK)
@@ -324,7 +324,7 @@ class R_2_jobs_id(baserlib.ResourceBase):
 
     """
     job_id = self.items[0]
-    result = self.GetClient().QueryJobs([job_id, ], J_FIELDS)[0]
+    result = self.GetClient(query=True).QueryJobs([job_id, ], J_FIELDS)[0]
     if result is None:
       raise http.HttpNotFound()
     return baserlib.MapFields(J_FIELDS, result)
@@ -717,6 +717,7 @@ class R_2_networks_name(baserlib.OpcodeResource):
       "dry_run": self.dryRun(),
       })
 
+
 class R_2_networks_name_connect(baserlib.OpcodeResource):
   """/2/networks/[network_name]/connect resource.
 
@@ -733,6 +734,7 @@ class R_2_networks_name_connect(baserlib.OpcodeResource):
       "dry_run": self.dryRun(),
       })
 
+
 class R_2_networks_name_disconnect(baserlib.OpcodeResource):
   """/2/networks/[network_name]/disconnect resource.
 
@@ -749,6 +751,7 @@ class R_2_networks_name_disconnect(baserlib.OpcodeResource):
       "dry_run": self.dryRun(),
       })
 
+
 class R_2_networks_name_modify(baserlib.OpcodeResource):
   """/2/networks/[network_name]/modify resource.
 
@@ -1564,6 +1567,7 @@ class R_2_groups_name_tags(_R_Tags):
   """
   TAG_LEVEL = constants.TAG_NODEGROUP
 
+
 class R_2_networks_name_tags(_R_Tags):
   """ /2/networks/[network_name]/tags resource.