mirror of https://github.com/sipwise/ngcpcfg.git
parent
7c608b68b0
commit
db226dbbae
@ -1,67 +0,0 @@
|
||||
#!/usr/bin/perl -CSD
|
||||
# Purpose: generate yaml output with instance_info for bash script
|
||||
################################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use YAML::XS;
|
||||
use Time::Piece;
|
||||
use Getopt::Long qw(:config posix_default bundling_values no_ignorecase);
|
||||
|
||||
my $DEBUG = $ENV{DEBUG} || 0;
|
||||
my $HNAME = $ENV{HNAME} // '';
|
||||
my $TIME_FORMAT = $ENV{TIME_FORMAT} // '%F %T';
|
||||
$TIME_FORMAT =~ s/^\+//;
|
||||
|
||||
my $NETWORK_CONFIG = $ENV{NETWORK_CONFIG};
|
||||
|
||||
sub usage {
|
||||
print <<HELP;
|
||||
Usage: $0 [<option>...] instance_name
|
||||
|
||||
Options:
|
||||
-h, --help This help message.
|
||||
HELP
|
||||
}
|
||||
|
||||
if (@ARGV != 1) {
|
||||
error("wrong number of arguments");
|
||||
usage();
|
||||
exit 1;
|
||||
}
|
||||
my %options = ( help => sub { usage(); exit 0; }, );
|
||||
|
||||
error("NETWORK_CONFIG is not defined") unless $NETWORK_CONFIG;
|
||||
|
||||
GetOptions( \%options, 'help|?', );
|
||||
|
||||
my $yaml = YAML::XS::LoadFile($NETWORK_CONFIG);
|
||||
|
||||
sub output_prefix {
|
||||
my $t = Time::Piece->new;
|
||||
my $timestamp = $t->strftime($TIME_FORMAT);
|
||||
|
||||
return "$timestamp $HNAME";
|
||||
}
|
||||
|
||||
sub error {
|
||||
my $prefix = output_prefix();
|
||||
die "$prefix: Error: @_\n";
|
||||
}
|
||||
|
||||
exit 1 unless defined $yaml->{instances};
|
||||
my $instance_name = $ARGV[0];
|
||||
|
||||
# YAML::XS::Dump returns raw UTF-8 strings.
|
||||
binmode \*STDOUT, ':raw';
|
||||
foreach my $instance ( sort @{ $yaml->{instances} } ) {
|
||||
if ($instance->{name} eq $instance_name) {
|
||||
my $out = {
|
||||
instance_info => $instance,
|
||||
};
|
||||
print Dump($out);
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
exit 1;
|
||||
@ -1,195 +0,0 @@
|
||||
#!/usr/bin/perl -CSD
|
||||
# Purpose: format yaml instances file for bash script
|
||||
################################################################################
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use YAML::XS;
|
||||
use Getopt::Long qw(:config posix_default bundling_values no_ignorecase);
|
||||
use Time::Piece;
|
||||
use Data::Dumper;
|
||||
use File::Spec;
|
||||
use Storable qw(dclone);
|
||||
|
||||
my $DEBUG = $ENV{DEBUG} || 0;
|
||||
my $HNAME = $ENV{HNAME} // '';
|
||||
my $TIME_FORMAT = $ENV{TIME_FORMAT} // '%F %T';
|
||||
$TIME_FORMAT =~ s/^\+//;
|
||||
|
||||
my $NETWORK_CONFIG = $ENV{NETWORK_CONFIG};
|
||||
my $TEMPLATE_INSTANCES = $ENV{TEMPLATE_INSTANCES};
|
||||
|
||||
sub usage {
|
||||
print <<HELP;
|
||||
Usage: $0 [<option>...] <input>...
|
||||
|
||||
Options:
|
||||
-h, --help This help message.
|
||||
HELP
|
||||
}
|
||||
|
||||
my %options = ( help => sub { usage(); exit 0; }, );
|
||||
|
||||
error("NETWORK_CONFIG is not defined") unless $NETWORK_CONFIG;
|
||||
|
||||
GetOptions( \%options, 'help|?', );
|
||||
|
||||
my $yaml = YAML::XS::LoadFile($NETWORK_CONFIG);
|
||||
my $templ = YAML::XS::LoadFile($TEMPLATE_INSTANCES);
|
||||
|
||||
|
||||
sub output_prefix {
|
||||
my $t = Time::Piece->new;
|
||||
my $timestamp = $t->strftime($TIME_FORMAT);
|
||||
|
||||
return "$timestamp $HNAME";
|
||||
}
|
||||
|
||||
|
||||
sub error {
|
||||
my $prefix = output_prefix();
|
||||
die "$prefix: Error: @_\n";
|
||||
}
|
||||
|
||||
|
||||
sub debug {
|
||||
return unless $DEBUG;
|
||||
my $prefix = output_prefix();
|
||||
warn "$prefix: DEBUG @_\n";
|
||||
}
|
||||
|
||||
my $instances = {};
|
||||
my $dirs = {};
|
||||
|
||||
|
||||
sub prefix_root {
|
||||
my $path = shift;
|
||||
return $path =~ s/^([^\/].*)/\/$1/r;
|
||||
}
|
||||
|
||||
|
||||
sub split_path {
|
||||
my $input = shift;
|
||||
my $val = ();
|
||||
foreach(split /\//, $input){
|
||||
error("relative paths are not supported, ${input}") if ($_ =~ '^\.\.?$');
|
||||
if( defined $_ && !($_ =~ /^$/ )) {
|
||||
push @{$val}, $_;
|
||||
}
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
||||
sub show_match {
|
||||
my $path;
|
||||
my ($bpath, $spath, $suffix) = @_;
|
||||
|
||||
if(defined $spath) {
|
||||
$path = $spath;
|
||||
} else {
|
||||
$path = $bpath;
|
||||
}
|
||||
|
||||
foreach my $info (sort { $a->{name} cmp $b->{name} } @{$dirs->{$path}}) {
|
||||
my $dest;
|
||||
if(defined $spath && defined $suffix) {
|
||||
$dest = $info->{dest}."/${suffix}";
|
||||
} else {
|
||||
$dest = $info->{dest};
|
||||
}
|
||||
print "$bpath:$dest:".$info->{name}."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub prepare_info {
|
||||
return 0 unless defined $yaml->{instances};
|
||||
foreach my $instance (sort { $a->{name} cmp $b->{name} } @{$yaml->{instances}}) {
|
||||
$instances->{ $instance->{label} } //= ();
|
||||
push @{ $instances->{ $instance->{label} } }, $instance->{name};
|
||||
}
|
||||
foreach my $def (sort { $a->{orig} cmp $b->{orig} } @{$templ->{sources}}) {
|
||||
my $inst = $instances->{ $def->{label} };
|
||||
next unless $inst;
|
||||
my $orig = prefix_root $def->{orig};
|
||||
$dirs->{$orig} = ();
|
||||
foreach ( sort @{$inst} ) {
|
||||
my $dest = $def->{dest} =~ s/^(.*)\$\{INSTANCE_NAME\}(.*)$/$1$_$2/rg;
|
||||
push @{ $dirs->{$orig} }, { name => $_, dest => prefix_root $dest};
|
||||
}
|
||||
}
|
||||
#debug("info:".Dumper({instances => $instances, dirs => $dirs}));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
sub match_source {
|
||||
my ($build_path, $matched) = @_;
|
||||
my $abs_path = File::Spec->rel2abs($build_path);
|
||||
my $sbuild = split_path $abs_path;
|
||||
my $size_build = $#{$sbuild};
|
||||
my $search = keys %{$dirs};
|
||||
|
||||
debug("search ${build_path}");
|
||||
foreach my $index (0 .. $size_build) {
|
||||
my $b_part = @{$sbuild}[$index];
|
||||
debug("index:${index} b_part:${b_part} b:".join '/', @{$sbuild}[0..$index]);
|
||||
foreach my $source_path (sort keys %{$dirs}) {
|
||||
next if defined $matched->{$source_path};
|
||||
my $sorig = split_path $source_path;
|
||||
my $size_orig = $#{$sorig};
|
||||
my $i_part = defined(@{$sorig}[$index]) ? @{$sorig}[$index] : '';
|
||||
my $equal = defined($i_part) ? $b_part eq $i_part : 0;
|
||||
|
||||
if (not $equal) {
|
||||
$search--;
|
||||
$matched->{$source_path} = 0;
|
||||
debug("!! fail to match ${search} ${source_path}");
|
||||
} elsif ($index eq $size_build) {
|
||||
$search--;
|
||||
$matched->{$source_path} = {build => $source_path, suffix=> undef};
|
||||
debug(" match ${search} ${source_path}");
|
||||
} elsif ($index eq $size_orig) {
|
||||
$search--;
|
||||
my $temp = join '/', @{$sbuild}[$index+1..$size_build];
|
||||
$matched->{$source_path} = {
|
||||
build => "${source_path}/$temp",
|
||||
suffix => $temp,
|
||||
};
|
||||
debug(" match ${search} ${source_path}");
|
||||
} else {
|
||||
debug(" index:$index size_build:${size_build} size_orig:${size_orig} ${source_path}");
|
||||
}
|
||||
}
|
||||
debug("***");
|
||||
|
||||
# nothing else to match
|
||||
last unless $search;
|
||||
}
|
||||
|
||||
# clean the non-matches for next round
|
||||
foreach (sort keys %{$matched}) {
|
||||
if ($matched->{$_}) {
|
||||
show_match $matched->{$_}->{build}, $_, $matched->{$_}->{suffix};
|
||||
} else {
|
||||
delete($matched->{$_});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit unless prepare_info;
|
||||
|
||||
if (@ARGV == 0) {
|
||||
foreach (sort keys %{$dirs}) {
|
||||
show_match $_;
|
||||
}
|
||||
} else {
|
||||
my $matched;
|
||||
foreach my $build (sort @ARGV) {
|
||||
match_source $build, $matched;
|
||||
}
|
||||
}
|
||||
exit;
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Return an advertised IP from the interface of a given LB instance
|
||||
# @param argv.instance instance object
|
||||
#
|
||||
# @param argv.type The interface type of LB to extract the advertised IP
|
||||
# from, one of:
|
||||
# sip_int, sip_ext
|
||||
# @param argv.status node status [ online, offline, inactive ]
|
||||
# default value: ['online', 'inactive']
|
||||
# @return out The array of IPs.
|
||||
|
||||
IF !argv.status.size;
|
||||
argv.status = ['online', 'inactive'];
|
||||
END;
|
||||
|
||||
status = {
|
||||
online = 0
|
||||
offline = 0
|
||||
inactive = 0
|
||||
};
|
||||
FOREACH val IN argv.status;
|
||||
status.$val = 1;
|
||||
END;
|
||||
|
||||
out = [];
|
||||
RETURN UNLESS status.item(argv.instance.status);
|
||||
|
||||
FOREACH iface IN argv.instance.interfaces;
|
||||
NEXT UNLESS iface.type.grep('^' _ argv.type _ '$').size();
|
||||
FOREACH adv IN iface.advertised_ip;
|
||||
NEXT UNLESS adv;
|
||||
out.push(adv);
|
||||
END;
|
||||
END;
|
||||
|
||||
out = out.sort.unique;
|
||||
|
||||
-%]
|
||||
@ -1,38 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Return an array of IPs from the interface of a given type
|
||||
# for an instance.
|
||||
# @param argv.instance instance
|
||||
# @param argv.type The interface type of a node to extract the IP
|
||||
# from, one of:
|
||||
# web_int, web_ext, sip_int, sip_ext, ...
|
||||
# @param argv.status node status [ online, offline, inactive ]
|
||||
# default value: ['online', 'inactive']
|
||||
# @return out The array of IPs.
|
||||
|
||||
IF !argv.status.size;
|
||||
argv.status = ['online', 'inactive'];
|
||||
END;
|
||||
|
||||
status = {
|
||||
online = 0
|
||||
offline = 0
|
||||
inactive = 0
|
||||
};
|
||||
FOREACH val IN argv.status;
|
||||
status.$val = 1;
|
||||
END;
|
||||
|
||||
out = [];
|
||||
RETURN UNLESS status.item(argv.instance.status);
|
||||
|
||||
FOREACH iface IN argv.instance.interfaces;
|
||||
NEXT UNLESS iface.type.grep('^' _ argv.type _ '$').size();
|
||||
NEXT UNLESS iface.ip;
|
||||
out.push(iface.ip);
|
||||
END;
|
||||
|
||||
out = out.sort.unique;
|
||||
|
||||
-%]
|
||||
@ -1,66 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Returns an array of IPs getting from the connection list passed as argument
|
||||
# after getting the one with name argv.name
|
||||
# The ips are retrieved from the definition of other instances or hosts
|
||||
#
|
||||
# @param argv.connection the connection list of the instance
|
||||
#
|
||||
# @param argv.name the name of the connection list to use
|
||||
#
|
||||
# @param argv.type get IPs for only specific iface type,
|
||||
# not all of the types present in conn config
|
||||
#
|
||||
# @param argv.ngcpcfgdir
|
||||
#
|
||||
# @return out the array of IPs.
|
||||
# @return out_algorithm the algorithm to use.
|
||||
|
||||
out = [];
|
||||
out_algorithm = '';
|
||||
|
||||
IF !argv.ngcpcfgdir.length;
|
||||
argv.ngcpcfgdir = '/usr/lib/ngcp-ngcpcfg';
|
||||
END;
|
||||
|
||||
FOR conn IN argv.connection;
|
||||
NEXT UNLESS conn.name == argv.name;
|
||||
out_algorithm = conn.algorithm;
|
||||
FOR link IN conn.links;
|
||||
# Filtering to get the interface with the correct type
|
||||
FOR link_interface IN link.interfaces;
|
||||
NEXT UNLESS link_interface.type.grep('^' _ argv.type _ '$').size();
|
||||
|
||||
# If type equal instance, then look into the instances definition
|
||||
IF link.type == "instance";
|
||||
FOR conn_instance IN instances;
|
||||
NEXT UNLESS conn_instance.name == link.name;
|
||||
FOR iface IN conn_instance.interfaces;
|
||||
NEXT UNLESS iface.name == link_interface.name;
|
||||
NEXT UNLESS iface.type.grep('^' _ link_interface.type _ '$').size();
|
||||
NEXT UNLESS iface.ip;
|
||||
out.push(iface.ip);
|
||||
END;
|
||||
END;
|
||||
# If type equal host, then look into the node interfaces definition
|
||||
ELSE;
|
||||
IF hosts.exists(link.name);
|
||||
argv.host = link.name;
|
||||
argv.type = link_interface.type;
|
||||
PROCESS "${argv.ngcpcfgdir}/get_all_shared_ips_for_host";
|
||||
IF !out.size;
|
||||
PROCESS "${argv.ngcpcfgdir}/get_all_ips_for_host";
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
|
||||
# It is assumed to have in the connections only one interface defined with a particular type
|
||||
LAST;
|
||||
END;
|
||||
END;
|
||||
|
||||
out = out.unique;
|
||||
|
||||
-%]
|
||||
@ -1,118 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Returns a list of RTP-enabled interfaces for rtpengine.
|
||||
#
|
||||
# @param argv.instance instance
|
||||
# @param argv.format The format of the returned list, one of:
|
||||
# "list" for plain list of interfaces,
|
||||
# "address" for plain list of addresses,
|
||||
# blank or "rtpengine" for full CLI options.
|
||||
# @param argv.status node status [ online, offline, inactive ]
|
||||
# default value: ['online', 'inactive']
|
||||
# @return out The array of interfaces.
|
||||
|
||||
X_format = argv.format;
|
||||
|
||||
IF ! X_format.defined || X_format == '';
|
||||
X_format = 'rtpengine';
|
||||
END;
|
||||
|
||||
IF !argv.status.size;
|
||||
argv.status = ['online', 'inactive'];
|
||||
END;
|
||||
|
||||
status = {
|
||||
online = 0
|
||||
offline = 0
|
||||
inactive = 0
|
||||
};
|
||||
FOREACH val IN argv.status;
|
||||
status.$val = 1;
|
||||
END;
|
||||
|
||||
out = [];
|
||||
RETURN UNLESS status.item(argv.instance.status);
|
||||
|
||||
FOREACH X_ifc IN argv.instance.interfaces;
|
||||
X_types = X_ifc.type.grep('^rtp_.');
|
||||
FOREACH X_type IN X_types;
|
||||
X_type = X_type.remove('^rtp_');
|
||||
|
||||
IF X_format == 'list';
|
||||
out.push(X_type);
|
||||
NEXT;
|
||||
END;
|
||||
|
||||
X_ips = X_ifc.shared_ip.list;
|
||||
IF !X_ips.size() || !X_ips.0.defined;
|
||||
X_ips = X_ifc.ip.list;
|
||||
END;
|
||||
X_adv_ips = X_ifc.advertised_ip.list;
|
||||
|
||||
X_suffix = 0;
|
||||
IF X_ips.size() > 1;
|
||||
X_suffix = 1;
|
||||
END;
|
||||
|
||||
FOREACH X_ip IN X_ips;
|
||||
X_adv_ip = X_adv_ips.shift();
|
||||
IF X_format == 'address';
|
||||
out.push(X_ip);
|
||||
ELSE;
|
||||
X_name = X_type;
|
||||
IF X_suffix;
|
||||
X_name = X_name _ ':' _ X_suffix;
|
||||
X_suffix = X_suffix + 1;
|
||||
END;
|
||||
IF X_format == 'objects';
|
||||
X_obj = {
|
||||
name = X_name
|
||||
address = X_ip
|
||||
adv_addr = X_adv_ip
|
||||
port_min = X_ifc.rtp_port_min || 0
|
||||
port_max = X_ifc.rtp_port_max || 0
|
||||
};
|
||||
out.push(X_obj);
|
||||
ELSE;
|
||||
out.push(X_name _ '/' _ X_ip _ (X_adv_ip ? ('!' _ X_adv_ip) : ''));
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
|
||||
X_ips = X_ifc.shared_v6ip.list;
|
||||
IF !X_ips.size() || !X_ips.0.defined;
|
||||
X_ips = X_ifc.v6ip.list;
|
||||
END;
|
||||
|
||||
X_suffix = 0;
|
||||
IF X_ips.size() > 1;
|
||||
X_suffix = 1;
|
||||
END;
|
||||
|
||||
FOREACH X_ip IN X_ips;
|
||||
IF X_format == 'address';
|
||||
out.push(X_ip);
|
||||
ELSE;
|
||||
X_name = X_type;
|
||||
IF X_suffix;
|
||||
X_name = X_name _ ':' _ X_suffix;
|
||||
X_suffix = X_suffix + 1;
|
||||
END;
|
||||
IF X_format == 'objects';
|
||||
X_obj = {
|
||||
name = X_name
|
||||
address = X_ip
|
||||
port_min = X_ifc.rtp_port_min || 0
|
||||
port_max = X_ifc.rtp_port_max || 0
|
||||
};
|
||||
out.push(X_obj);
|
||||
ELSE;
|
||||
out.push(X_name _ '/' _ X_ip);
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
END;
|
||||
|
||||
-%]
|
||||
@ -1,44 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Return an array of IPv6s from the interface of a given type
|
||||
# for an instance.
|
||||
# @param argv.instance instance
|
||||
# @param argv.type The interface type of a node to extract the IP
|
||||
# from, one of:
|
||||
# web_int, web_ext, sip_int, sip_ext, ...
|
||||
# @param argv.format Optional reformatting of IPv6 addresses.
|
||||
# @param argv.status node status [ online, offline, inactive ]
|
||||
# default value: ['online', 'inactive']
|
||||
# @return out The array of IPs.
|
||||
|
||||
IF !argv.status.size;
|
||||
argv.status = ['online', 'inactive'];
|
||||
END;
|
||||
|
||||
status = {
|
||||
online = 0
|
||||
offline = 0
|
||||
inactive = 0
|
||||
};
|
||||
FOREACH val IN argv.status;
|
||||
status.$val = 1;
|
||||
END;
|
||||
|
||||
out = [];
|
||||
RETURN UNLESS status.item(argv.instance.status);
|
||||
|
||||
FOREACH iface IN argv.instance.interfaces;
|
||||
NEXT UNLESS iface.type.grep('^' _ argv.type _ '$').size();
|
||||
NEXT UNLESS iface.v6ip;
|
||||
IF argv.format == 'expand';
|
||||
ip = ngcp.net_ip_expand(iface.v6ip);
|
||||
ELSE;
|
||||
ip = iface.v6ip;
|
||||
END;
|
||||
out.push(ip);
|
||||
END;
|
||||
|
||||
out = out.sort.unique;
|
||||
|
||||
-%]
|
||||
@ -1,71 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Only for usage with instances setup, and only to be used on Proxy / LB hosts.
|
||||
#
|
||||
# Returns a list of prepared records for /etc/hosts file.
|
||||
# It differentiates PRO and Carrier setups automatically and fills
|
||||
# the records accordingly to the setup type.
|
||||
# If the NGCP setup has no instances, script will return an empty list.
|
||||
|
||||
out = [];
|
||||
|
||||
proxy_role = 'proxy';
|
||||
lb_role = 'lb';
|
||||
|
||||
sql_role = 'db';
|
||||
nosql_role = 'db';
|
||||
|
||||
iface_marker = 'ha_int';
|
||||
|
||||
hostname = ngcp.get_hostname();
|
||||
is_lb = ngcp.has_role(hostname, lb_role);
|
||||
is_proxy = ngcp.has_role(hostname, proxy_role);
|
||||
|
||||
# if this host where the script is running, is not a Proxy/LB node, skip further execution
|
||||
IF instances.defined && instances.size > 0 && (is_proxy || is_lb);
|
||||
|
||||
hostnames_records_sql = [];
|
||||
hostnames_records_nosql = [];
|
||||
|
||||
# get my ha ip (not a shared ip)
|
||||
argv.host = hostname;
|
||||
argv.type = iface_marker;
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
my_ha_ip = out.0;
|
||||
|
||||
FOREACH host IN hosts.keys.sort;
|
||||
this_host_has_sql_role = ngcp.has_role(host, sql_role);
|
||||
this_host_has_nosql_role = ngcp.has_role(host, nosql_role);
|
||||
this_host_has_proxy_role = ngcp.has_role(host, proxy_role);
|
||||
this_host_has_lb_role = ngcp.has_role(host, lb_role);
|
||||
|
||||
IF is_proxy && (this_host_has_sql_role || this_host_has_nosql_role);
|
||||
argv.host = host;
|
||||
argv.type = iface_marker;
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
|
||||
IF this_host_has_sql_role && out.0;
|
||||
hostnames_records_sql.push(out.0 _ ' db.central.' _ host);
|
||||
END;
|
||||
IF this_host_has_nosql_role && out.0;
|
||||
hostnames_records_nosql.push(out.0 _ ' nosql.central.' _ host);
|
||||
END;
|
||||
END;
|
||||
|
||||
IF is_proxy && this_host_has_proxy_role;
|
||||
hostnames_records_sql.push(my_ha_ip _ ' db.replicatedpair.' _ host);
|
||||
hostnames_records_sql.push(my_ha_ip _ ' db.replicatedcentral.' _ host);
|
||||
END;
|
||||
|
||||
IF (is_proxy && this_host_has_proxy_role) || (is_lb && this_host_has_lb_role);
|
||||
hostnames_records_nosql.push(my_ha_ip _ ' nosql.replicatedpair.' _ host);
|
||||
END;
|
||||
END;
|
||||
|
||||
out = hostnames_records_nosql.merge(hostnames_records_sql);
|
||||
END;
|
||||
|
||||
out = out.unique.sort;
|
||||
|
||||
-%]
|
||||
@ -1,31 +0,0 @@
|
||||
[%
|
||||
# vi: ft=tt2
|
||||
|
||||
# Returns a list of instances for a service.
|
||||
#
|
||||
# @param argv.service instance service name.
|
||||
# @param argv.status instance status [ online, offline ],
|
||||
# default value: [ 'online' ].
|
||||
# @return out Hash of instance lists per service.
|
||||
|
||||
IF !argv.status.size;
|
||||
argv.status = [ 'online' ];
|
||||
END;
|
||||
|
||||
status = {
|
||||
online = 0
|
||||
offline = 0
|
||||
};
|
||||
FOREACH val IN argv.status;
|
||||
status.$val = 1;
|
||||
END;
|
||||
|
||||
out = [];
|
||||
FOREACH instance IN instances;
|
||||
NEXT UNLESS status.item(instance.status);
|
||||
NEXT UNLESS instance.service.replace('-', '_') == argv.service;
|
||||
|
||||
out.push(instance);
|
||||
END;
|
||||
|
||||
-%]
|
||||
@ -1,206 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use open qw(:std :encoding(UTF-8));
|
||||
|
||||
use Storable qw(dclone);
|
||||
use List::Util qw(any none first);
|
||||
use Getopt::Long qw(:config posix_default no_ignorecase auto_help auto_version);
|
||||
use Pod::Usage;
|
||||
use YAML::XS qw();
|
||||
use Kwalify;
|
||||
|
||||
our $VERSION = 'UNRELEASED';
|
||||
|
||||
my $network_file = '/etc/ngcp-config/network.yml';
|
||||
|
||||
GetOptions(
|
||||
'n|network-file=s' => \$network_file,
|
||||
) or pod2usage(1);
|
||||
|
||||
my $yaml = YAML::XS::LoadFile($network_file)
|
||||
or die "cannot parse file $network_file";
|
||||
|
||||
sub dup_check
|
||||
{
|
||||
my ($dupe, $text) = @_;
|
||||
my $errors = 0;
|
||||
|
||||
foreach my $id (sort keys %{$dupe}) {
|
||||
next if scalar @{$dupe->{$id}} <= 1;
|
||||
|
||||
warn " - $text $id (@{$dupe->{$id}})\n";
|
||||
$errors++;
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
# Only run these checks, if we have any of instances defined.
|
||||
if (exists $yaml->{instances}) {
|
||||
my $errors = 0;
|
||||
|
||||
my %dupe_instance_name;
|
||||
my %dupe_conn;
|
||||
|
||||
my @instance_names = map { $_->{name} } @{$yaml->{instances}};
|
||||
my @host_names = sort keys %{$yaml->{hosts}};
|
||||
|
||||
my $i = 0;
|
||||
|
||||
# Cycle through all existing instances definitions to find mistakes in
|
||||
# connections.
|
||||
foreach my $instance (@{$yaml->{instances}}) {
|
||||
my $instance_host = $instance->{host};
|
||||
my $j = 0;
|
||||
|
||||
# Just in case, catch name duplicates used for general instances names.
|
||||
push @{$dupe_instance_name{$instance->{name}}}, "instance number: $i";
|
||||
|
||||
# Iterate through the list of connections.
|
||||
foreach my $conn (@{$instance->{connections}}) {
|
||||
# Catch connections names duplicates of each given instance.
|
||||
my $conn_id = '#' . $i . ' : ' . $instance->{name} . ': ' . $conn->{name};
|
||||
push @{$dupe_conn{$conn_id}}, "con #$j: $conn->{name} ;";
|
||||
|
||||
# Iterate through the list of connection links.
|
||||
foreach my $conn_link (@{$conn->{links}}) {
|
||||
my $conn_link_name = $conn_link->{name};
|
||||
my $remote;
|
||||
|
||||
# Check that each connection of type instance/host indeed
|
||||
# exists.
|
||||
if ($conn_link->{type} eq 'instance') {
|
||||
if (none { $_ eq $conn_link_name } @instance_names) {
|
||||
warn " - [instances/$instance->{name}/$conn->{name}/$conn_link_name] Missing required instance for connection link\n";
|
||||
$errors ++;
|
||||
}
|
||||
$remote = first { $_->{name} eq $conn_link_name } @{$yaml->{instances}};
|
||||
} elsif ($conn_link->{type} eq 'host') {
|
||||
if (none { $_ eq $conn_link_name } @host_names) {
|
||||
warn " - [instances/$instance->{name}/$conn->{name}/$conn_link_name] Missing required host for connection link\n";
|
||||
$errors ++;
|
||||
}
|
||||
$remote = $yaml->{hosts}->{$conn_link_name};
|
||||
}
|
||||
|
||||
# Iterate through the list of link interfaces.
|
||||
foreach my $link_iface (@{$conn_link->{interfaces}}) {
|
||||
my $link_iface_name = $link_iface->{name};
|
||||
my $link_iface_type = $link_iface->{type};
|
||||
|
||||
# Requested link must indeed have requested interface,
|
||||
# otherwise not possible to interconnect.
|
||||
if ($conn_link->{type} eq 'instance' ?
|
||||
none { $_->{name} eq $link_iface_name } @{$remote->{interfaces}} :
|
||||
none { $_ eq $link_iface_name } @{$remote->{interfaces}})
|
||||
{
|
||||
warn " - [instances/$instance->{name}/$conn->{name}/$conn_link_name/$link_iface_name] Missing required link interface\n";
|
||||
$errors ++;
|
||||
}
|
||||
|
||||
# Check type interface
|
||||
my $iface;
|
||||
if ($conn_link->{type} eq 'instance') {
|
||||
$iface = first { $_->{name} eq $link_iface_name } @{$remote->{interfaces}};
|
||||
} else {
|
||||
$iface = $remote->{$link_iface_name};
|
||||
}
|
||||
if (none { $_ eq $link_iface_type } @{$iface->{type}}) {
|
||||
warn " - [instances/$instance->{name}/$conn->{name}/$conn_link_name/$link_iface_name] Missing type $link_iface_type on link interface\n";
|
||||
$errors ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$j++;
|
||||
}
|
||||
|
||||
# Just in case, check also that a host, on which we must run this
|
||||
# instance, exists.
|
||||
if (none { $_ eq $instance_host } @host_names) {
|
||||
warn " - [instances/$instance->{name}] Missing required host $instance_host\n";
|
||||
$errors ++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
# Check duplicates and raise an error if found.
|
||||
$errors += dup_check(\%dupe_instance_name, '[/instances/<name>] Duplicate instance name with an existing instance');
|
||||
$errors += dup_check(\%dupe_conn, '[/instances/<name>] Duplicate connetion name');
|
||||
|
||||
exit 1 if $errors;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: ts=4 sw=4 et
|
||||
|
||||
__END__
|
||||
|
||||
=encoding utf-8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ngcp-instances-validator - dynamically validates the instances connections, if instances are defined.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<ngcp-instances-validator> [I<option>...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<This program> iterates through currently existing instances
|
||||
defined in the network.yml with an intention of checking their
|
||||
connections to other instances/hosts.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<-n>, B<--network-file> I<yaml-file>
|
||||
|
||||
The B<network.yml> file to validate.
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print a help message.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXIT STATUS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<0>
|
||||
|
||||
The connections are getting validated correctly.
|
||||
|
||||
=item B<1>
|
||||
|
||||
The connections are getting validated incorrectly.
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Donat Zenichev <dzenichev@sipwise.com>
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Copyright © 2022 Sipwise GmbH, Austria
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@ -1,17 +0,0 @@
|
||||
name: instances.yml
|
||||
desc: Kwalify schema for NGCP instances.yml
|
||||
type: map
|
||||
mapping:
|
||||
"sources":
|
||||
type: seq
|
||||
required: yes
|
||||
sequence:
|
||||
- type: map
|
||||
required: yes
|
||||
mapping:
|
||||
"orig": { type: str, required: yes,
|
||||
desc: "Specify the original service pathname." }
|
||||
"dest": { type: str, required: yes,
|
||||
desc: "Specify the destination service pathname." }
|
||||
"label": { type: str, required: yes,
|
||||
desc: "Specify service label." }
|
||||
@ -1,65 +0,0 @@
|
||||
#!KAMAILIO
|
||||
[%
|
||||
###################################################
|
||||
# Get the hostname of the node
|
||||
###################################################
|
||||
# hostname
|
||||
hostname = ngcp.get_hostname();
|
||||
IF ! hosts.$hostname.size;
|
||||
hostname = "self";
|
||||
ELSE;
|
||||
pairname = ngcp.get_pairname(hostname);
|
||||
END;
|
||||
- %]
|
||||
# [% hostname %]
|
||||
[% IF instance_info -%]
|
||||
#!define INSTANCE [% instance_info.name %]
|
||||
[% END -%]
|
||||
#!ifndef INSTANCE
|
||||
# external interfaces
|
||||
[% FOREACH iface IN hosts.$hostname.interfaces.sort -%]
|
||||
[% FOREACH type IN hosts.$hostname.$iface.type.sort -%]
|
||||
[% IF type == "sip_ext" -%]
|
||||
[%
|
||||
IF hosts.$hostname.$iface.shared_ip.0.size;
|
||||
ip_address=hosts.$hostname.$iface.shared_ip.0;
|
||||
ELSE;
|
||||
ip_address=hosts.$hostname.$iface.ip;
|
||||
END;
|
||||
-%]
|
||||
listen=udp:[% ip_address %]:[% kamailio.lb.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.port %][% END %]
|
||||
listen=tcp:[% ip_address %]:[% kamailio.lb.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.port %][% END %]
|
||||
[% IF ENABLE_TLS -%]
|
||||
listen=tls:[% ip_address %]:[% kamailio.lb.tls.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.tls.port %][% END %]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
#!else
|
||||
[%
|
||||
argv.instance = instance_info;
|
||||
argv.type = 'sip_ext';
|
||||
PROCESS '../lib/get_all_ips_for_instance';
|
||||
sip_ext_ips = out;
|
||||
|
||||
argv.type = 'sip_int';
|
||||
PROCESS '../lib/get_all_ips_for_instance';
|
||||
sip_int_ips = out;
|
||||
-%]
|
||||
# external interfaces
|
||||
[% FOREACH ip IN sip_ext_ips -%]
|
||||
listen=udp:[% ip %]:[% kamailio.lb.port %]
|
||||
listen=tcp:[% ip %]:[% kamailio.lb.port %]
|
||||
[% IF ENABLE_TLS -%]
|
||||
listen=tls:[% ip %]:[% kamailio.lb.tls.port %]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
# internal interfaces
|
||||
[% FOREACH ip IN sip_int_ips -%]
|
||||
listen=udp:[% ip %]:[% kamailio.lb.port %]
|
||||
listen=tcp:[% ip %]:[% kamailio.lb.port %]
|
||||
[% END -%]
|
||||
[% IF instance_info.name == 'B' -%]
|
||||
## This is a change only for B instance
|
||||
[% END -%]
|
||||
#!endif
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "INSTANCE_NAME:${INSTANCE_NAME:-}" > \
|
||||
"${OUTPUT_DIRECTORY:-/tmp}/ngcpcfg.service${INSTANCE_NAME:-}"
|
||||
@ -1 +0,0 @@
|
||||
|
||||
@ -1 +0,0 @@
|
||||
# Autogenerated by ngcpcfg
|
||||
@ -1,62 +0,0 @@
|
||||
#!KAMAILIO
|
||||
[%
|
||||
###################################################
|
||||
# Get the hostname of the node
|
||||
###################################################
|
||||
# hostname
|
||||
hostname = ngcp.get_hostname();
|
||||
IF ! hosts.$hostname.size;
|
||||
hostname = "self";
|
||||
ELSE;
|
||||
pairname = ngcp.get_pairname(hostname);
|
||||
END;
|
||||
- %]
|
||||
# [% hostname %]
|
||||
[% IF instance_info -%]
|
||||
#!define INSTANCE [% instance_info.name %]
|
||||
[% END -%]
|
||||
#!ifndef INSTANCE
|
||||
# external interfaces
|
||||
[% FOREACH iface IN hosts.$hostname.interfaces.sort -%]
|
||||
[% FOREACH type IN hosts.$hostname.$iface.type.sort -%]
|
||||
[% IF type == "sip_ext" -%]
|
||||
[%
|
||||
IF hosts.$hostname.$iface.shared_ip.0.size;
|
||||
ip_address=hosts.$hostname.$iface.shared_ip.0;
|
||||
ELSE;
|
||||
ip_address=hosts.$hostname.$iface.ip;
|
||||
END;
|
||||
-%]
|
||||
listen=udp:[% ip_address %]:[% kamailio.lb.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.port %][% END %]
|
||||
listen=tcp:[% ip_address %]:[% kamailio.lb.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.port %][% END %]
|
||||
[% IF ENABLE_TLS -%]
|
||||
listen=tls:[% ip_address %]:[% kamailio.lb.tls.port %][% IF hosts.$hostname.$iface.advertised_ip.0.size %] advertise [% hosts.$hostname.$iface.advertised_ip.0 %]:[% kamailio.lb.tls.port %][% END %]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
#!else
|
||||
[%
|
||||
argv.instance = instance_info;
|
||||
argv.type = 'sip_ext';
|
||||
PROCESS '../lib/get_all_ips_for_instance';
|
||||
sip_ext_ips = out;
|
||||
|
||||
argv.type = 'sip_int';
|
||||
PROCESS '../lib/get_all_ips_for_instance';
|
||||
sip_int_ips = out;
|
||||
-%]
|
||||
# external interfaces
|
||||
[% FOREACH ip IN sip_ext_ips -%]
|
||||
listen=udp:[% ip %]:[% kamailio.lb.port %]
|
||||
listen=tcp:[% ip %]:[% kamailio.lb.port %]
|
||||
[% IF ENABLE_TLS -%]
|
||||
listen=tls:[% ip %]:[% kamailio.lb.tls.port %]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
# internal interfaces
|
||||
[% FOREACH ip IN sip_int_ips -%]
|
||||
listen=udp:[% ip %]:[% kamailio.lb.port %]
|
||||
listen=tcp:[% ip %]:[% kamailio.lb.port %]
|
||||
[% END -%]
|
||||
#!endif
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "INSTANCE_NAME:${INSTANCE_NAME:-}" > \
|
||||
"${OUTPUT_DIRECTORY:-/tmp}/ngcpcfg.service${INSTANCE_NAME:-}"
|
||||
@ -1,2 +0,0 @@
|
||||
#!KAMAILIO
|
||||
# [% instance_info.name %]
|
||||
@ -1 +0,0 @@
|
||||
#!KAMAILIO
|
||||
@ -1,34 +0,0 @@
|
||||
[%
|
||||
###################################################
|
||||
# Get the hostname of the node
|
||||
###################################################
|
||||
# hostname
|
||||
hostname = ngcp.get_hostname();
|
||||
IF ! hosts.$hostname.size;
|
||||
hostname = "self";
|
||||
ELSE;
|
||||
pairname = ngcp.get_pairname(hostname);
|
||||
END;
|
||||
- %]
|
||||
# [% hostname %]
|
||||
[% IF instance_info -%]
|
||||
# [% instance_info.name %]
|
||||
[%
|
||||
# Get connection information for LB
|
||||
# sip_*_primary_ips: list of primary * instances to select
|
||||
# If not specified set sip_proxy_primary_ips equal to sip_proxy_ips
|
||||
argv.connection = instance_info.connections;
|
||||
argv.name = 'proxy';
|
||||
argv.type = 'sip_int';
|
||||
argv.ngcpcfgdir = '../lib';
|
||||
PROCESS '../lib/get_all_ips_of_connection_for_instance';
|
||||
sip_proxy_primary_ips = out;
|
||||
IF out_algorithm != '';
|
||||
proxy_algorithm = algorithm.out_algorithm;
|
||||
END;
|
||||
|
||||
FOR ip IN sip_proxy_primary_ips.sort;
|
||||
-%]
|
||||
ip=[% ip %]
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
@ -1,57 +0,0 @@
|
||||
[%
|
||||
hostname = ngcp.get_hostname();
|
||||
peername = ngcp.get_peername(hostname);
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'ha_int';
|
||||
PROCESS '../lib/get_iface';
|
||||
host_ha_iface = out;
|
||||
|
||||
argv.host = peername;
|
||||
argv.type = 'ha_int';
|
||||
PROCESS '../lib/get_iface';
|
||||
peer_ha_iface = out;
|
||||
|
||||
IF !instance_info.defined;
|
||||
argv.host = hostname;
|
||||
argv.type = 'sip_int';
|
||||
PROCESS '../lib/get_all_shared_ips_for_host';
|
||||
sip_int_ips = out;
|
||||
IF !sip_int_ips.size;
|
||||
argv.host = hostname;
|
||||
argv.type = 'sip_int';
|
||||
PROCESS '../lib/get_all_ips_for_host';
|
||||
sip_int_ips = out;
|
||||
END;
|
||||
|
||||
argv.host = hostname;
|
||||
PROCESS '../lib/get_all_rtp_for_host';
|
||||
ELSE;
|
||||
# instance
|
||||
argv.instance = instance_info;
|
||||
argv.type = 'sip_int';
|
||||
PROCESS '../lib/get_all_ips_for_instance';
|
||||
sip_int_ips = out;
|
||||
|
||||
argv.instance = instance_info;
|
||||
PROCESS '../lib/get_all_rtp_for_instance';
|
||||
END;
|
||||
interfaces = [];
|
||||
int_interfaces = [];
|
||||
FOREACH interface IN out;
|
||||
IF interface.match('^int\/');
|
||||
int_interfaces.push(interface);
|
||||
ELSE;
|
||||
interfaces.push(interface);
|
||||
END;
|
||||
END;
|
||||
|
||||
-%]
|
||||
[rtpengine[% instance_info.name %]]
|
||||
host_ha_iface=[% host_ha_iface %]
|
||||
peer_ha_iface=[% peer_ha_iface %]
|
||||
|
||||
[% FOR ip IN sip_int_ips.sort -%]
|
||||
sip_int_ips=[% ip %]
|
||||
[% END -%]
|
||||
interface=[% interfaces.sort.join(';') %]
|
||||
@ -1 +0,0 @@
|
||||
|
||||
@ -1,243 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp3
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp2
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
- name: D
|
||||
service: sems-b2b
|
||||
host: sp1
|
||||
label: b2b
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.205
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
links:
|
||||
- type: instance
|
||||
name: PROXD
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: lb
|
||||
links:
|
||||
- type: instance
|
||||
name: LBB
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: neth2
|
||||
type: sip_ext
|
||||
@ -1,243 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp2
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp2
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
- name: D
|
||||
service: sems-b2b
|
||||
host: sp1
|
||||
label: b2b
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.205
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: lb
|
||||
links:
|
||||
- type: instance
|
||||
name: A
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: neth2
|
||||
type: sip_ext
|
||||
@ -1,243 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp2
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp2
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
- name: D
|
||||
service: sems-b2b
|
||||
host: sp1
|
||||
label: b2b
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.205
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: proxy
|
||||
links:
|
||||
- type: instance
|
||||
name: A
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: neth2
|
||||
type: sip_ext
|
||||
@ -1,216 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp2
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: fake
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp3
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
@ -1,216 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp2
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_X
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp2
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_X
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
@ -1,60 +0,0 @@
|
||||
# directory name where ngcpcfg is managed through git
|
||||
[ -n "${NGCPCTL_BASE:-}" ] || NGCPCTL_BASE="$(pwd)/"
|
||||
[ -n "${NGCPCTL_MAIN:-}" ] || NGCPCTL_MAIN="${NGCPCTL_BASE}/fixtures/repos/"
|
||||
[ -n "${NGCPCTL_CONFIG:-}" ] || NGCPCTL_CONFIG="${NGCPCTL_MAIN}/config.yml"
|
||||
[ -n "${NODE_CONFIG:-}" ] || NODE_CONFIG="${NGCPCTL_MAIN}/config.node.yml"
|
||||
[ -n "${PAIR_CONFIG:-}" ] || PAIR_CONFIG="${NGCPCTL_MAIN}/config.pair.yml"
|
||||
[ -n "${HOST_CONFIG:-}" ] || HOST_CONFIG="${NGCPCTL_MAIN}/config.web01a.yml"
|
||||
[ -n "${LOCAL_CONFIG:-}" ] || LOCAL_CONFIG="${NGCPCTL_MAIN}/constants_local_carrier.yml"
|
||||
[ -n "${CONSTANTS_CONFIG:-}" ] || CONSTANTS_CONFIG="${NGCPCTL_MAIN}/constants.yml"
|
||||
[ -n "${MAINTENANCE_CONFIG:-}" ] ||MAINTENANCE_CONFIG="${NGCPCTL_MAIN}/maintenance.yml"
|
||||
[ -n "${NETWORK_CONFIG:-}" ] || NETWORK_CONFIG="${NGCPCTL_MAIN}/network_carrier_instances.yml"
|
||||
[ -n "${RTP_INTERFACES_CONFIG:-}" ] || RTP_INTERFACES_CONFIG="/etc/ngcp-rtpengine-daemon/interfaces.yml"
|
||||
[ -n "${EXTRA_CONFIG_DIR:-}" ] || EXTRA_CONFIG_DIR="${NGCPCTL_MAIN}/config.d/"
|
||||
|
||||
# configuration dirs that should be managed
|
||||
[ -n "${CONFIG_POOL:-}" ] || CONFIG_POOL='/etc /var'
|
||||
|
||||
# location of templates
|
||||
[ -n "${TEMPLATE_POOL_BASE:-}" ] || TEMPLATE_POOL_BASE="${NGCPCTL_MAIN}/templates"
|
||||
|
||||
# location of service definitions
|
||||
[ -n "${SERVICES_POOL_BASE:-}" ] || SERVICES_POOL_BASE="${NGCPCTL_MAIN}/templates"
|
||||
|
||||
# location of sites info for templates
|
||||
[ -n "${SITES_DIR:-}" ] || SITES_DIR="${NGCPCTL_MAIN}/sites"
|
||||
[ -n "${SITES_CONFIG:-}" ] || SITES_CONFIG="${NGCPCTL_MAIN}/sites.yml"
|
||||
|
||||
# location of instances info for templates
|
||||
[ -n "${TEMPLATE_INSTANCES:-}" ] || TEMPLATE_INSTANCES="${NGCPCTL_MAIN}/instances.yml"
|
||||
|
||||
# timestamp format for console output
|
||||
[ -n "${TIME_FORMAT:-}" ] || TIME_FORMAT="+%F %T"
|
||||
|
||||
# Run-time state directory
|
||||
[ -n "${RUN_DIR:-}" ] || RUN_DIR='/run'
|
||||
|
||||
# directory holding files for internal state of ngcpcfg
|
||||
[ -n "${STATE_FILES_DIR:-}" ] || STATE_FILES_DIR='/var/lib/ngcpcfg/state/'
|
||||
|
||||
# validate configs using kwalify schema
|
||||
[ -n "${VALIDATE_SCHEMA:-}" ] || VALIDATE_SCHEMA="false"
|
||||
|
||||
# file ownership and permissions for YML files
|
||||
[ -n "${CONFIG_USER:-}" ] || CONFIG_USER="root"
|
||||
[ -n "${CONFIG_GROUP:-}" ] || CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${CONFIG_CHMOD:-}" ] || CONFIG_CHMOD="0660"
|
||||
[ -n "${CONSTANTS_CONFIG_USER:-}" ] || CONSTANTS_CONFIG_USER="root"
|
||||
[ -n "${CONSTANTS_CONFIG_GROUP:-}" ] || CONSTANTS_CONFIG_GROUP="root"
|
||||
[ -n "${CONSTANTS_CONFIG_CHMOD:-}" ] || CONSTANTS_CONFIG_CHMOD="0600"
|
||||
[ -n "${MAINTENANCE_CONFIG_USER:-}" ] || MAINTENANCE_CONFIG_USER="root"
|
||||
[ -n "${MAINTENANCE_CONFIG_GROUP:-}" ] || MAINTENANCE_CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${MAINTENANCE_CONFIG_CHMOD:-}" ] || MAINTENANCE_CONFIG_CHMOD="0660"
|
||||
[ -n "${NETWORK_CONFIG_USER:-}" ] || NETWORK_CONFIG_USER="root"
|
||||
[ -n "${NETWORK_CONFIG_GROUP:-}" ] || NETWORK_CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${NETWORK_CONFIG_CHMOD:-}" ] || NETWORK_CONFIG_CHMOD="0660"
|
||||
|
||||
[ -n "${HOST_FILE:-}" ] || HOST_FILE='.web01a'
|
||||
[ -n "${PAIR_FILE:-}" ] || PAIR_FILE='.web01'
|
||||
|
||||
## END OF FILE #################################################################
|
||||
@ -1,56 +0,0 @@
|
||||
# directory name where ngcpcfg is managed through git
|
||||
[ -n "${NGCPCTL_BASE:-}" ] || NGCPCTL_BASE="$(pwd)/"
|
||||
[ -n "${NGCPCTL_MAIN:-}" ] || NGCPCTL_MAIN="${NGCPCTL_BASE}/fixtures/repos/"
|
||||
[ -n "${NGCPCTL_CONFIG:-}" ] || NGCPCTL_CONFIG="${NGCPCTL_MAIN}/config.yml"
|
||||
[ -n "${NODE_CONFIG:-}" ] || NODE_CONFIG="${NGCPCTL_MAIN}/config.node.yml"
|
||||
[ -n "${PAIR_CONFIG:-}" ] || PAIR_CONFIG="${NGCPCTL_MAIN}/config.pair.yml"
|
||||
[ -n "${HOST_CONFIG:-}" ] || HOST_CONFIG="${NGCPCTL_MAIN}/config.sp1.yml"
|
||||
[ -n "${LOCAL_CONFIG:-}" ] || LOCAL_CONFIG="${NGCPCTL_MAIN}/constants_local_pro.yml"
|
||||
[ -n "${CONSTANTS_CONFIG:-}" ] || CONSTANTS_CONFIG="${NGCPCTL_MAIN}/constants.yml"
|
||||
[ -n "${MAINTENANCE_CONFIG:-}" ] || MAINTENANCE_CONFIG="${NGCPCTL_MAIN}/maintenance.yml"
|
||||
[ -n "${NETWORK_CONFIG:-}" ] || NETWORK_CONFIG="${NGCPCTL_MAIN}/network_pro_instances.yml"
|
||||
[ -n "${RTP_INTERFACES_CONFIG:-}" ] || RTP_INTERFACES_CONFIG="/etc/ngcp-rtpengine-daemon/interfaces.yml"
|
||||
[ -n "${EXTRA_CONFIG_DIR:-}" ] || EXTRA_CONFIG_DIR="${NGCPCTL_MAIN}/config.d/"
|
||||
|
||||
# configuration dirs that should be managed
|
||||
[ -n "${CONFIG_POOL:-}" ] || CONFIG_POOL='/etc /var'
|
||||
|
||||
# location of templates
|
||||
[ -n "${TEMPLATE_POOL_BASE:-}" ] || TEMPLATE_POOL_BASE="${NGCPCTL_MAIN}/templates"
|
||||
|
||||
# location of service definitions
|
||||
[ -n "${SERVICES_POOL_BASE:-}" ] || SERVICES_POOL_BASE="${NGCPCTL_MAIN}/templates"
|
||||
|
||||
# location of sites info for templates
|
||||
[ -n "${SITES_DIR:-}" ] || SITES_DIR="${NGCPCTL_MAIN}/sites"
|
||||
[ -n "${SITES_CONFIG:-}" ] || SITES_CONFIG="${NGCPCTL_MAIN}/sites.yml"
|
||||
|
||||
# timestamp format for console output
|
||||
[ -n "${TIME_FORMAT:-}" ] || TIME_FORMAT="+%F %T"
|
||||
|
||||
# Run-time state directory
|
||||
[ -n "${RUN_DIR:-}" ] || RUN_DIR='/run'
|
||||
|
||||
# directory holding files for internal state of ngcpcfg
|
||||
[ -n "${STATE_FILES_DIR:-}" ] || STATE_FILES_DIR='/var/lib/ngcpcfg/state/'
|
||||
|
||||
# validate configs using kwalify schema
|
||||
[ -n "${VALIDATE_SCHEMA:-}" ] || VALIDATE_SCHEMA="false"
|
||||
|
||||
# file ownership and permissions for YML files
|
||||
[ -n "${CONFIG_USER:-}" ] || CONFIG_USER="root"
|
||||
[ -n "${CONFIG_GROUP:-}" ] || CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${CONFIG_CHMOD:-}" ] || CONFIG_CHMOD="0660"
|
||||
[ -n "${CONSTANTS_CONFIG_USER:-}" ] || CONSTANTS_CONFIG_USER="root"
|
||||
[ -n "${CONSTANTS_CONFIG_GROUP:-}" ] || CONSTANTS_CONFIG_GROUP="root"
|
||||
[ -n "${CONSTANTS_CONFIG_CHMOD:-}" ] || CONSTANTS_CONFIG_CHMOD="0600"
|
||||
[ -n "${MAINTENANCE_CONFIG_USER:-}" ] || MAINTENANCE_CONFIG_USER="root"
|
||||
[ -n "${MAINTENANCE_CONFIG_GROUP:-}" ] || MAINTENANCE_CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${MAINTENANCE_CONFIG_CHMOD:-}" ] || MAINTENANCE_CONFIG_CHMOD="0660"
|
||||
[ -n "${NETWORK_CONFIG_USER:-}" ] || NETWORK_CONFIG_USER="root"
|
||||
[ -n "${NETWORK_CONFIG_GROUP:-}" ] || NETWORK_CONFIG_GROUP="_ngcp-admin"
|
||||
[ -n "${NETWORK_CONFIG_CHMOD:-}" ] || NETWORK_CONFIG_CHMOD="0660"
|
||||
|
||||
[ -n "${NODE_FILE:-}" ] || NODE_FILE='.sp1'
|
||||
|
||||
## END OF FILE #################################################################
|
||||
@ -1,25 +0,0 @@
|
||||
---
|
||||
instance_info:
|
||||
connections:
|
||||
- algorithm: serial
|
||||
links:
|
||||
- interfaces:
|
||||
- name: vlan1720
|
||||
type: sip_int
|
||||
name: C
|
||||
type: instance
|
||||
name: proxy
|
||||
host: lb01b
|
||||
interfaces:
|
||||
- ip: 172.30.52.204
|
||||
name: vlan1719
|
||||
type:
|
||||
- sip_ext
|
||||
- ip: 172.30.52.146
|
||||
name: vlan1720
|
||||
type:
|
||||
- sip_int
|
||||
label: lb
|
||||
name: A
|
||||
service: kamailio-lb
|
||||
status: online
|
||||
@ -1,6 +0,0 @@
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_A:A
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_B:B
|
||||
/etc/momo:/etc/momo_A:A
|
||||
/etc/momo:/etc/momo_B:B
|
||||
/etc/other/lb:/etc/other/lb_A:A
|
||||
/etc/other/lb:/etc/other/lb_B:B
|
||||
@ -1,2 +0,0 @@
|
||||
/etc/kamailio/lb/db:/etc/kamailio/lb_A/db:A
|
||||
/etc/kamailio/lb/db:/etc/kamailio/lb_B/db:B
|
||||
@ -1,2 +0,0 @@
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_A:A
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_B:B
|
||||
@ -1,6 +0,0 @@
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_A:A
|
||||
/etc/kamailio/lb:/etc/kamailio/lb_B:B
|
||||
/etc/momo:/etc/momo_A:A
|
||||
/etc/momo:/etc/momo_B:B
|
||||
/etc/other/lb:/etc/other/lb_A:A
|
||||
/etc/other/lb:/etc/other/lb_B:B
|
||||
@ -1,2 +0,0 @@
|
||||
#!KAMAILIO
|
||||
# B
|
||||
@ -1,10 +0,0 @@
|
||||
#!KAMAILIO
|
||||
# lb01a
|
||||
#!ifndef INSTANCE
|
||||
# external interfaces
|
||||
listen=udp:172.30.52.103:5060
|
||||
listen=tcp:172.30.52.103:5060
|
||||
#!else
|
||||
# external interfaces
|
||||
# internal interfaces
|
||||
#!endif
|
||||
@ -1,15 +0,0 @@
|
||||
#!KAMAILIO
|
||||
# lb01a
|
||||
#!define INSTANCE A
|
||||
#!ifndef INSTANCE
|
||||
# external interfaces
|
||||
listen=udp:172.30.52.103:5060
|
||||
listen=tcp:172.30.52.103:5060
|
||||
#!else
|
||||
# external interfaces
|
||||
listen=udp:172.30.52.204:5060
|
||||
listen=tcp:172.30.52.204:5060
|
||||
# internal interfaces
|
||||
listen=udp:172.30.52.146:5060
|
||||
listen=tcp:172.30.52.146:5060
|
||||
#!endif
|
||||
@ -1,15 +0,0 @@
|
||||
#!KAMAILIO
|
||||
# lb01a
|
||||
#!define INSTANCE B
|
||||
#!ifndef INSTANCE
|
||||
# external interfaces
|
||||
listen=udp:172.30.52.103:5060
|
||||
listen=tcp:172.30.52.103:5060
|
||||
#!else
|
||||
# external interfaces
|
||||
listen=udp:172.30.52.203:5060
|
||||
listen=tcp:172.30.52.203:5060
|
||||
# internal interfaces
|
||||
listen=udp:172.30.52.145:5060
|
||||
listen=tcp:172.30.52.145:5060
|
||||
#!endif
|
||||
@ -1,6 +0,0 @@
|
||||
[rtpengineA]
|
||||
host_ha_iface=vlan1721
|
||||
peer_ha_iface=vlan1721
|
||||
|
||||
sip_int_ips=172.30.52.146
|
||||
interface=ext/172.30.52.199
|
||||
@ -1,9 +0,0 @@
|
||||
CARRIER_LB_IP='172.30.52.135 172.30.52.145 172.30.52.146'
|
||||
CARRIER_PRXS='prx01'
|
||||
SIPADDRESS='172.30.52.132'
|
||||
MGMT_SIP_IPS='172.30.52.141'
|
||||
|
||||
DISPATCHER_IPS="50;172.30.52.135;172.30.52.145;172.30.52.146 "
|
||||
declare -A DISPATCHER_IDS=(
|
||||
[default]=50
|
||||
)
|
||||
@ -0,0 +1,9 @@
|
||||
CARRIER_LB_IP=''
|
||||
CARRIER_PRXS='sp'
|
||||
SIPADDRESS=''
|
||||
MGMT_SIP_IPS='127.0.0.1'
|
||||
|
||||
DISPATCHER_IPS="50;127.0.0.1;127.0.0.1 "
|
||||
declare -A DISPATCHER_IDS=(
|
||||
[default]=50
|
||||
)
|
||||
@ -1,9 +0,0 @@
|
||||
CARRIER_LB_IP='192.168.255.250 192.168.255.253 192.168.255.254'
|
||||
CARRIER_PRXS='sp'
|
||||
SIPADDRESS='192.168.255.250'
|
||||
MGMT_SIP_IPS='192.168.255.250'
|
||||
|
||||
DISPATCHER_IPS="50;192.168.255.250;192.168.255.253;192.168.255.254 "
|
||||
declare -A DISPATCHER_IDS=(
|
||||
[default]=50
|
||||
)
|
||||
@ -1,3 +0,0 @@
|
||||
# lb01a
|
||||
# A
|
||||
ip=172.30.52.150
|
||||
@ -1,3 +0,0 @@
|
||||
# lb01a
|
||||
# B
|
||||
ip=172.30.52.138
|
||||
@ -1,3 +0,0 @@
|
||||
# sp1
|
||||
# A
|
||||
ip=192.168.255.249
|
||||
@ -1,3 +0,0 @@
|
||||
# sp1
|
||||
# B
|
||||
ip=192.168.255.250
|
||||
@ -1,14 +0,0 @@
|
||||
---
|
||||
sources:
|
||||
- orig: etc/kamailio/lb
|
||||
dest: etc/kamailio/lb_${INSTANCE_NAME}
|
||||
label: lb
|
||||
- orig: etc/other/lb
|
||||
dest: etc/other/lb_${INSTANCE_NAME}
|
||||
label: lb
|
||||
- orig: etc/momo
|
||||
dest: etc/momo_${INSTANCE_NAME}
|
||||
label: lb
|
||||
- orig: etc/rtpengine
|
||||
dest: etc/rtpengine_${INSTANCE_NAME}
|
||||
label: rtp
|
||||
@ -1,834 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
db01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '1'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: db01b
|
||||
role:
|
||||
- db
|
||||
status: online
|
||||
vlan1721:
|
||||
hwaddr: AA:7C:C0:DA:85:45
|
||||
ip: 172.30.52.180
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.179
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.183
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.185
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
db01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '2'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: db01a
|
||||
role:
|
||||
- db
|
||||
status: online
|
||||
vlan1721:
|
||||
hwaddr: BE:3A:47:A7:11:0D
|
||||
ip: 172.30.52.181
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.179
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.184
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.185
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- mon_ext
|
||||
vlan_raw_device: bond0
|
||||
lb01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '3'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1719
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: lb01b
|
||||
role:
|
||||
- lb
|
||||
status: online
|
||||
vlan1719:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.104
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.103
|
||||
type:
|
||||
- sip_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.136
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.135
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 46:78:04:52:C2:6C
|
||||
ip: 172.30.52.174
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.173
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.186
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.188
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
lb01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '4'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1719
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: lb01a
|
||||
role:
|
||||
- lb
|
||||
status: online
|
||||
vlan1719:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.105
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.103
|
||||
type:
|
||||
- sip_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.137
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.135
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: F2:5A:F1:41:B7:57
|
||||
ip: 172.30.52.175
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.173
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.187
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.188
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '5'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- vlan1722
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- rtp_int
|
||||
v6ip: ::1
|
||||
peer: prx01b
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: online
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.133
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.132
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1E:B7:5A:23:BD:FE
|
||||
ip: 172.30.52.171
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.170
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.197
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.196
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.189
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.191
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '6'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- vlan1722
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- rtp_int
|
||||
v6ip: ::1
|
||||
peer: prx01a
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: online
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.139
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.138
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1A:E6:67:D3:B3:34
|
||||
ip: 172.30.52.145
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.144
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.148
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.147
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.190
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.191
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx02a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '7'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- vlan1722
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- rtp_int
|
||||
v6ip: ::1
|
||||
peer: prx02b
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: inactive
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.140
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.138
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1E:B7:5A:23:BD:FA
|
||||
ip: 172.30.52.146
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.144
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.149
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.147
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.192
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.194
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx02b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '8'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- vlan1722
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- rtp_int
|
||||
v6ip: ::1
|
||||
peer: prx01a
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: inactive
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.134
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.132
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1A:E6:67:D3:B3:35
|
||||
ip: 172.30.52.172
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.170
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.198
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.196
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.193
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.194
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
web01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.1.2
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.1.1
|
||||
type:
|
||||
- boot_int
|
||||
dbnode: '9'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1718
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: web01b
|
||||
role:
|
||||
- mgmt
|
||||
status: online
|
||||
vlan1718:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.69
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.68
|
||||
type:
|
||||
- web_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.142
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.141
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: E2:67:FE:AB:0B:DE
|
||||
ip: 172.30.52.168
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.167
|
||||
type:
|
||||
- ha_int
|
||||
- web_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.180
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.182
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
web01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.1.3
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.1.1
|
||||
type:
|
||||
- boot_int
|
||||
dbnode: '10'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1718
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: web01a
|
||||
role:
|
||||
- mgmt
|
||||
status: online
|
||||
vlan1718:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.70
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.68
|
||||
type:
|
||||
- web_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.143
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.141
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 3A:79:8B:6A:A7:01
|
||||
ip: 172.30.52.169
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.167
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- web_int
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.181
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.182
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- mon_ext
|
||||
vlan_raw_device: bond0
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: lb01b
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: vlan1719
|
||||
ip: 172.30.52.204
|
||||
type:
|
||||
- sip_ext
|
||||
- name: vlan1720
|
||||
ip: 172.30.52.146
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: vlan1720
|
||||
type: sip_int
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: lb01a
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: vlan1719
|
||||
ip: 172.30.52.203
|
||||
type:
|
||||
- sip_ext
|
||||
- name: vlan1720
|
||||
ip: 172.30.52.145
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: prx01b
|
||||
interfaces:
|
||||
- name: vlan1720
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: prx01a
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: vlan1720
|
||||
ip: 172.30.52.150
|
||||
type:
|
||||
- sip_int
|
||||
@ -1,768 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
db01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '1'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: db01b
|
||||
role:
|
||||
- db
|
||||
status: online
|
||||
vlan1721:
|
||||
hwaddr: AA:7C:C0:DA:85:45
|
||||
ip: 172.30.52.180
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.179
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.183
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.185
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
db01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '2'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: db01a
|
||||
role:
|
||||
- db
|
||||
status: online
|
||||
vlan1721:
|
||||
hwaddr: BE:3A:47:A7:11:0D
|
||||
ip: 172.30.52.181
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.179
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.184
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.185
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- mon_ext
|
||||
vlan_raw_device: bond0
|
||||
lb01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '3'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1719
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- vlan1722
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: lb01b
|
||||
role:
|
||||
- lb
|
||||
status: online
|
||||
vlan1719:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.104
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.103
|
||||
type:
|
||||
- sip_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.136
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.135
|
||||
type:
|
||||
- sip_int
|
||||
- rtp_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 46:78:04:52:C2:6C
|
||||
ip: 172.30.52.174
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.173
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.197
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.196
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.186
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.188
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
lb01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '4'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1719
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: lb01a
|
||||
role:
|
||||
- lb
|
||||
status: online
|
||||
vlan1719:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.105
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.103
|
||||
type:
|
||||
- sip_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.137
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.135
|
||||
type:
|
||||
- sip_int
|
||||
- rtp_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: F2:5A:F1:41:B7:57
|
||||
ip: 172.30.52.175
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.173
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1722:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.149
|
||||
netmask: 255.255.255.240
|
||||
shared_ip:
|
||||
- 172.30.52.147
|
||||
type:
|
||||
- rtp_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.187
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.188
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '5'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: prx01b
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: online
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.133
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.132
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1E:B7:5A:23:BD:FE
|
||||
ip: 172.30.52.171
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.170
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.189
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.191
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '6'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: prx01a
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: online
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.139
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.138
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1A:E6:67:D3:B3:34
|
||||
ip: 172.30.52.145
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.144
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.190
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.191
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx02a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '7'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: prx02b
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: inactive
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.140
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.138
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1E:B7:5A:23:BD:FA
|
||||
ip: 172.30.52.146
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.144
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.192
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.194
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
prx02b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
dbnode: '8'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: prx01a
|
||||
role:
|
||||
- proxy
|
||||
- rtp
|
||||
status: inactive
|
||||
vlan1720:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.134
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.132
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 1A:E6:67:D3:B3:35
|
||||
ip: 172.30.52.172
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.170
|
||||
type:
|
||||
- ha_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.193
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.194
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
web01a:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.1.2
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.1.1
|
||||
type:
|
||||
- boot_int
|
||||
dbnode: '9'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1718
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: web01b
|
||||
role:
|
||||
- mgmt
|
||||
status: online
|
||||
vlan1718:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.69
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.68
|
||||
type:
|
||||
- web_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.142
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.141
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: E2:67:FE:AB:0B:DE
|
||||
ip: 172.30.52.168
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.167
|
||||
type:
|
||||
- ha_int
|
||||
- web_int
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.180
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.182
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- mon_ext
|
||||
- ssh_ext
|
||||
vlan_raw_device: bond0
|
||||
web01b:
|
||||
bond0:
|
||||
bond_miimon: '100'
|
||||
bond_mode: active-backup
|
||||
bond_slaves: eth0 eth1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.1.3
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.1.1
|
||||
type:
|
||||
- boot_int
|
||||
dbnode: '10'
|
||||
eth0:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
eth1:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
interfaces:
|
||||
- vlan300
|
||||
- vlan1718
|
||||
- vlan1720
|
||||
- vlan1721
|
||||
- lo
|
||||
- eth0
|
||||
- eth1
|
||||
- bond0
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- api_int
|
||||
v6ip: ::1
|
||||
peer: web01a
|
||||
role:
|
||||
- mgmt
|
||||
status: online
|
||||
vlan1718:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.70
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.68
|
||||
type:
|
||||
- web_ext
|
||||
vlan_raw_device: bond0
|
||||
vlan1720:
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 172.30.52.143
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.141
|
||||
type:
|
||||
- sip_int
|
||||
vlan_raw_device: bond0
|
||||
vlan1721:
|
||||
hwaddr: 3A:79:8B:6A:A7:01
|
||||
ip: 172.30.52.169
|
||||
netmask: 255.255.255.224
|
||||
shared_ip:
|
||||
- 172.30.52.167
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- web_int
|
||||
vlan_raw_device: bond0
|
||||
vlan300:
|
||||
dns_nameservers:
|
||||
- 92.42.136.30
|
||||
- 92.42.136.31
|
||||
gateway: 192.168.25.1
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.25.181
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.25.182
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- ssh_ext
|
||||
- mon_ext
|
||||
vlan_raw_device: bond0
|
||||
instances:
|
||||
- name: A
|
||||
service: ngcp-rtpengine-daemon
|
||||
host: lb01b
|
||||
status: online
|
||||
label: rtp
|
||||
interfaces:
|
||||
- name: vlan1720
|
||||
ip: 172.30.52.146
|
||||
type:
|
||||
- sip_int
|
||||
- rtp_int
|
||||
- name: vlan1722
|
||||
ip: 172.30.52.199
|
||||
type:
|
||||
- rtp_ext
|
||||
@ -1,216 +0,0 @@
|
||||
---
|
||||
hosts:
|
||||
sp1:
|
||||
dbnode: '1'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
advertised_ip: []
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- web_ext
|
||||
- web_int
|
||||
- aux_ext
|
||||
- ssh_ext
|
||||
- api_int
|
||||
- stor_int
|
||||
v6ip: ::1
|
||||
v6netmask: 128
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:9c:a3:22
|
||||
ip: 10.0.2.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: da:52:ca:90:8f:63
|
||||
ip: 192.168.255.251
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:ce
|
||||
ip: 192.168.2.173
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp2
|
||||
role:
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
- storage
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
sp2:
|
||||
dbnode: '2'
|
||||
interfaces:
|
||||
- lo
|
||||
- neth0
|
||||
- neth1
|
||||
- neth2
|
||||
lo:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 127.0.0.1
|
||||
netmask: 255.0.0.0
|
||||
shared_ip: []
|
||||
shared_v6ip: []
|
||||
type:
|
||||
- api_int
|
||||
- stor_int
|
||||
- web_int
|
||||
- web_ext
|
||||
- aux_ext
|
||||
v6ip: ::1
|
||||
neth0:
|
||||
dhcp: yes
|
||||
dns_nameservers:
|
||||
- 10.15.20.30
|
||||
gateway: 192.168.211.1
|
||||
hwaddr: 08:00:27:75:e6:93
|
||||
ip: 10.0.3.15
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_int
|
||||
- web_ext
|
||||
neth1:
|
||||
cluster_sets:
|
||||
- default
|
||||
hwaddr: 00:00:00:00:00:00
|
||||
ip: 192.168.255.252
|
||||
netmask: 255.255.255.248
|
||||
shared_ip:
|
||||
- 192.168.255.250
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- ha_int
|
||||
- boot_int
|
||||
- sip_int
|
||||
- rtp_int
|
||||
neth2:
|
||||
hwaddr: 0a:00:27:45:bb:66
|
||||
ip: 192.168.2.177
|
||||
netmask: 255.255.255.0
|
||||
shared_ip:
|
||||
- 192.168.2.151
|
||||
shared_v6ip:
|
||||
type:
|
||||
- ssh_ext
|
||||
- web_ext
|
||||
- web_int
|
||||
- sip_ext
|
||||
- rtp_ext
|
||||
- mon_ext
|
||||
peer: sp1
|
||||
role:
|
||||
- storage
|
||||
- proxy
|
||||
- lb
|
||||
- mgmt
|
||||
- rtp
|
||||
- db
|
||||
status: online
|
||||
swraiddevices: []
|
||||
sysdescr: ''
|
||||
syslocation: ''
|
||||
sysname: ''
|
||||
instances:
|
||||
- name: A
|
||||
service: kamailio-lb
|
||||
host: sp2
|
||||
status: online
|
||||
label: lb
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.250
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.253
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: instance
|
||||
name: C
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: B
|
||||
service: kamailio-lb
|
||||
host: sp1
|
||||
label: lb
|
||||
status: online
|
||||
interfaces:
|
||||
- name: neth2
|
||||
ip: 192.168.2.251
|
||||
type:
|
||||
- sip_ext
|
||||
- name: neth1
|
||||
ip: 192.168.255.254
|
||||
type:
|
||||
- sip_int
|
||||
connections:
|
||||
- name: proxy
|
||||
algorithm: serial
|
||||
links:
|
||||
- type: host
|
||||
name: sp2
|
||||
interfaces:
|
||||
- name: neth1
|
||||
type: sip_int
|
||||
- name: C
|
||||
service: kamailio-proxy
|
||||
host: sp1
|
||||
status: online
|
||||
label: proxy
|
||||
interfaces:
|
||||
- name: neth1
|
||||
ip: 192.168.255.249
|
||||
type:
|
||||
- sip_int
|
||||
@ -1,114 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
import re
|
||||
|
||||
import pytest
|
||||
|
||||
CMD = "../sbin/ngcp-instances-validator"
|
||||
|
||||
|
||||
def test_help(cli):
|
||||
cmd = [CMD, "--help"]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode == 0
|
||||
|
||||
|
||||
def test_no_network(cli):
|
||||
cmd = [CMD]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
assert re.search(
|
||||
"Can't open '/etc/ngcp-config/network.yml' for input", out.stderr
|
||||
)
|
||||
|
||||
|
||||
def test_no_instances(cli):
|
||||
cmd = [CMD, "--network-file=./fixtures/repos/network_pro.yml"]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode == 0
|
||||
|
||||
|
||||
@pytest.mark.tt_168102
|
||||
def test_pro_instances(cli):
|
||||
cmd = [CMD, "--network-file=./fixtures/repos/network_pro_instances.yml"]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode == 0
|
||||
|
||||
|
||||
def test_wrong_link(cli):
|
||||
cmd = [CMD, "--network-file=./fixtures/instances-validator/wrong_link.yml"]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
msg = "Missing required instance for connection link"
|
||||
assert re.search(
|
||||
rf"\[instances/A/proxy/fake\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
msg = "Missing required host for connection link"
|
||||
assert re.search(
|
||||
rf"\[instances/B/proxy/sp3\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
|
||||
|
||||
def test_wrong_link_interfaces(cli):
|
||||
file = "wrong_link_interfaces"
|
||||
cmd = [
|
||||
CMD,
|
||||
f"--network-file=./fixtures/instances-validator/{file}.yml",
|
||||
]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
msg = "Missing type sip_X on link interface"
|
||||
assert re.search(
|
||||
rf"\[instances/A/proxy/C/neth1\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
assert re.search(
|
||||
rf"\[instances/B/proxy/sp2/neth1\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
|
||||
|
||||
def test_repeated_instance_name(cli):
|
||||
file = "repeated_instance_name"
|
||||
cmd = [
|
||||
CMD,
|
||||
f"--network-file=./fixtures/instances-validator/{file}.yml",
|
||||
]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
msg = "Duplicate instance name with an existing instance A"
|
||||
assert re.search(
|
||||
rf"\[/instances/<name>\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
|
||||
|
||||
def test_repeated_instance_name_in_connections(cli):
|
||||
file = "repeated_instance_name_in_connections"
|
||||
cmd = [
|
||||
CMD,
|
||||
f"--network-file=./fixtures/instances-validator/{file}.yml",
|
||||
]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
msg = "Duplicate connetion name #3 : D: proxy"
|
||||
assert re.search(
|
||||
rf"\[/instances/<name>\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
|
||||
|
||||
def test_host_to_run_on_is_absent(cli):
|
||||
file = "host_to_run_on_is_absent"
|
||||
cmd = [
|
||||
CMD,
|
||||
f"--network-file=./fixtures/instances-validator/{file}.yml",
|
||||
]
|
||||
out = cli(*cmd)
|
||||
assert out.exitcode != 0
|
||||
msg = "Missing required host sp3"
|
||||
assert re.search(
|
||||
rf"\[instances/A\] {msg}",
|
||||
out.stderr,
|
||||
)
|
||||
@ -1,117 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
import re
|
||||
import shutil
|
||||
from fixtures.fs import check_stdoutput
|
||||
|
||||
|
||||
def test_apply_instances(ngcpcfgcli, tmpdir):
|
||||
commit_msg = "instance changes"
|
||||
out = ngcpcfgcli(
|
||||
"apply",
|
||||
"--force-all-services",
|
||||
commit_msg,
|
||||
env={
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
},
|
||||
)
|
||||
|
||||
assert out.returncode == 0
|
||||
assert not re.search(r"Error", out.stdout)
|
||||
assert not re.search(r"Error", out.stderr)
|
||||
|
||||
base_dir = out.env["OUTPUT_DIRECTORY"]
|
||||
output_file = base_dir.joinpath("ngcpcfg.service")
|
||||
check_stdoutput("INSTANCE_NAME:\n", str(output_file), tmpdir)
|
||||
assert re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services", out.stdout
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("ngcpcfg.serviceA")
|
||||
check_stdoutput("INSTANCE_NAME:A\n", str(output_file), tmpdir)
|
||||
assert re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services\[A\]",
|
||||
out.stdout,
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("ngcpcfg.serviceB")
|
||||
check_stdoutput("INSTANCE_NAME:B\n", str(output_file), tmpdir)
|
||||
assert re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services\[B\]",
|
||||
out.stdout,
|
||||
)
|
||||
|
||||
|
||||
def test_apply_instances_changes(ngcpcfg, ngcpcfgcli, tmpdir, gitrepo):
|
||||
commit_msg = "instance changes for B"
|
||||
env, cfg = ngcpcfg(
|
||||
env={
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/apply_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
}
|
||||
)
|
||||
base_dir = env["OUTPUT_DIRECTORY"]
|
||||
base_git = Path(base_dir).joinpath("etc")
|
||||
base_path = Path(base_dir).joinpath("etc/kamailio")
|
||||
base_orig = Path("fixtures/output")
|
||||
orig = [
|
||||
("lb_kamailio_cfg_carrier", "lb"),
|
||||
("lb_kamailio_cfg_instances_A", "lb_A"),
|
||||
("lb_kamailio_cfg_instances_B", "lb_B"),
|
||||
]
|
||||
# put expected output of build_instances
|
||||
with gitrepo.in_folder(base_git) as git:
|
||||
# ensure we have valid user information
|
||||
git.config("--local", "user.email", "pytest@example.com")
|
||||
git.config("--local", "user.name", "pytest")
|
||||
for file, dir in orig:
|
||||
dst_path = base_path.joinpath(dir)
|
||||
dst_path.mkdir(parents=True, exist_ok=True)
|
||||
dst_file = dst_path.joinpath("kamailio.cfg")
|
||||
shutil.copy(base_orig.joinpath(file), dst_file)
|
||||
git.add(dst_file)
|
||||
ex, out, err = git.commit("-a", "-m", "old conf done")
|
||||
print("{}\nstdout:\n{}stderr:{}\n".format("git commit", out, err))
|
||||
assert ex == 0
|
||||
|
||||
out = ngcpcfgcli(
|
||||
"apply",
|
||||
commit_msg,
|
||||
env=env,
|
||||
)
|
||||
|
||||
assert out.returncode == 0
|
||||
assert re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services", out.stdout
|
||||
)
|
||||
|
||||
assert not re.search(r"Error", out.stdout)
|
||||
assert not re.search(r"Error", out.stderr)
|
||||
|
||||
output_file = base_dir.joinpath("ngcpcfg.service")
|
||||
assert not output_file.exists()
|
||||
assert not re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services$",
|
||||
out.stdout,
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("ngcpcfg.serviceA")
|
||||
assert not output_file.exists()
|
||||
assert not re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services\[A\]$",
|
||||
out.stdout,
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("ngcpcfg.serviceB")
|
||||
check_stdoutput("INSTANCE_NAME:B\n", str(output_file), tmpdir)
|
||||
assert re.search(
|
||||
r"Executing action for .*/etc/kamailio/lb/ngcpcfg.services\[B\]",
|
||||
out.stdout,
|
||||
)
|
||||
@ -1,149 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
import re
|
||||
|
||||
from fixtures.fs import check_output
|
||||
from fixtures.fs import check_stdoutput
|
||||
|
||||
|
||||
def test_build_instances(ngcpcfgcli):
|
||||
out = ngcpcfgcli(
|
||||
"build",
|
||||
"--ignore-branch-check",
|
||||
"/etc/kamailio",
|
||||
env={
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
},
|
||||
)
|
||||
assert re.search(
|
||||
r"Generating .*/etc/kamailio/lb/kamailio.cfg: OK", out.stdout
|
||||
)
|
||||
|
||||
assert not re.search(r"Error", out.stdout)
|
||||
assert not re.search(r"Error", out.stderr)
|
||||
|
||||
base_dir = out.env["OUTPUT_DIRECTORY"]
|
||||
output_file = base_dir.joinpath("etc/kamailio/lb/kamailio.cfg")
|
||||
test_file = "fixtures/output/lb_kamailio_cfg_carrier"
|
||||
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(
|
||||
r"Generating .*/etc/kamailio/lb_A/kamailio.cfg: OK", out.stdout
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("etc/kamailio/lb_A/kamailio.cfg")
|
||||
test_file = "fixtures/output/lb_kamailio_cfg_instances_A"
|
||||
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(
|
||||
r"Generating .*/etc/kamailio/lb_B/kamailio.cfg: OK", out.stdout
|
||||
)
|
||||
|
||||
output_file = base_dir.joinpath("etc/kamailio/lb_B/kamailio.cfg")
|
||||
test_file = "fixtures/output/lb_kamailio_cfg_instances_B"
|
||||
|
||||
check_output(str(output_file), test_file)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_build_instance_customtt(ngcpcfgcli):
|
||||
out = ngcpcfgcli(
|
||||
"build",
|
||||
"--ignore-branch-check",
|
||||
"/etc/kamailio/lb/",
|
||||
env={
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
},
|
||||
)
|
||||
assert re.search(
|
||||
r"Generating .*/etc/kamailio/lb_B/simple.cfg: OK", out.stdout
|
||||
)
|
||||
|
||||
assert not re.search(r"Error", out.stdout)
|
||||
assert not re.search(r"Error", out.stderr)
|
||||
|
||||
base_dir = out.env["OUTPUT_DIRECTORY"]
|
||||
output_file = base_dir.joinpath("etc/kamailio/lb_B/simple.cfg")
|
||||
test_file = "fixtures/output/lb_custom_cfg_instances_B"
|
||||
|
||||
check_output(str(output_file), test_file)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_instances_info_noargs(helpercli, tmpdir):
|
||||
out = helpercli(
|
||||
"instances-info",
|
||||
env={
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
test_file = "fixtures/output/instances_info_noargs"
|
||||
check_stdoutput(out.stdout, test_file, tmpdir)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_instances_info_args(helpercli, tmpdir):
|
||||
out = helpercli(
|
||||
"instances-info",
|
||||
"/etc",
|
||||
env={
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
test_file = "fixtures/output/instances_info_args"
|
||||
check_stdoutput(out.stdout, test_file, tmpdir)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_instances_info_args_same(helpercli, tmpdir):
|
||||
out = helpercli(
|
||||
"instances-info",
|
||||
"/etc/kamailio/lb",
|
||||
env={
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
test_file = "fixtures/output/instances_info_args_same"
|
||||
check_stdoutput(out.stdout, test_file, tmpdir)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_instances_info_args_longer(helpercli, tmpdir):
|
||||
out = helpercli(
|
||||
"instances-info",
|
||||
"/etc/kamailio/lb/db",
|
||||
env={
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
test_file = "fixtures/output/instances_info_args_longer"
|
||||
check_stdoutput(out.stdout, test_file, tmpdir)
|
||||
assert out.returncode == 0
|
||||
|
||||
|
||||
def test_instances_info_relative_path(helpercli):
|
||||
out = helpercli(
|
||||
"instances-info",
|
||||
"../lb/db",
|
||||
env={
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
assert out.returncode != 0
|
||||
@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
import re
|
||||
from fixtures.fs import check_stdoutput
|
||||
|
||||
|
||||
def test_instance_info_noargs(helpercli):
|
||||
out = helpercli(
|
||||
"instance-info",
|
||||
env={
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
assert out.returncode != 0
|
||||
assert "Error: wrong number of arguments" in out.stderr
|
||||
|
||||
|
||||
def test_instances_info_no_instance(helpercli):
|
||||
out = helpercli(
|
||||
"instance-info",
|
||||
"D",
|
||||
env={
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
assert out.returncode != 0
|
||||
|
||||
|
||||
def test_instance_info(helpercli, tmpdir):
|
||||
out = helpercli(
|
||||
"instance-info",
|
||||
"A",
|
||||
env={
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml",
|
||||
},
|
||||
)
|
||||
|
||||
test_file = "fixtures/output/instance_info_A"
|
||||
assert out.returncode == 0
|
||||
check_stdoutput(out.stdout, test_file, tmpdir)
|
||||
@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
import re
|
||||
|
||||
from fixtures.fs import check_output
|
||||
|
||||
msg = r"Generating {}/etc/kamailio/lb{}/whatever.cfg: OK"
|
||||
|
||||
|
||||
def test_carrier_instances(ngcpcfgcli):
|
||||
out = ngcpcfgcli(
|
||||
"build",
|
||||
"--ignore-branch-check",
|
||||
"/etc/kamailio/lb/whatever.cfg",
|
||||
env={
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
},
|
||||
)
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], ""), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_carrier"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], "_A"), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb_A/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_carrier_instances_A"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], "_B"), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb_B/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_carrier_instances_B"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
|
||||
def test_pro_instances(ngcpcfgcli):
|
||||
out = ngcpcfgcli(
|
||||
"build",
|
||||
"--ignore-branch-check",
|
||||
"/etc/kamailio/lb/whatever.cfg",
|
||||
env={
|
||||
"NGCP_HOSTNAME": "sp1",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_pro_instances.cfg",
|
||||
},
|
||||
)
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], ""), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_pro"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], "_A"), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb_A/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_pro_instances_A"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
assert re.search(msg.format(out.env["OUTPUT_DIRECTORY"], "_B"), out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(
|
||||
"etc/kamailio/lb_B/whatever.cfg"
|
||||
)
|
||||
test_file = "fixtures/output/whatever.cfg_pro_instances_B"
|
||||
check_output(str(output_file), test_file)
|
||||
@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env py.test-3
|
||||
import re
|
||||
|
||||
from fixtures.fs import check_output
|
||||
|
||||
filepath = "etc/rtpengine{}/rtpengine.conf"
|
||||
msg = r"Generating {}/{}: OK"
|
||||
env = {
|
||||
"NGCP_HOSTNAME": "lb01a",
|
||||
"TEMPLATE_POOL_BASE": "fixtures/build_instances",
|
||||
"TEMPLATE_INSTANCES": "fixtures/repos/instances.yml",
|
||||
"NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg",
|
||||
"NETWORK_CONFIG": "fixtures/repos/network_carrier_instances_rtp.yml",
|
||||
}
|
||||
|
||||
|
||||
def test_carrier_instances(ngcpcfgcli):
|
||||
out = ngcpcfgcli(
|
||||
"build",
|
||||
"--ignore-branch-check",
|
||||
"/etc/rtpengine/rtpengine.conf",
|
||||
env=env,
|
||||
)
|
||||
rstr = msg.format(out.env["OUTPUT_DIRECTORY"], filepath.format(""))
|
||||
assert re.search(rstr, out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(filepath.format(""))
|
||||
test_file = "fixtures/output/rtpengine.conf_carrier"
|
||||
check_output(str(output_file), test_file)
|
||||
|
||||
rstr = msg.format(out.env["OUTPUT_DIRECTORY"], filepath.format("_A"))
|
||||
assert re.search(rstr, out.stdout)
|
||||
output_file = out.env["OUTPUT_DIRECTORY"].joinpath(filepath.format("_A"))
|
||||
test_file = "fixtures/output/rtpengine.conf_instances_A"
|
||||
check_output(str(output_file), test_file)
|
||||
Loading…
Reference in new issue