Signed-off-by: Dietmar Maurer
---
PVE/APIClient/Helpers.pm | 44 +-
pveclient| 208 ---
2 files changed, 165 insertions(+), 87 deletions(-)
diff --git a/PVE/APIClient/Helpers.pm b/PVE/APIClient/Helpers.pm
index
On 6/12/18 12:33 PM, Dominik Csapak wrote:
> we have a param_mapping now, with which we can impement that
>
> e.g. instead of using:
>
> sub read_password {
> # read password
> }
>
> we can do:
>
> sub param_mapping {
> my ($name) = @_;
>
> my $password_map = ['password', sub{
>
On 6/12/18 12:33 PM, Dominik Csapak wrote:
> s/passsword/password/
>
> Signed-off-by: Dominik Csapak
> ---
> PVE/API2/AccessControl.pm | 2 +-
> PVE/CLI/pveum.pm | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/API2/AccessControl.pm
On 6/12/18 12:33 PM, Dominik Csapak wrote:
> to use everywhere we read two passwords and compare them
>
> Signed-off-by: Dominik Csapak
> ---
> src/PVE/PTY.pm | 7 +++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/PVE/PTY.pm b/src/PVE/PTY.pm
> index 23d76c0..e433c4e 100644
> ---
On 6/11/18 11:31 AM, Alwin Antreich wrote:
> - ability to mount through kernel and fuse client
> - allow mount options
> - get MONs from ceph config if not in storage.cfg
> - allow the use of ceph config with fuse client
>
> Signed-off-by: Alwin Antreich
> ---
> PVE/API2/Storage/Config.pm
I've added the logic to poll the task given by status/start until its
"stopped", this enables an usage like:
pveclient lxc create 999 && pveclient start 999 && pveclient enter 999
Signed-off-by: René Jochum
---
v2 is a rebase on master and I added the wait logic.
Signed-off-by: Dominik Csapak
---
this belongs to my series for removing 'read_password'
we also have to do the same in pmgsh if the patches get applied
to pve-common
bin/pvesh | 34 --
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/bin/pvesh
changes from v2 (sent as two separate threads for pve-common and
pve-access-control on 29.05.2018):
* only changed the coderef invocation syntax in the areas I touched anyways
(to keep the git history)
* incorporated Thomas feedback (thanks!)
* added another property to the JSONSchema for
* The JSONSchema for most API calls share some properties, which this
refactoring pulls out in a common_$type_properties hashref in order to
minimize code duplication (All parameters, which are thus added to the API
calls were optional)
* Additionally for some fields the title property is added
used to define the maximal width of the respective column in the CLI
Signed-off-by: Stoiko Ivanov
---
src/PVE/JSONSchema.pm | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index f014dc3..2865d1a 100644
--- a/src/PVE/JSONSchema.pm
+++
* Adds list for all objects currently handled in the CLI
* Adds dump for User and Group
* Uses print_api_list and print_entry from PVE::CLIHandler
Signed-off-by: Stoiko Ivanov
---
PVE/CLI/pveum.pm | 20
1 file changed, 20 insertions(+)
diff --git a/PVE/CLI/pveum.pm
These two function could serve as a generic output sub for various CLI
utilities
* print_text_table prints an array of objects in a tabular fashion,
the formating is passed as an array containg hashes with titles, maximal
lengths and default values. This way we can stay extensible, by
we only need this for cifs as this is the only type
of storage where we expect a password
Signed-off-by: Dominik Csapak
---
PVE/CLI/pvesm.pm | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index 5774364..5113715 100755
---
and replace Term::ReadLine with PVE::PTY
Signed-off-by: Dominik Csapak
---
src/PVE/CLI/pct.pm | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
index 897d595..84560b5 100755
--- a/src/PVE/CLI/pct.pm
+++
s/passsword/password/
Signed-off-by: Dominik Csapak
---
PVE/API2/AccessControl.pm | 2 +-
PVE/CLI/pveum.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/AccessControl.pm b/PVE/API2/AccessControl.pm
index e48f0cb..afcd2fa 100644
---
and replace it with param_mapping, since that implements a very
similar, but more general behaviour
also introduce a get_confirmed_password, as suggested by Thomas[1]
[1]: https://pve.proxmox.com/pipermail/pve-devel/2018-June/032338.html
pve-common:
Dominik Csapak (2):
remove
to use everywhere we read two passwords and compare them
Signed-off-by: Dominik Csapak
---
src/PVE/PTY.pm | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/PTY.pm b/src/PVE/PTY.pm
index 23d76c0..e433c4e 100644
--- a/src/PVE/PTY.pm
+++ b/src/PVE/PTY.pm
@@ -228,6 +228,13 @@ sub
we have a param_mapping now, with which we can impement that
e.g. instead of using:
sub read_password {
# read password
}
we can do:
sub param_mapping {
my ($name) = @_;
my $password_map = ['password', sub{
# read password
}, ' [$password_map],
'apicall2' =>
during this change, replace Term::ReadLine with PVE::PTY
we use this to only ask for the password once on
'pveum ticket'
Signed-off-by: Dominik Csapak
---
PVE/CLI/pveum.pm | 30 --
debian/control| 1 -
test/auth-test.pl | 12 ++--
3 files changed, 22
Signed-off-by: Dominik Csapak
---
PVE/CLI/qm.pm | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index c017a59..fe8981f 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -674,11 +674,7 @@ sub param_mapping {
my $cipassword_map =
Signed-off-by: Wolfgang Bumiller
---
With the last ebtables rule merge patches this ebtables/iptables
distinction was missing causing the disabling of a VM's firewall to
produce invalid hash accesses causing this to not be detected as a
change...
src/PVE/Firewall.pm | 3 ++-
1 file changed, 2
Signed-off-by: René Jochum
---
PVE/APIClient/Commands/lxc.pm | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/PVE/APIClient/Commands/lxc.pm b/PVE/APIClient/Commands/lxc.pm
index 66ad704..4e76f70 100644
--- a/PVE/APIClient/Commands/lxc.pm
+++ b/PVE/APIClient/Commands/lxc.pm
---
PVE/APIClient/Commands/help.pm | 2 ++
PVE/APIClient/Commands/start.pm | 39 +++
PVE/APIClient/Helpers.pm| 20
pveclient | 2 ++
4 files changed, 63 insertions(+)
create mode 100644
On 6/12/18 10:57 AM, Dietmar Maurer wrote:
> You can simply test behavior using 'qmrestore' ...
>
> Signed-off-by: Dietmar Maurer
> ---
> src/PVE/CLIHandler.pm | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
> index 8c911b2..316d29d 100644
On 6/11/18 11:23 AM, Dietmar Maurer wrote:
> Allow to return the original tree with all refs. We use this
> with our new pveclient which needs the full api definition.
> Keeping refs makes it possible to store the tree more efficiently.
>
> Signed-off-by: Dietmar Maurer
> ---
>
On 6/11/18 11:31 AM, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich
> ---
> PVE/VZDump.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> index a0376ef9..7fc69f98 100644
> --- a/PVE/VZDump.pm
> +++ b/PVE/VZDump.pm
> @@ -223,7
You can simply test behavior using 'qmrestore' ...
Signed-off-by: Dietmar Maurer
---
src/PVE/CLIHandler.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
index 8c911b2..316d29d 100644
--- a/src/PVE/CLIHandler.pm
+++ b/src/PVE/CLIHandler.pm
@@
On 6/12/18 10:50 AM, Wolfgang Bumiller wrote:
> Otherwise cases like trying to restore a protected VM would
> leave a lock in the config.
>
thanks for the followup, applied
> Signed-off-by: Wolfgang Bumiller
> ---
> PVE/API2/Qemu.pm | 36
> 1 file changed,
Otherwise cases like trying to restore a protected VM would
leave a lock in the config.
Signed-off-by: Wolfgang Bumiller
---
PVE/API2/Qemu.pm | 36
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index
applied series, and sending a followup commit...
On Fri, Jun 01, 2018 at 04:37:37PM +0200, Thomas Lamprecht wrote:
> This aligns the VM creation code more with the CT one.
> We to not lock and then execute a worker but rather fork the worker
> first and lock there then, which allows nested
LGTM
On 2018-06-12 06:24, Dietmar Maurer wrote:
> And implement a new command to setup defaults.
>
> Signed-off-by: Dietmar Maurer
> ---
> PVE/APIClient/Commands/help.pm | 2 +
> PVE/APIClient/Commands/remote.pm | 11 +--
> PVE/APIClient/Config.pm | 189
>
On 6/11/18 11:31 AM, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich
> ---
> debian/control | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/debian/control b/debian/control
> index 2cf585a..908dd24 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -27,6 +27,7 @@ Depends:
On 6/7/18 2:34 PM, Wolfgang Link wrote:
> Qemu can use qcow2 format to make linked clones.
> LXC we do not have this, and so there is no way to make
> linked clone on directory storage.
>
> With the 'lxc_clone' feature property we can distinguish between
> LXC and QEMU.
>
I'm objecting calling
On Tue, Jun 12, 2018 at 06:34:54AM +0200, Dietmar Maurer wrote:
> I don't really like the idea to use different file names:
>
> .config
> client
> .pveclient
>
> ???
It's just two, not 3 ;-)
In case we ever add more tools I didn't want to recreate the mess in
/run ;-) (/run/pve-cluster/ as
34 matches
Mail list logo