diff --git a/lib/client/gnt_network.py b/lib/client/gnt_network.py index 558903fb94d564c7fa7c3a5c709d4f3087ab8cff..a8706c1c6452bfe50252b0ecbde033a1c07d1bb5 100644 --- a/lib/client/gnt_network.py +++ b/lib/client/gnt_network.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2011, 2012 Google Inc. +# Copyright (C) 2011, 2012, 2013 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 @@ -167,7 +167,7 @@ def ListNetworks(opts, args): "tags": (",".join, False), } - cl = GetClient() + cl = GetClient(query=True) return GenericList(constants.QR_NETWORK, desired_fields, args, None, opts.separator, not opts.no_headers, verbose=opts.verbose, format_override=fmtoverride, @@ -184,8 +184,10 @@ def ListNetworkFields(opts, args): @return: the desired exit code """ + cl = GetClient(query=True) + return GenericListFields(constants.QR_NETWORK, args, opts.separator, - not opts.no_headers) + not opts.no_headers, cl=cl) def ShowNetworkConfig(_, args): diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index a47515157a7b3264b90068e9e6ea61b5090f34b9..f73f3dce84d9f8ba67f8102c964044d1c96cebcd 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ -675,7 +675,7 @@ class R_2_networks(baserlib.OpcodeResource): """Returns a list of all networks. """ - client = self.GetClient() + client = self.GetClient(query=True) if self.useBulk(): bulkdata = client.QueryNetworks([], NET_FIELDS, False) @@ -698,7 +698,7 @@ class R_2_networks_name(baserlib.OpcodeResource): """ network_name = self.items[0] - client = self.GetClient() + client = self.GetClient(query=True) result = baserlib.HandleItemQueryErrors(client.QueryNetworks, names=[network_name],