mirror of https://github.com/sipwise/ngcpcfg.git
Change-Id: Ica88e002a5024ef3ca42acd313f97b1970f18a2dchanges/78/6678/2
parent
17ea75e00c
commit
32501817d7
@ -0,0 +1,20 @@
|
||||
[%
|
||||
# Returns the ngcp management node shared name.
|
||||
#
|
||||
# @return out The mgmt node shared name.
|
||||
-%]
|
||||
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_ngcp_type'; ngcp_type = out -%]
|
||||
[% IF ngcp_type == 'carrier' -%]
|
||||
[% FOREACH host IN hosts.keys -%]
|
||||
[% argv.host=host; argv.role='mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out -%]
|
||||
[% IF is_mgmt -%]
|
||||
[% matches = host.match('^(\w+[0-9])[ab]?$') -%]
|
||||
[% out = matches.0 -%]
|
||||
[% LAST -%]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
[% ELSE -%]
|
||||
[% out = "sp" -%]
|
||||
[% END -%]
|
||||
Loading…
Reference in new issue