5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-02-01 17:46:59 +03:00

600 Commits

Author SHA1 Message Date
Wolfgang Bumiller
7a82210017 don't reorder unknown interface types
Giving unknown interfaces an order-id of 0 caused them to
always be on top of the interfaces file. This is often
undesired. Instead we now only take type-ordering into
account when both interfaces which are being compared have a
known type, and otherwise only use the priority attribute.
This should result in a more stable modification of
interfaces.

Fixes #747
2015-10-07 13:43:28 +02:00
Dietmar Maurer
d6d19fac6b bump version to 4.0-30 2015-10-07 08:57:24 +02:00
Dietmar Maurer
4be9b5f7de api_clone_schema: use Clone::clone instead of Storable::dclone
This works with CODE refs like 'completion' helpers.
2015-10-07 08:55:42 +02:00
Dietmar Maurer
051d9b42a8 depend on libclone-perl 2015-10-07 08:54:25 +02:00
Dietmar Maurer
3a12295c00 bump version to 4.0-29 2015-10-05 12:32:13 +02:00
Wolfgang Bumiller
cd9bd2526a Tools::IPV4OCTET: move longer alternatives forward
In an alternation /a|b|c/ the first match matches, so while
'1.1.1.121' matches /^$IPV4RE$/ (note the ^ and $ anchors),
parsing a line like /nameserver ($IPV4RE)/ would only
extract '1.1.1.12', ignoring the last '1' due to the /[1-9]/
alternative matching before the /1[0-9]/ one.
2015-10-05 12:31:24 +02:00
Wolfgang Bumiller
176b1186bd INotify::read_etc_resolv_conf: ipv6 support 2015-10-05 12:30:44 +02:00
Dietmar Maurer
027e1e4e39 bump version to 4.0-28 2015-10-02 13:42:53 +02:00
Dietmar Maurer
5ffbe2f10a run_cli_handler: add no_init for lxc mount hook 2015-10-02 13:41:15 +02:00
Dietmar Maurer
5ae87c41eb run_cli_handler: use paramenter name 'prepare' instead of 'preparefunc' 2015-10-02 11:31:43 +02:00
Dietmar Maurer
aa9b9af5a8 run_cli_handler: test for unknown parameters 2015-10-02 11:24:43 +02:00
Dietmar Maurer
2fff84d929 print_simple_pod_manpage: fix test for "not initialized" 2015-10-02 11:02:49 +02:00
Dietmar Maurer
9fa98bfa20 bump version to 4.0-27 2015-10-02 10:43:39 +02:00
Dietmar Maurer
891b798d52 CLIHandler: make read_password an optional class method
And correctly hide password option when generation man pages.
I also define a new method run_cli_handler() meant to replace
the old run_cli() code, using named parameters.
2015-10-02 10:37:50 +02:00
Dietmar Maurer
820e360148 bump version to 4.0-26 2015-10-01 11:26:27 +02:00
Wolfgang Bumiller
94dd443532 added JSONSchema::print_property_string
This will be used to format comma-separated property list
strings.
2015-10-01 11:24:24 +02:00
Wolfgang Bumiller
b944a22a6d JSONSchema: added disk-size format
It's a special case in some output functions as it needs
to use format_size(), so it'll be its own type and handled
in the upcoming print_property_string() function.
2015-10-01 11:24:00 +02:00
Wolfgang Bumiller
878fea8ef0 Added PVE::JSONSchema::parse_size/format_size 2015-10-01 11:23:21 +02:00
Wolfgang Bumiller
2421fba133 Support named formats in typetext generation
Now that generate_typetext doesn't need to be accessed
anymore it made sense to move it to PodParser.pm as this is
the only place that uses it now.
PodParser now needs access to JSONSchema's $format_list, so
a JSONSchema::get_format was added.
2015-10-01 11:22:39 +02:00
Dietmar Maurer
2f53cc3919 bump version to 4.0-25 2015-09-25 07:04:53 +02:00
Alexandre Derumier
9c8089450c read|write network interfaces : add support for vlan interfaces
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-25 06:57:24 +02:00
Dietmar Maurer
42b8a14812 bump version to 4.0-24 2015-09-23 08:22:15 +02:00
Wolfgang Bumiller
990b6a1a5b PodParser: use generate_typetext 2015-09-23 08:11:10 +02:00
Wolfgang Bumiller
751ffbdd03 JSONSchema::generate_typetext: default_key support 2015-09-23 08:10:46 +02:00
Wolfgang Bumiller
2f9e609a46 JSONSchema: verify comma-separated property strings 2015-09-23 08:08:43 +02:00
Wolfgang Bumiller
095b88fd51 Added JSONSchema::parse_property_string 2015-09-23 08:04:54 +02:00
Wolfgang Bumiller
40605176f3 generate_typetext: better handling of only-optional cases 2015-09-23 08:01:44 +02:00
Wolfgang Bumiller
8c2d3ca159 JSONSchema::generate_typetext: raw typetext support
Instead of a format_description which ends up in the
documentation as 'key=<$desc>', a typetext can now be used
for an as-is string. (Eg. for when the key isn't required,
like for volumes in mountpoints, typetext can be set to
[volume=]volume)
2015-09-23 07:59:46 +02:00
Wolfgang Bumiller
703c1f8831 JSONSchema: pve-ipv4/6-config and CIDR split
Split CIDR schema into CIDRv4 and CIDRv6 and added
pve-ipv4-config and pve-ipv6-config formats.
2015-09-22 08:01:58 +02:00
Wolfgang Bumiller
86425a09da JSONSchema::check_object_warn
A version of check_object that warns and returns true or
false.
2015-09-22 08:01:48 +02:00
Wolfgang Bumiller
d5d10f8580 JSONSchema: format_description + generate_typetext
Helper to generate schema-based typetext properties for
comma separated list configuration strings (like -net0 and -ip)
using a 'format_description' schema property.
2015-09-22 08:00:59 +02:00
Dietmar Maurer
395c18045f bump version to 4.0-23 2015-09-21 12:11:36 +02:00
Stefan Priebe
ce1c3cc44a support QinQ / vlan stacking
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2015-09-21 09:30:15 +02:00
Dietmar Maurer
0cb4d663f5 SectionConfig: protect against newline injection 2015-09-20 10:34:04 +02:00
Dietmar Maurer
d90a2fd0fc print_bash_completion: handle special case passing $arg_param as string 2015-09-19 10:39:20 +02:00
Dietmar Maurer
771d18f5c7 createSchema: include type property 2015-09-18 08:51:09 +02:00
Dietmar Maurer
58d9e664de bug fix: PVE::Tools::split_args returns a reference 2015-09-18 08:37:48 +02:00
Dietmar Maurer
024a86371e pass whole command line to bash completion function 2015-09-18 07:46:56 +02:00
Dietmar Maurer
be3215985f print_bash_completion: correctly handle shell quoting 2015-09-18 07:45:32 +02:00
Dietmar Maurer
0d8380351a fix SectionConfig updateSchema for classes without plugins. 2015-09-18 07:18:00 +02:00
Dietmar Maurer
a3530f55ed SectionConfig: fix createSchema
correctly compute required properties.
2015-09-18 07:14:43 +02:00
Dietmar Maurer
516dfb55e1 updateSchema: code cleanup - avoid assigning same value multiple times 2015-09-17 17:45:59 +02:00
Wolfgang Bumiller
952fd95e84 Tools: add unshare system call
Including the important CLONE_* constants.
2015-09-17 13:20:15 +02:00
Emmanuel Kasper
87cb0e6064 Allow top level devel domain name up to 63 characters in email adresses
This corrects the server side validation, and fixes the bug: https://bugzilla.proxmox.com/show_bug.cgi?id=716
2015-09-17 12:56:48 +02:00
Dietmar Maurer
2c3c3ffe88 update changelog 2015-09-16 10:51:29 +02:00
Alexandre Derumier
685a2528b1 add bridge_vlan_aware
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-09-16 10:48:52 +02:00
Dietmar Maurer
f3a423a8e0 bump version to 4.0-22 2015-09-16 09:11:48 +02:00
Wolfgang Bumiller
fcdc0cfc8a Tools::run_command: array of arrays special case
Passing an array of arrays to run_command will cause each
array to be treated like a command piped to the following
command. Each argument is shell-quoted unless its passed by
reference.
2015-09-16 09:08:53 +02:00
Wolfgang Bumiller
bd9c3a3654 document run_command 2015-09-16 09:07:42 +02:00
Dietmar Maurer
5de0dd1fbe bump version to 4.0-21 2015-09-15 09:04:24 +02:00