Commit ab9e48d1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Enable split queries for the network



Now that all fields are implemented, and (I think) behave equivalent
to the Python implementation, we can switch on the split queries for
networks.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent bac48afe
#
#
# 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):
......
#
#
# 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],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment