Small style fixes (' vs ") in network code
authorIustin Pop <iustin@google.com>
Wed, 21 Nov 2012 15:27:51 +0000 (16:27 +0100)
committerIustin Pop <iustin@google.com>
Wed, 21 Nov 2012 15:54:38 +0000 (16:54 +0100)
This is just trivial fixes; I think I caught all of them.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/client/gnt_network.py
lib/cmdlib.py
lib/constants.py
lib/rapi/client.py

index 5b0e8ad..0a6c841 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2011 Google Inc.
+# Copyright (C) 2011, 2012 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -90,10 +90,10 @@ def MapNetwork(opts, args):
   mode = args[2]
   link = args[3]
 
-  #TODO: allow comma separated group names
-  if groups == 'all':
+  # TODO: allow comma separated group names
+  if groups == "all":
     cl = GetClient()
-    (groups, ) = cl.QueryGroups([], ['name'], False)
+    (groups, ) = cl.QueryGroups([], ["name"], False)
   else:
     groups = [groups]
 
@@ -120,9 +120,9 @@ def UnmapNetwork(opts, args):
   groups = args[1]
 
   #TODO: allow comma separated group names
-  if groups == 'all':
+  if groups == "all":
     cl = GetClient()
-    (groups, ) = cl.QueryGroups([], ['name'], False)
+    (groups, ) = cl.QueryGroups([], ["name"], False)
   else:
     groups = [groups]
 
index 66046f4..57746f7 100644 (file)
@@ -15973,7 +15973,7 @@ class _NetworkQuery(_QueryBase):
             netparams = group.networks[net_uuid]
             mode = netparams[constants.NIC_MODE]
             link = netparams[constants.NIC_LINK]
-            info = group.name + '(' + mode + ', ' + link + ')'
+            info = group.name + "(" + mode + ", " + link + ")"
             network_to_groups[net_uuid].append(info)
 
             if do_instances:
index 4f78766..180247f 100644 (file)
@@ -1072,8 +1072,8 @@ NIC_IP_POOL = "pool"
 
 NIC_VALID_MODES = frozenset([NIC_MODE_BRIDGED, NIC_MODE_ROUTED])
 
-RESERVE_ACTION = 'reserve'
-RELEASE_ACTION = 'release'
+RESERVE_ACTION = "reserve"
+RELEASE_ACTION = "release"
 
 # An extra description of the network.
 # Can be used by hooks/kvm-vif-bridge to apply different rules
index d84bcfe..04d4160 100644 (file)
@@ -1741,10 +1741,10 @@ class GanetiRapiClient(object): # pylint: disable=R0904
     _AppendDryRunIf(query, dry_run)
 
     if add_reserved_ips:
-      add_reserved_ips = add_reserved_ips.split(',')
+      add_reserved_ips = add_reserved_ips.split(",")
 
     if tags:
-      tags = tags.split(',')
+      tags = tags.split(",")
 
     body = {
       "network_name": network_name,