diff --git a/lib/client/gnt_network.py b/lib/client/gnt_network.py index 5b0e8ad45abcab4405df5d2c53f865ca512a3be3..0a6c841b15b27ea7d8e39085b275449afd0a1b98 100644 --- a/lib/client/gnt_network.py +++ b/lib/client/gnt_network.py @@ -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] diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 66046f43ba3be5ebf7aa3449f6bb9c6a8b1250f1..57746f70af256de2ad948090a20d6af011666dcb 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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: diff --git a/lib/constants.py b/lib/constants.py index 4f78766c986c88ff09f69eea992db27d1842b3cc..180247f1d5422af95ffdddd7d5e0db200ed933cc 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -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 diff --git a/lib/rapi/client.py b/lib/rapi/client.py index d84bcfef74a769411ae3947e7ac33032da3895dd..04d4160f540ca4cb5f2f39fbb0282005d2dee82b 100644 --- a/lib/rapi/client.py +++ b/lib/rapi/client.py @@ -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,