pf-tools/pf-tools: 3 new changesets
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Thu Aug 14 15:56:41 UTC 2014
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/ce38937b626d
changeset: 1312:ce38937b626d
user: shad
date: Thu Aug 14 17:45:39 2014 +0200
description:
hint for network translation too
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/0c6c2cdbf8bb
changeset: 1313:0c6c2cdbf8bb
user: shad
date: Thu Aug 14 17:46:18 2014 +0200
description:
add most probable shortname since it's mandatory now
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/e270822b7eed
changeset: 1314:e270822b7eed
user: shad
date: Thu Aug 14 17:55:12 2014 +0200
description:
last number of an IPv4 can be 0
diffstat:
lib/PFTools/Compat/Translation.pm | 4 ++
lib/PFTools/Conf/Host.pm | 2 +-
t/13.conf.cfg1/config-export/SITE/cbv4-pfds/CONFIG/hostfile-cbv4-spawn | 2 +-
t/13.conf.t | 18 +++++-----
t/20.files.t | 10 ++--
tools/Translate_old_config | 2 +-
6 files changed, 21 insertions(+), 17 deletions(-)
diffs (165 lines):
diff -r 9632cbd63877 -r e270822b7eed lib/PFTools/Compat/Translation.pm
--- a/lib/PFTools/Compat/Translation.pm Wed Aug 13 11:49:34 2014 +0200
+++ b/lib/PFTools/Compat/Translation.pm Thu Aug 14 17:55:12 2014 +0200
@@ -381,6 +381,10 @@
}
}
}
+ # pf-tools 1 need a shortname, if none define, the first one is usually ok
+ if ( !$new_host->{'shortname'} && $host_parsed->{'interface'}->{'eth0'} ) {
+ $new_host->{'shortname'} = $host_parsed->{'interface'}->{'eth0'};
+ }
return $new_host;
}
diff -r 9632cbd63877 -r e270822b7eed lib/PFTools/Conf/Host.pm
--- a/lib/PFTools/Conf/Host.pm Wed Aug 13 11:49:34 2014 +0200
+++ b/lib/PFTools/Conf/Host.pm Thu Aug 14 17:55:12 2014 +0200
@@ -953,7 +953,7 @@
my $param_nodes
= $link_section_ref->{$ip_type_dot_host_number} ? 0 : $nodes;
- if ( !$ipstart ) {
+ if ( !defined $ipstart ) {
croak qq{ERROR: No $ip_type defined};
}
my $params_ref = {
diff -r 9632cbd63877 -r e270822b7eed t/13.conf.cfg1/config-export/SITE/cbv4-pfds/CONFIG/hostfile-cbv4-spawn
--- a/t/13.conf.cfg1/config-export/SITE/cbv4-pfds/CONFIG/hostfile-cbv4-spawn Wed Aug 13 11:49:34 2014 +0200
+++ b/t/13.conf.cfg1/config-export/SITE/cbv4-pfds/CONFIG/hostfile-cbv4-spawn Thu Aug 14 17:55:12 2014 +0200
@@ -47,7 +47,7 @@
[link::vlan-admindsi]
type = ether
dev = eth4
- ipv4 = 41
+ ipv4 = 0
# vlan = vlan-admindsi
[link::vlan-pfds-ext]
diff -r 9632cbd63877 -r e270822b7eed t/13.conf.t
--- a/t/13.conf.t Wed Aug 13 11:49:34 2014 +0200
+++ b/t/13.conf.t Thu Aug 14 17:55:12 2014 +0200
@@ -696,7 +696,7 @@
'link::vlan-admindsi' => {
'type' => 'ether',
'dev' => 'eth4',
- 'ipv4' => '41',
+ 'ipv4' => '0',
},
'link::vlan-middledsi' => {
'type' => 'ether',
@@ -901,7 +901,7 @@
},
'interfaces' => {
'eth4' => {
- 'ipv4' => '10.3.1.42/24',
+ 'ipv4' => '10.3.1.1/24',
'vlan' => 'vlan-admindsi'
},
'eth5' => {
@@ -952,7 +952,7 @@
},
'interfaces' => {
'eth4' => {
- 'ipv4' => '10.3.1.41/24',
+ 'ipv4' => '10.3.1.0/24',
'vlan' => 'vlan-admindsi'
},
'eth5' => {
@@ -1027,11 +1027,11 @@
],
'BY_ADDR' => {
'192.168.1.98/24' => 'cbv4-spawn01.vlan-pfds-ext',
- '10.3.1.41/24' => 'cbv4-spawn00.vlan-admindsi',
+ '10.3.1.0/24' => 'cbv4-spawn00.vlan-admindsi',
'10.3.2.41/24' => 'cbv4-spawn00.vlan-middledsi',
'10.1.2.1/16' => 'cbv4-pfds-filer01.vlan-systeme',
'10.1.2.0/16' => 'cbv4-pfds-filer00.vlan-systeme',
- '10.3.1.42/24' => 'cbv4-spawn01.vlan-admindsi',
+ '10.3.1.1/24' => 'cbv4-spawn01.vlan-admindsi',
'192.168.1.99/24' => 'vip-spawn.vlan-pfds-ext',
'10.1.167.0/16' => 'cbv4-spawn00.vlan-systeme',
'10.1.167.1/16' => 'cbv4-spawn01.vlan-systeme',
@@ -1414,11 +1414,11 @@
'cbv4-spawn00.vlan-middledsi' => 'A 10.3.2.41',
'spawn00' => 'CNAME cbv4-spawn00.vlan-systeme',
'cbv4-spawn01' => 'CNAME cbv4-spawn01.vlan-systeme',
- 'cbv4-spawn01.vlan-admindsi' => 'A 10.3.1.42',
+ 'cbv4-spawn01.vlan-admindsi' => 'A 10.3.1.1',
'ntp00' => 'CNAME cbv4-spawn00.vlan-systeme',
'ntp' => 'CNAME cbv4-spawn.vlan-systeme',
'ntp01' => 'CNAME cbv4-spawn01.vlan-systeme',
- 'cbv4-spawn00.vlan-admindsi' => 'A 10.3.1.41',
+ 'cbv4-spawn00.vlan-admindsi' => 'A 10.3.1.0',
'cbv4-spawn00.vlan-systeme' => 'A 10.1.167.0',
'cbv4-spawn' => 'CNAME cbv4-spawn.vlan-systeme',
'cbv4-spawn.vlan-systeme' => [
@@ -1426,8 +1426,8 @@
'A 10.1.167.1',
],
'cbv4-spawn.vlan-admindsi' => [
- 'A 10.3.1.41',
- 'A 10.3.1.42',
+ 'A 10.3.1.0',
+ 'A 10.3.1.1',
],
'cbv4-spawn.vlan-pfds-int' => [
'A 10.2.167.0',
diff -r 9632cbd63877 -r e270822b7eed t/20.files.t
--- a/t/20.files.t Wed Aug 13 11:49:34 2014 +0200
+++ b/t/20.files.t Thu Aug 14 17:55:12 2014 +0200
@@ -204,8 +204,8 @@
q{; number: 2},
q{;----------------------------------------------------------------------------},
qq{cbv4-spawn\tIN CNAME\tcbv4-spawn.vlan-systeme},
- qq{cbv4-spawn.vlan-admindsi\tIN A\t10.3.1.41},
- qq{cbv4-spawn.vlan-admindsi\tIN A\t10.3.1.42},
+ qq{cbv4-spawn.vlan-admindsi\tIN A\t10.3.1.0},
+ qq{cbv4-spawn.vlan-admindsi\tIN A\t10.3.1.1},
qq{cbv4-spawn.vlan-middledsi\tIN A\t10.3.2.41},
qq{cbv4-spawn.vlan-middledsi\tIN A\t10.3.2.42},
qq{cbv4-spawn.vlan-pfds-ext\tIN A\t192.168.1.97},
@@ -215,13 +215,13 @@
qq{cbv4-spawn.vlan-systeme\tIN A\t10.1.167.0},
qq{cbv4-spawn.vlan-systeme\tIN A\t10.1.167.1},
qq{cbv4-spawn00\tIN CNAME\tcbv4-spawn00.vlan-systeme},
- qq{cbv4-spawn00.vlan-admindsi\tIN A\t10.3.1.41},
+ qq{cbv4-spawn00.vlan-admindsi\tIN A\t10.3.1.0},
qq{cbv4-spawn00.vlan-middledsi\tIN A\t10.3.2.41},
qq{cbv4-spawn00.vlan-pfds-ext\tIN A\t192.168.1.97},
qq{cbv4-spawn00.vlan-pfds-int\tIN A\t10.2.167.0},
qq{cbv4-spawn00.vlan-systeme\tIN A\t10.1.167.0},
qq{cbv4-spawn01\tIN CNAME\tcbv4-spawn01.vlan-systeme},
- qq{cbv4-spawn01.vlan-admindsi\tIN A\t10.3.1.42},
+ qq{cbv4-spawn01.vlan-admindsi\tIN A\t10.3.1.1},
qq{cbv4-spawn01.vlan-middledsi\tIN A\t10.3.2.42},
qq{cbv4-spawn01.vlan-pfds-ext\tIN A\t192.168.1.98},
qq{cbv4-spawn01.vlan-pfds-int\tIN A\t10.2.167.1},
@@ -514,7 +514,7 @@
qq{},
qq{auto eth4},
qq{iface eth4 inet static},
- qq{\taddress\t\t10.3.1.42},
+ qq{\taddress\t\t10.3.1.1},
qq{\tnetmask\t\t255.255.255.0},
qq{\tnetwork\t\t10.3.1.0},
qq{\tbroadcast\t10.3.1.255},
diff -r 9632cbd63877 -r e270822b7eed tools/Translate_old_config
--- a/tools/Translate_old_config Wed Aug 13 11:49:34 2014 +0200
+++ b/tools/Translate_old_config Thu Aug 14 17:55:12 2014 +0200
@@ -123,7 +123,6 @@
elsif ( $_ =~ m{\A \@include \s* (.*) \z}msx ) {
if ( $options->{'type'} eq 'config' ) {
$current_section = qq{COMMON:/include-$1};
- push @included_list, $current_section;
}
else {
if ( $options->{'site'} eq q{UNDEFINED} ) {
@@ -134,6 +133,7 @@
= qq{CONFSITE_$options->{'site'}:/include-$1};
}
}
+ push @included_list, qq{include-$1};
$sectionorder{"$current_section"} = $sectionnumber;
$sectionnumber++;
if (@tempcomment) {
More information about the pf-tools-commits
mailing list