pf-tools/pf-tools: documentation work in progress

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Tue Jan 20 09:22:36 UTC 2015


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/cc9e8d65a6dc
changeset: 1444:cc9e8d65a6dc
user:      melkor <melkor at sitadelle.com>
date:      Tue Jan 20 10:22:33 2015 +0100
description:
documentation work in progress

diffstat:

 doc/global-hash |  98 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 91 insertions(+), 7 deletions(-)

diffs (116 lines):

diff -r ef0e9f4d92a7 -r cc9e8d65a6dc doc/global-hash
--- a/doc/global-hash	Mon Jan 19 14:55:05 2015 +0100
+++ b/doc/global-hash	Tue Jan 20 10:22:33 2015 +0100
@@ -57,21 +57,105 @@
             * hostname_model: section name of type 'server'
             * hosttype: 'hosttype' key from section or SHORTHOSTNAME
             * order: 'ordre' key of section
-        - foreach ipv4 ir ipv6 defined in section add in {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{interface}{$iface}, $iface is generated with increment (eth0, eth1, ...)
+        - foreach ipv4 ir ipv6 defined in section add in 
+          {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{interface}{$iface},
+          $iface is generated with increment (eth0, eth1, ...)
             * vlan: in key 'ipv4.vlan-systeme', value is 'vlan-systeme'
-            * ipv4 or ipv6: calculate with subnet of NetAddr::IP object create from {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$vlan}{network|network6} (vlan see up) and value of 'ipv4.vlan-systeme' key in the exemple: ipv4.vlan-systeme = 168.0 => 10.128.168.0
+            * ipv4 or ipv6: calculate with subnet of NetAddr::IP object create from 
+              {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$vlan}{network|network6} (vlan see up) 
+              and value of 'ipv4.vlan-systeme' key 
+                -> exemple: ipv4.vlan-systeme = 168.0 => 10.128.168.0
         - foreach ipv4 ir ipv6 defined in section 
-            * add in {ZONE|ZONE6}{BY_NAME}{$zone}{BY_SITE}{$site}{$hostclass} or in {ZONE|ZONE6}{BY_NAME}{$zone}{ALL_SITE}{$hostclass}:
+            * add in {ZONE|ZONE6}{BY_NAME}{$zone}{BY_SITE}{$site}{$hostclass} or 
+              in {ZONE|ZONE6}{BY_NAME}{$zone}{ALL_SITE}{$hostclass}:
                 - comment: key 'comment' of section
                 - number: key 'number' of section
                 - ${hostname}.${vlanname}: string "A $ip"
-                - ${hosttype}.${vlanname}: array of string with "A $ip", one line foreach host in hostgroup
+                - ${hosttype}.${vlanname}: array of string with "A $ip", one line foreach 
+                  host in hostgroup
                 - $hostname: string "CNAME ${hostname}.${vlanname}"
                 - $hosttype: string "CNAME ${hosttype}.${vlanname}"
-                - $alias: string "CNAME ${hostname}.${vlanname}" with $alias has 'cvs' value in key 'alias.cvs = vlan-systeme' and $vlanname is value
+                - $alias: string "CNAME ${hostname}.${vlanname}" with $alias has 'cvs' value 
+                  in key 'alias.cvs = vlan-systeme' and $vlanname is value
+            * add $site in {PUBLIC_NETWORK}{$vlan_name}{$hostname}
+            * add $site in {PUBLIC_NETWORK}{$vlan_name}{$hostclass}
 
-- __add_service from Conf.pm, for all site in key 'site' of section 'type = service', foreach value in '@host' key load configuration from file designed by value and call add_host from Conf/Host.pm:
-    * 
+- __add_service from Conf.pm, for all site in key 'site' of section 'type = service', foreach value 
+ in '@host' key load configuration from file and call add_host from Conf/Host.pm:
+    * hostname_model has value of key "hostname" in section "hostgroup"
+    * hostclass has value of key "hosttype" in section "hostgroup" or HOSTTYPE
+    * foreach $site in section's key 'site'
+        * foreach host build from hostnum and hostname
+            * add in {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{deployment}:
+                - hostname_model: section name of type 'server'
+                - hosttype: 'hosttype' key from section or SHORTHOSTNAME
+                - order: 'order' key of section
+                - dhcpvlan: value from "deployement" section or "type = site"
+                - arch: value from "deployment" section
+                - distrib: value from "deployment" section
+                - mode: value from "deployment" section
+                - preseed: value from "deployment" section
+            * add in {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{boot}:
+                - pxefilename: take from "boot" section
+                - pxetemplate: take from "boot" section
+                - kernel: take from "boot" section
+                - initrd: take from "boot" section
+                - kerneluml: take from "boot" section
+                - initrduml: take from "boot" section
+                - cmdline: take from "boot" section
+                - console: take from "boot" section or from section "type = site"
+            * foreach section "link:": 
+                - add in {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{interace}{$iface_name} 
+                  with $iface_name has value of 'dev' in "link:" section:
+                    * vlan: in section "link:${vlan}", in "link:vlan-systeme" vlan is "vlan-systeme"
+                    * options: key "options" from section
+                    * method: key "method" from section
+                    * mac: key "mac.${hostnum}" from section, $hostnum is mandatory
+                    * slaves: if "type = bond", take from "slaves" key
+                    * ipv4 or ipv6: calculate with subnet of NetAddr::IP object create from 
+                      {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$vlan}{network|network6} (vlan see up)
+                      and value of 'ipv4.vlan-systeme' key 
+                        -> exemple: ipv4.vlan-systeme = 168.0 => 10.128.168.0
+                    * @route or @route6: list of routes calculte from @root or @root6 "${destination} via ${gateway}"
+                        - $destination can be:
+                            * default
+                            * a network take from {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$network_name}{network} and 
+                              {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$network_name}{netmask}
+                            * a name
+                            * an ip
+                        - $gateway can be:
+                            * GATEWAY: take $gateway or $gateway6 from {SITE}{BY_NAME}{$site}{NETWORK}{BY_NAME}{$network_name}
+                            * a name
+                            * an ip
+                    * add in {SITE}{BY_NAME}{$site}{HOST}{BY_MAC}{$mac} string "${dev}.${hostname}.${vlan_name}
+                - foreach ipv4 ir ipv6 defined in link section:
+                    * add in {ZONE|ZONE6}{BY_NAME}{$zone}{BY_SITE}{$site}{$hostclass} or 
+                      in {ZONE|ZONE6}{BY_NAME}{$zone}{ALL_SITE}{$hostclass}:
+                        - comment: key 'comment' of section
+                        - number: key 'number' of section
+                        - ${hostname}.${vlanname}: string "A $ip"
+                        - ${hosttype}.${vlanname}: array of string with "A $ip", one line foreach 
+                        host in hostgroup
+                        - $hostname: string "CNAME ${hostname}.${vlanname}"
+                        - $hosttype: string "CNAME ${hosttype}.${vlanname}"
+                        - $alias: string "CNAME ${hostname}.${vlanname}" with $alias has 'cvs' value 
+                        in key 'alias.cvs = vlan-systeme' and $vlanname is value
+                    * if $vlan on $iface_name is $dhcpvlan of "type = site"
+                        - add in {DHCP|DHCP6}{BY_SITE}{$site}{$dhcp_vlan}:
+                            * subnet: network or network6 from section "type = network"
+                            * netmask: netmask or netmask6 from section "type = network"
+                            * routeurs: gateway or gateway6 from section "type = network"
+                        - add in {DHCP|DHCP6}{BY_SITE}{$site}{$dhcp_vlan}{$hostclass}
+                            * number: "number" from section "hostgroup"
+                            * comment: "comment" from section "hostgroup"
+                        - add in {DHCP|DHCP6}{BY_SITE}{$site}{$dhcp_vlan}{$hostclass}{$hostname}:
+                            * hardware: "mac" from "link:" section
+                            * fixed_addr: ip calculate for {SITE}{BY_NAME}{$site}{HOST}{BY_NAME}{$hostclass}{$hostname}{interace}{$iface_name}{ipv4|ipv6}
+                            * pxefilename: "pxefilename" from "boot" section
+                            * resolver: "resolver" key from "dns" section
+                    * add $site in {PUBLIC_NETWORK}{$vlan_name}{$hostname}
+                    * add $site in {PUBLIC_NETWORK}{$vlan_name}{$hostclass}
+
 
 $VAR1 = {
     'DHCP' => {



More information about the pf-tools-commits mailing list