Changeset 224
- Timestamp:
- Jun 19, 2018, 6:03:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r221 r224 3 3 # Copyright (C) 2006-2018 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr> 4 4 # License GNU GPL version 2 or later and Perl equivalent 5 # 6 # apt-get install perl-base perl-modules libyaml-syck-perl libnet-netmask-perl libreadonly-perl libfile-touch-perl 5 7 6 8 package DDT::RE; … … 19 21 use strict; 20 22 #use warnings; 21 use version; our $VERSION = qv('0.9.2');23 use version; our $VERSION = version->declare('0.9.3'); 22 24 23 25 use Getopt::Long qw(GetOptions); … … 2712 2714 print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n"; 2713 2715 print "Example:\n"; 2714 print " d hcp-dns-toolsadd_dhcp -h most1mc130 -d legi-661 -i 194.254.66.130 -m 00:17:F2:D3:2B:FF -c '2008-07-03 Mac Book Guillaume Balleyrac (MOST)\n";2715 print " d hcp-dns-toolsadd_dhcp -p pool-stagiaire -i pool -d hmg.priv -m 02:00:54:55:4E:01 -c '2008-09-02 Portable Perso - Laanaia Nabil - Achim Wirth (MEIGE)\n";2716 print " ddt add_dhcp -h most1mc130 -d legi-661 -i 194.254.66.130 -m 00:17:F2:D3:2B:FF -c '2008-07-03 Mac Book Guillaume Balleyrac (MOST)\n"; 2717 print " ddt add_dhcp -p pool-stagiaire -i pool -d hmg.priv -m 02:00:54:55:4E:01 -c '2008-09-02 Portable Perso - Laanaia Nabil - Achim Wirth (MEIGE)\n"; 2716 2718 } 2717 2719 … … 2723 2725 print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n"; 2724 2726 print "Example:\n"; 2725 print " d hcp-dns-toolsadd_float -p pool-stagiaire -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";2727 print " ddt add_float -p pool-stagiaire -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n"; 2726 2728 } 2727 2729 … … 2734 2736 print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n"; 2735 2737 print "Example:\n"; 2736 print " d hcp-dns-toolsadd_static -h legipc1 -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";2738 print " ddt add_static -h legipc1 -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n"; 2737 2739 } 2738 2740 … … 2744 2746 print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n"; 2745 2747 print "Example:\n"; 2746 print " d hcp-dns-toolsadd_virtual -h legipc1 -d legi-211 -i 192.168.10.1 -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";2748 print " ddt add_virtual -h legipc1 -d legi-211 -i 192.168.10.1 -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n"; 2747 2749 } 2748 2750 … … 2760 2762 print " -c : comment (mandatory). Example: 2016-08-22 VLAN legi-261 (INFO)\n"; 2761 2763 print "Examples:\n"; 2762 print " d hcp-dns-toolscreate_domainset -d legi-264 -e legi.grenoble-inp.fr -c '2016-08-22 VLAN legi-261 (INFO)'\n";2764 print " ddt create_domainset -d legi-264 -e legi.grenoble-inp.fr -c '2016-08-22 VLAN legi-261 (INFO)'\n"; 2763 2765 } 2764 2766 … … 2770 2772 print " -i : adresse(s) IP ou plage d'IP. Séparateur d'adresses IP: ','. Séparateur de plage '-'\n"; 2771 2773 print "Examples:\n"; 2772 print " d hcp-dns-tools-p pool-hmg -d hmg.priv -f pool.hmg.priv -i 192.168.10.1,192.168.10.2,192.168.10.3\n";2773 print " d hcp-dns-tools-p turbocavit -d legi-sector03 -f pool-legi-public -i 192.168.10.1-192.168.10.4\n";2774 print " ddt -p pool-hmg -d hmg.priv -f pool.hmg.priv -i 192.168.10.1,192.168.10.2,192.168.10.3\n"; 2775 print " ddt -p turbocavit -d legi-sector03 -f pool-legi-public -i 192.168.10.1-192.168.10.4\n"; 2774 2776 } 2775 2777 … … 2873 2875 print " -d : domain set attachment (mandatory if option -h)\n"; 2874 2876 print "Examples:\n"; 2875 print " d hcp-dns-toolsenable_pc -i 192.168.10.1\n";2876 print " d hcp-dns-toolsenable_pc -d hmg.priv -h kevinpc\n";2877 print " ddt enable_pc -i 192.168.10.1\n"; 2878 print " ddt enable_pc -d hmg.priv -h kevinpc\n"; 2877 2879 } 2878 2880 … … 2895 2897 print " -d : domain set attachment (mandatory if option -h)\n"; 2896 2898 print "Examples:\n"; 2897 print " d hcp-dns-toolsdisable_pc -i 192.168.10.1\n";2898 print " d hcp-dns-toolsdisable_pc -d hmg.priv -h kevinpc\n";2899 print " ddt disable_pc -i 192.168.10.1\n"; 2900 print " ddt disable_pc -d hmg.priv -h kevinpc\n"; 2899 2901 } 2900 2902 … … 2928 2930 2929 2931 print <<'END'; 2930 d hcp-dns-tools- management of computer names and IP addresses2932 ddt - management of computer names and IP addresses 2931 2933 Copyright (C) 2006-2018 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr> 2932 2934 License GNU GPL version 2 or later and Perl equivalent … … 2944 2946 sub cmd_help { 2945 2947 print <<END; 2946 d hcp-dns-tools- management of computer names and IP addresses2947 2948 d hcp-dns-toolsadd-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]2949 d hcp-dns-toolsadd-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]2950 d hcp-dns-toolsadd-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]2951 d hcp-dns-toolsadd-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]2952 d hcp-dns-toolsadd-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]2953 d hcp-dns-toolschange-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]2954 d hcp-dns-toolschange-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]2955 d hcp-dns-toolschange-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2956 d hcp-dns-toolschange-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2957 d hcp-dns-toolschange-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]2958 d hcp-dns-toolschange-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]2959 d hcp-dns-toolscheck-dns2960 d hcp-dns-toolscreate-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]2961 d hcp-dns-toolscreate-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]2962 d hcp-dns-toolscreate-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]2963 d hcp-dns-toolscreate-tag [--tag|-t tag] [--comment|-c comment]2964 d hcp-dns-toolsdel-float [--pool|-p pool] [--mac|-m mac]2965 d hcp-dns-toolsdel-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2966 d hcp-dns-toolsdisable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2967 d hcp-dns-toolsdisable-float [--pool|-p pool] [--mac|-m mac]2968 d hcp-dns-toolsdisable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2969 d hcp-dns-toolsenable-float [--pool|-p pool] [--mac|-m mac]2970 d hcp-dns-toolsenable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]2971 d hcp-dns-toolsenable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]2972 d hcp-dns-toolsgen-dhcp-file2973 d hcp-dns-toolsgen-dns-file2974 d hcp-dns-toolshelp2975 d hcp-dns-toolsload-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]2976 d hcp-dns-toolsremove-pxe [--bootp|-b pxe_config]2977 d hcp-dns-toolsremove-tag [--tag|-t tag]2978 d hcp-dns-toolssearch-mac [--mac|-m mac]2979 d hcp-dns-toolsshow-domainset2980 d hcp-dns-toolsshow2981 d hcp-dns-toolsshow-pool [--no-header|-H]2982 d hcp-dns-toolsshow-pxe [--no-header|-H]2983 d hcp-dns-toolsshow-tag [--no-header|-H]2984 d hcp-dns-toolsversion2948 ddt - management of computer names and IP addresses 2949 2950 ddt add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias] 2951 ddt add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment] 2952 ddt add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment] 2953 ddt add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment] 2954 ddt add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment] 2955 ddt change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment] 2956 ddt change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] 2957 ddt change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2958 ddt change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2959 ddt change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] 2960 ddt change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag] 2961 ddt check-dns 2962 ddt create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment] 2963 ddt create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool] 2964 ddt create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment] 2965 ddt create-tag [--tag|-t tag] [--comment|-c comment] 2966 ddt del-float [--pool|-p pool] [--mac|-m mac] 2967 ddt del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2968 ddt disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2969 ddt disable-float [--pool|-p pool] [--mac|-m mac] 2970 ddt disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2971 ddt enable-float [--pool|-p pool] [--mac|-m mac] 2972 ddt enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 2973 ddt enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config] 2974 ddt gen-dhcp-file 2975 ddt gen-dns-file 2976 ddt help 2977 ddt load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind] 2978 ddt remove-pxe [--bootp|-b pxe_config] 2979 ddt remove-tag [--tag|-t tag] 2980 ddt search-mac [--mac|-m mac] 2981 ddt show-domainset 2982 ddt show 2983 ddt show-pool [--no-header|-H] 2984 ddt show-pxe [--no-header|-H] 2985 ddt show-tag [--no-header|-H] 2986 ddt version 2985 2987 2986 2988 COMMANDS … … 3035 3037 =head1 NAME 3036 3038 3037 d hcp-dns-tools- management of computer names and IP addresses3039 ddt - management of computer names and IP addresses 3038 3040 3039 3041 =head1 USAGE 3040 3042 3041 d hcp-dns-toolsadd-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]3042 d hcp-dns-toolsadd-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]3043 d hcp-dns-toolsadd-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]3044 d hcp-dns-toolsadd-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]3045 d hcp-dns-toolsadd-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]3046 d hcp-dns-toolschange-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]3047 d hcp-dns-toolschange-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]3048 d hcp-dns-toolschange-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3049 d hcp-dns-toolschange-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3050 d hcp-dns-toolschange-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]3051 d hcp-dns-toolschange-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]3052 d hcp-dns-toolscheck-dns3053 d hcp-dns-toolscreate-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]3054 d hcp-dns-toolscreate-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]3055 d hcp-dns-toolscreate-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]3056 d hcp-dns-toolscreate-tag [--tag|-t tag] [--comment|-c comment]3057 d hcp-dns-toolsdel-float [--pool|-p pool] [--mac|-m mac]3058 d hcp-dns-toolsdel-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3059 d hcp-dns-toolsdisable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3060 d hcp-dns-toolsdisable-float [--pool|-p pool] [--mac|-m mac]3061 d hcp-dns-toolsdisable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3062 d hcp-dns-toolsenable-float [--pool|-p pool] [--mac|-m mac]3063 d hcp-dns-toolsenable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]3064 d hcp-dns-toolsenable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]3065 d hcp-dns-toolsgen-dhcp-file3066 d hcp-dns-toolsgen-dns-file3067 d hcp-dns-toolshelp3068 d hcp-dns-toolsload-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]3069 d hcp-dns-toolsremove-pxe [--bootp|-b pxe_config]3070 d hcp-dns-toolsremove-tag [--tag|-t tag]3071 d hcp-dns-toolssearch-mac [--mac|-m mac]3072 d hcp-dns-toolsshow-domainset3073 d hcp-dns-toolsshow3074 d hcp-dns-toolsshow-pool [--no-header|-H]3075 d hcp-dns-toolsshow-pxe [--no-header|-H]3076 d hcp-dns-toolsshow-tag [--no-header|-H]3077 d hcp-dns-toolsversion3043 ddt add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias] 3044 ddt add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment] 3045 ddt add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment] 3046 ddt add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment] 3047 ddt add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment] 3048 ddt change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment] 3049 ddt change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] 3050 ddt change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3051 ddt change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3052 ddt change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] 3053 ddt change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag] 3054 ddt check-dns 3055 ddt create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment] 3056 ddt create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool] 3057 ddt create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment] 3058 ddt create-tag [--tag|-t tag] [--comment|-c comment] 3059 ddt del-float [--pool|-p pool] [--mac|-m mac] 3060 ddt del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3061 ddt disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3062 ddt disable-float [--pool|-p pool] [--mac|-m mac] 3063 ddt disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3064 ddt enable-float [--pool|-p pool] [--mac|-m mac] 3065 ddt enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] 3066 ddt enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config] 3067 ddt gen-dhcp-file 3068 ddt gen-dns-file 3069 ddt help 3070 ddt load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind] 3071 ddt remove-pxe [--bootp|-b pxe_config] 3072 ddt remove-tag [--tag|-t tag] 3073 ddt search-mac [--mac|-m mac] 3074 ddt show-domainset 3075 ddt show 3076 ddt show-pool [--no-header|-H] 3077 ddt show-pxe [--no-header|-H] 3078 ddt show-tag [--no-header|-H] 3079 ddt version 3078 3080 3079 3081 =head1 COMMANDS
Note: See TracChangeset
for help on using the changeset viewer.