TT#72351 Fix hostname matches for CARRIER

Change-Id: I7df8ed1bfc0e143fc0765c660eab4144b7b918da
changes/15/36115/4
Guillem Jover 7 years ago
parent 7a7873386d
commit 443bbc02ef

@ -1,3 +1,16 @@
[%-
IF general.ngcp_type == 'spce';
host_match = "spce";
fqdn_match = "spce.";
ELSIF general.ngcp_type == 'sppro';
host_match = "/sp[12]/";
fqdn_match = "/sp[12]/";
ELSE;
host_match = "/[a-z]+[0-9]{2}[ab]/";
fqdn_match = "/sp[12]/";
END;
-%]
command:
hostname:
exit-status: 0
@ -6,19 +19,19 @@ command:
hostname:
exit-status: 0
stdout:
- [% general.ngcp_type == 'spce' ? "spce" : "/sp[1,2]/" %]
- "[% host_match %]"
stderr: []
"hostname --fqdn":
exit-status: 0
stdout:
- [% general.ngcp_type == 'spce' ? "spce." : "/sp[1,2]/" %]
- "[% fqdn_match %]"
stderr: []
"hostname --short":
exit-status: 0
stdout:
- [% general.ngcp_type == 'spce' ? "spce" : "/sp[1,2]/" %]
- "[% host_match %]"
stderr: []
[% END -%]

Loading…
Cancel
Save