diff options
author | Avra Sengupta <asengupt@redhat.com> | 2016-04-12 12:26:54 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-11-01 23:33:45 -0700 |
commit | 098cace25fe192ced2812259633dc7a8ef20faa9 (patch) | |
tree | 325d292a0e244bdaaabe8b1ddc0e41d33bcd8d6c /rpc | |
parent | 247ccb0b3a305decda2147204a749ec2491a030f (diff) |
snapshot/cli: Fix snapshot status xml output
Backport of http://review.gluster.org/#/c/14018/
snap status --xml errors out if a brick is down and
doesn't have pid. It is handled in the cli of the snap
status where "N/A" is displayed in such a scenario.
Handled the same in xml
snap status <snapname> --xml fails as the writer is
not initialised for the same. Using GF_SNAP_STATUS_TYPE_ITER
instead of GF_SNAP_STATUS_TYPE_SNAP for all snap's
status to differentiate between the two scenarios.
Added testcase volume-snapshot-xml.t to check
all snapshot commands xml outputs
> Reviewed-on: http://review.gluster.org/14018
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Change-Id: I99563e8f3e84f1aaeabd865326bb825c44f5c745
BUG: 1369363
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/15290
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/xdr/src/cli1-xdr.x | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x index f1d4ea93d6d..66d399bfaf8 100644 --- a/rpc/xdr/src/cli1-xdr.x +++ b/rpc/xdr/src/cli1-xdr.x @@ -197,10 +197,15 @@ enum gf1_cli_snapshot_status { GF_SNAP_STATUS_TYPE_ITER }; +/* Changing order of GF_SNAP_DELETE_TYPE_VOL * + * and GF_SNAP_DELETE_TYPE_SNAP so that they don't * + * overlap with the enums of GF_SNAP_STATUS_TYPE_SNAP, * + * and GF_SNAP_STATUS_TYPE_VOL * + */ enum gf1_cli_snapshot_delete { GF_SNAP_DELETE_TYPE_ALL = 0, - GF_SNAP_DELETE_TYPE_SNAP = 1, - GF_SNAP_DELETE_TYPE_VOL = 2, + GF_SNAP_DELETE_TYPE_VOL = 1, + GF_SNAP_DELETE_TYPE_SNAP = 2, GF_SNAP_DELETE_TYPE_ITER = 3 }; |