]> git.proxmox.com Git - pve-client.git/commitdiff
rename defaut output format from 'table' to 'text'
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Jun 2018 09:57:40 +0000 (11:57 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Jun 2018 09:57:40 +0000 (11:57 +0200)
PVE/APIClient/Commands/list.pm
PVE/APIClient/Config.pm
PVE/APIClient/Helpers.pm

index f12ef8718766820e137f007708a9a3e6640f5600..2030c515423d0fecbd393a1395e37da62562785c 100644 (file)
@@ -31,7 +31,7 @@ __PACKAGE__->register_method ({
        my $conn = PVE::APIClient::Config->remote_conn($config, $param->{remote});
        my $resources = $conn->get('api2/json/cluster/resources', { type => 'vm' });
 
-       if (!defined($param->{format}) or $param->{format} eq 'table') {
+       if (!defined($param->{format}) or $param->{format} eq 'text') {
            my $headers = ['Node', 'VMID', 'Type', 'Name', 'Status'];
            my $data = [];
            for my $el (@$resources) {
index 3f2efe596100db9d7ab27917e7a5927c5177f012..249ef83ceaebb801700232c6a925a76440c4c270 100644 (file)
@@ -28,9 +28,9 @@ my $complete_remote_name = sub {
 PVE::APIClient::JSONSchema::register_standard_option('pveclient-output-format', {
     type => 'string',
     description => 'Output format.',
-    enum => [ 'table', 'json' ],
+    enum => [ 'text', 'json' ],
     optional => 1,
-    default => 'table',
+    default => 'text',
 });
 
 PVE::APIClient::JSONSchema::register_standard_option('pveclient-remote-name', {
index 7aec16082b30814c93056abbe971e03568216c70..cc1951401d3247b5682a35857a164471f71cf8d0 100644 (file)
@@ -43,7 +43,7 @@ $build_pve_api_path_hash = sub {
     }
 };
 
-my $default_output_format = 'table';
+my $default_output_format = 'text';
 my $client_output_format =  $default_output_format;
 
 sub set_output_format {
@@ -71,7 +71,7 @@ sub print_result {
 
     if ($format eq 'json') {
        print to_json($data, {utf8 => 1, allow_nonref => 1, canonical => 1, pretty => 1 });
-    } elsif ($format eq 'table') {
+    } elsif ($format eq 'text') {
        my $type = $result_schema->{type};
        if ($type eq 'object') {
            die "implement me";