Create subscribers on demand

Add a new vty option and allow to optionally generate a random msisdn,
as well as setting the default NAM:

subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|both)

Thanks to Vadim for the random MSISDN patch [1], which was squashed into
this one.

[1] Change-Id: I475c71f9902950fa7498855a616e1ec231fad6ac

Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 (libosmocore)
Change-Id: I0c9fe93f5c24b5e9fefb513c4d049fb7ebd47ecd
Related: OS#2542
diff --git a/tests/test_subscr_create_on_demand.vty b/tests/test_subscr_create_on_demand.vty
new file mode 100644
index 0000000..fb587ae
--- /dev/null
+++ b/tests/test_subscr_create_on_demand.vty
@@ -0,0 +1,43 @@
+OsmoHLR> enable
+OsmoHLR# configure terminal
+OsmoHLR(config)# hlr
+
+OsmoHLR(config-hlr)# subscriber-create-on-demand no-msisdn none
+OsmoHLR(config-hlr)# show running-config
+...
+hlr
+...
+ subscriber-create-on-demand no-msisdn none
+...
+
+OsmoHLR(config-hlr)# subscriber-create-on-demand 3 none
+OsmoHLR(config-hlr)# show running-config
+...
+hlr
+...
+ subscriber-create-on-demand 3 none
+...
+
+OsmoHLR(config-hlr)# subscriber-create-on-demand 4 cs
+OsmoHLR(config-hlr)# show running-config
+...
+hlr
+...
+ subscriber-create-on-demand 4 cs
+...
+
+OsmoHLR(config-hlr)# subscriber-create-on-demand 5 ps
+OsmoHLR(config-hlr)# show running-config
+...
+hlr
+...
+ subscriber-create-on-demand 5 ps
+...
+
+OsmoHLR(config-hlr)# subscriber-create-on-demand 6 cs+ps
+OsmoHLR(config-hlr)# show running-config
+...
+hlr
+...
+ subscriber-create-on-demand 6 cs+ps
+...