5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-09 05:17:35 +03:00
Commit Graph

685 Commits

Author SHA1 Message Date
Dietmar Maurer
32f8e0c75b improve doc generator, introduce verbose_description property 2016-05-19 13:11:26 +02:00
Dietmar Maurer
c8e5d28e29 export bond_modes (define with 'our' instead of 'my')
So that other people can use that from outside.
2016-05-18 16:49:19 +02:00
Wolfgang Bumiller
b8246bfca7 typo fix 2016-05-18 12:55:50 +02:00
Dietmar Maurer
5ee7c8243f bump version to 4.0-63 2016-05-18 11:23:49 +02:00
Dominik Csapak
5d662b31b7 show warning when using VLAN 1 on a VLAN aware bridge
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-18 11:23:03 +02:00
Wolfgang Bumiller
899f8c4aa5 support for predictable network interface device names
Based on patch from: Igor Vlasenko <viy@altlinux.org>
2016-05-17 16:14:15 +02:00
Dietmar Maurer
cee324e053 bump version to 4.0-62 2016-05-14 11:27:46 +02:00
Dietmar Maurer
1801bdaa93 replace the smartmatch operator 2016-05-12 11:37:00 +02:00
Dietmar Maurer
b7ef63ab0a re-enable run_cli, which is still in use 2016-05-12 07:46:30 +02:00
Dietmar Maurer
2289890bad print_property_string: correctly implement skip parameter 2016-05-12 07:25:51 +02:00
Dietmar Maurer
c88c582dec fix keyAlias test 2016-05-11 13:04:01 +02:00
Dietmar Maurer
dc1401ad0f bump version to 4.0-61 2016-05-11 11:10:36 +02:00
Dietmar Maurer
d8c2b9477c JSONSchema fix property sort order
order: default_key, required options, other
2016-05-11 10:57:06 +02:00
Dietmar Maurer
bf27456b4e remove PodParser.pm, implement keyAlias feature
The keyAlias feature replaces the previous 'group_ feature.
2016-05-11 10:02:34 +02:00
Dietmar Maurer
457c3fcb1e schema_get_type_text: return format_description if available 2016-05-07 10:57:14 +02:00
Dietmar Maurer
825247bdb2 update changelog 2016-05-04 08:11:02 +02:00
Emmanuel Kasper
25eea093dd When starting in debug mode, starts the daemon without going through systemctl
This fixes the problem that debug options for daemons were ignored and sets
the following behaviour for the daemons when -debug 1 is given
 * start on foreground with debug ouput on the console
 * do not start a sytemd unit

Starting the systemd unit in debug mode makes less sense because:
 * systemd will put the daemon in the background
 * systemd ignores environment variables so the only way to start
 the daemon with options would be through reading a config file

tested with pveproxy, pve-ha-lrm, pve-ha-crm
2016-05-04 08:08:37 +02:00
Dietmar Maurer
12e8ae4c71 set RELEASE=4.2 2016-05-03 07:11:27 +02:00
Dietmar Maurer
6af06fb0c0 bump version to 4.0-60 2016-05-03 07:09:37 +02:00
Fabian Grünbichler
2d6b3a90db Use run_command instead of system
and explicitly note that those calls are allowed to fail and
are wrapped in eval {} on purpose.
2016-05-03 07:03:10 +02:00
Dietmar Maurer
a7f30ebf27 SectionConfig: sort values return by lookup_types
They are use to generate type enums in the API.
2016-04-30 12:01:20 +02:00
Dietmar Maurer
0a7de8204e sort keymap array 2016-04-30 11:54:20 +02:00
Dietmar Maurer
08aa41d725 SectionConfig.pm: sort type enum
So that we can better detect API changes.
2016-04-30 11:50:55 +02:00
Dietmar Maurer
b546f33e58 fix coding style 2016-04-19 12:39:04 +02:00
Fabian Grünbichler
f922b8a8be Fix indexed parameter conversion in documentation
this would previously convert properties that matched
'^([a-z]+)(\d+)$' even if they were not part of an indexed
properties series (which always start with 0).

This fixes previously wrongly converted properties:
-smbios1
-server2
2016-04-19 12:29:31 +02:00
Fabian Grünbichler
2c2a5fd3df Fix indexed parameter conversion in API dump
this would previously skip (i.e., ignore) properties that
matched '^([a-z]+)(\d+)$' even if they were not part of an
indexed properties series (which always start with 0).

This fixes previously missing API dump occurrences of:
-smbios1
-comments6
-netmask6
-gateway6
-address6
-dns1
-dns2
-dns3
-server1
-server2
2016-04-19 12:26:26 +02:00
Dietmar Maurer
a76028f847 bump version to 4.0-59 2016-04-13 06:37:47 +02:00
Wolfgang Bumiller
dd44486ecb Fix #908: cleanup OVS ports in tap_unplug
tap_unplug() is only called in hotplugging functions which
perform a tap_plug() afterwards, and and in qemu-server's
bridge-down script.
The OVS port cleanup for non-firewall ports was done only in
tap_plug(), which means that in the case when qemu exits and
the tap device disappears, the OVS port for it stays.

With this patch the cleanup happens in both tap_unplug() and
tap_plug() to avoid problems with upgrades on systems
where there have already been ports leaked.
2016-04-13 06:36:50 +02:00
Dietmar Maurer
b0e5e9fa0c another fix for $get_property_description() - remove format 'pod'
Instead, use the same enum as in usage_str().
2016-04-07 17:30:52 +02:00
Dietmar Maurer
f77a3f7958 add pve-docs to README.dev 2016-04-07 12:58:00 +02:00
Dietmar Maurer
305068a7e5 pass correct format to $get_property_description() 2016-04-07 07:52:35 +02:00
Fabian Grünbichler
6577ea458f Fix uninitialized subroutine error 2016-04-05 15:22:27 +02:00
Dietmar Maurer
ca060a8160 update changelog 2016-04-05 12:25:20 +02:00
Fabian Grünbichler
48df47a466 Add validate_ssh_public_keys
validate format of SSH public keys using ssh-keygen -l and
temp files.
2016-04-05 12:24:38 +02:00
Dietmar Maurer
344c19ff41 update changelog 2016-04-05 12:23:33 +02:00
Fabian Grünbichler
4845032a46 Replace 'string' with 'filepath' for mapped params
For the CLI man pages and documentation, mapped parameters
('content' strings in API2 which are loaded from file paths
in CLI) get special treatment and are displayed with the
type 'filepath'.
2016-04-05 12:22:46 +02:00
Fabian Grünbichler
408976c6f7 Handle string parameter to file content replacement
This is modelled after the way read_password() is used to
wrap -password parameters on the command line. If a mapping
for a certain API method and parameter is defined in the
sub class of CLIHandler.pm, the parameter is interpreted as
a file path on the command line and the parameter is
filled with the string contents of the referenced file.

This allows us to use the same API schema once in API2, but
overwrite the behaviour for individual parameters in the CLI
tools when desired.
2016-04-05 12:22:38 +02:00
Dietmar Maurer
b9df2e6063 bump version to 4.0-58 2016-04-05 06:28:59 +02:00
Dietmar Maurer
5a873e6d35 sendmail: minor cleanups 2016-04-05 06:27:29 +02:00
Thomas Lamprecht
b61a47dbeb Tools: add sendmail
can be used to send multipart (HTML, plain) mails to one or more
recipients at once.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-04-05 06:21:45 +02:00
Wolfgang Bumiller
26598a513b Tools: tempfile and tempfile_contents 2016-04-05 06:18:41 +02:00
Wolfgang Bumiller
d0229d1d82 fix O_PATH value 2016-04-05 06:14:12 +02:00
Dietmar Maurer
8506c60dba generate_typetext: avoid warning with aliases 2016-04-03 16:09:07 +02:00
Dietmar Maurer
ed258d2884 update changelog 2016-04-01 09:02:37 +02:00
Wolfgang Bumiller
2ec5361456 generate_typetext: handle enums and booleans automatically 2016-04-01 09:01:30 +02:00
Wolfgang Bumiller
445e8267b2 property strings: introduce key grouping feature
Use case: networks for kvm use a <model>=<macaddr> scheme
where the model represents the network card. The schema
previously could not represent this, so we now introduce a
'group' key which works similar to an alias with the
difference that the data structure also gets an entry named
after the group filled with the name of the key that was
used to fill it.

Usage:
{
    virtio => { group => 'model' },
    e1000 => { group => 'model' },
    model => {
        type => 'string',
        pattern => ... # pattern for mac address
        ...
    }
}

Now the string 'virtio=aa:bb:cc:dd:ee:ff' gets parsed into:
{
    model => 'virtio',
    virtio => 'aa:bb:cc:dd:ee:ff'
}

Error examples:
  With bad value:
    virtio: value does not match the regex pattern
  Missing group:
    model: property is missing and it is not optional

parse_net() however used the 'macaddr' key for the mac
address, which can be achieved by aliasing 'model' to
'macaddr':
{
    virtio => { group => 'model' },
    e1000 => { group => 'model' },
    model => { alias => 'macaddr' },
    macaddr => {
        type => 'string',
        pattern => ... # pattern for mac address
        ...
    }
}

Then the above string will be parsed into:
{
    model => 'virtio',
    macaddr => 'aa:bb:cc:dd:ee:ff'
}

The error output now always shows the 'macaddr' key:
Error examples:
  With bad value:
    macaddr: value does not match the regex pattern
  Missing group:
    macaddr: property is missing and it is not optional

In order to support specifying no mac address we can now set
model.default_key = 1 and macaddr.optional = 1.
That way `virtio,bridge=vmbr2` gets parsed correctly into
just a model with no macaddr. This works because default
keys as aliases have previously not been supported and would
not have been aliased accordingly. This case is now also
taken into account when printing default keys, which is now
skipped if it is also an alias.
2016-04-01 09:00:53 +02:00
Dietmar Maurer
c3608045b8 bump version to 4.0-57 2016-04-01 07:17:09 +02:00
Fabian Grünbichler
34f860a262 fix #923: uninitalized value in remove_lock 2016-04-01 07:15:21 +02:00
Dietmar Maurer
df79b4284d get_property_description: introduce new $style parameter
config => colon separated config files
arg => command line argument
fixed => fixed command line argument (see usage_str())
2016-03-31 05:57:37 +02:00
Wolfgang Bumiller
166e27c74f cleanup: whitespace and than/then typo 2016-03-23 11:38:26 +01:00