@rest_initialiser(version_check=True)
def execute(self, opts):
    (result, errors) = self.rest.pools('default')
    _exit_if_errors(errors)
    if (opts.output == 'json'):
        nodes_out = {'nodes': []}
        for node in result['nodes']:
            nodes_out['nodes'].append(node['configuredHostname'])
        print(json.dumps(nodes_out))
    else:
        for node in result['nodes']:
            print(node['configuredHostname'])
@rest_initialiser(version_check=True)
def execute(self, opts):
    (result, errors) = self.rest.pools('default')
    _exit_if_errors(errors)
    if (opts.output == 'json'):
        nodes_out = {'nodes': []}
        for node in result['nodes']:
            nodes_out['nodes'].append(node['configuredHostname'])
        print(json.dumps(nodes_out))
    else:
        for node in result['nodes']:
            print(node['configuredHostname'])