stats: don't mark reporter as 'disable' beforehand

Change-Id: I330a079807cca48b7cc43767abcd2b58830a05fc
Related: SYS#5713
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index 48e4f1c..308bab6 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -638,8 +638,6 @@
 		vty_out(vty, " %s", srep->name);
 	vty_out(vty, "%s", VTY_NEWLINE);
 
-	vty_out(vty, "  disable%s", VTY_NEWLINE);
-
 	if (srep->have_net_config) {
 		if (srep->dest_addr_str)
 			vty_out(vty, "  remote-ip %s%s",
@@ -672,6 +670,8 @@
 
 	if (srep->enabled)
 		vty_out(vty, "  enable%s", VTY_NEWLINE);
+	else
+		vty_out(vty, "  disable%s", VTY_NEWLINE);
 
 	return 1;
 }
diff --git a/tests/stats/stats_vty_test.vty b/tests/stats/stats_vty_test.vty
index 7c01d3f..ddfb3a6 100644
--- a/tests/stats/stats_vty_test.vty
+++ b/tests/stats/stats_vty_test.vty
@@ -36,9 +36,9 @@
 ...
 stats interval 5
 stats reporter statsd
-  disable
   level global
   no prefix
+  disable
 ...
 
 stats_vty_test(config-stats)# level subscriber
@@ -46,7 +46,6 @@
 stats_vty_test(config-stats)# show running-config
 ...
 stats reporter statsd
-  disable
   level subscriber
   prefix statsd-prefix
 ...
@@ -56,7 +55,6 @@
 stats_vty_test(config-stats)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
 ... !local-ip
@@ -65,7 +63,6 @@
 stats_vty_test(config-stats)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   local-ip 192.168.1.100
@@ -81,7 +78,6 @@
 stats_vty_test(config-stats)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   mtu 1337
@@ -97,7 +93,6 @@
 stats_vty_test(config-stats)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   level subscriber
@@ -116,7 +111,6 @@
 stats_vty_test(config)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   level subscriber
@@ -134,14 +128,12 @@
 stats_vty_test(config)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   level subscriber
   prefix statsd-prefix
   enable
 stats reporter log
-  disable
   level peer
   prefix log-prefix
   enable
@@ -175,34 +167,32 @@
 stats_vty_test(config)# show running-config
 ...
 stats reporter statsd
-  disable
   remote-ip 192.168.1.200
   remote-port 6969
   level subscriber
   prefix statsd-prefix
   enable
 stats reporter log
-  disable
   level peer
   prefix log-prefix
   enable
 stats reporter statsd statsd-foo
-  disable
   remote-ip 192.168.2.200
   remote-port 9696
   level global
   prefix statsd-one-prefix
   flush-period 1
-stats reporter log log-bar
   disable
+stats reporter log log-bar
   level global
   prefix log-bar-prefix
   flush-period 2
-stats reporter log log-zoo
   disable
+stats reporter log log-zoo
   level global
   prefix log-zoo-prefix
   flush-period 3
+  disable
 ...