Ordering the "show running-config" output

Hi All,
I have modelled yang in the following way.

list mylist {
key “name”;

leaf name {
	type string {
	}
}

.
.
.
.
.

}

I am configuring the commands in the following sequence.
mylist 2
mylist 10
mylist 1

Expected “show running” output:
mylist 1
mylist 2
mylist 10

But in show running-config it is shown as
mylist 1
mylist 10
mylist 2

Note: I cannot make the “name” to be an integer. I need it as a string to support a variety of characters.

But I want the output in the show running-config to be alpha-numeric. “ordered-by user” when used, gives the same order as we configure. Is there a way to render the show running-config output to be in alpha-numeric order ?
Thanks in advance.

There are no Tail-f specific YANG annotations that will sort the list in the order as you have specified.

One possible way is to specify it as “ordered-by user”, and then implement a transaction hook and make use of maapi_move_ordered( ) to rearrange the order upon every change to the list. Refer to the ConfD User Guide for information for how to use those features.