]> git.proxmox.com Git - pve-storage.git/commitdiff
scan storage: order scanned shares alphabetically
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 08:25:32 +0000 (10:25 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 10:11:59 +0000 (12:11 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pvesm.pm

index c5e2d910c7d09035c4fbd7f0f7a64fa19dc3d499..4f934d67b91015954b3adbbc402f7b9d7cf9b812 100755 (executable)
@@ -434,7 +434,7 @@ __PACKAGE__->register_method ({
        my $res = PVE::Storage::scan_nfs($server);
 
        my $data = [];
-       foreach my $k (keys %$res) {
+       foreach my $k (sort keys %$res) {
            push @$data, { path => $k, options => $res->{$k} };
        }
        return $data;
@@ -503,7 +503,7 @@ __PACKAGE__->register_method ({
        my $res = PVE::Storage::scan_cifs($server, $username, $password, $domain);
 
        my $data = [];
-       foreach my $k (keys %$res) {
+       foreach my $k (sort keys %$res) {
            push @$data, { share => $k, description => $res->{$k} };
        }
 
@@ -553,7 +553,7 @@ __PACKAGE__->register_method ({
        my $res = PVE::Storage::scan_nfs($server);
 
        my $data = [];
-       foreach my $path (keys %$res) {
+       foreach my $path (sort keys %$res) {
            if ($path =~ m!^/([^\s/]+)$!) {
                push @$data, { volname => $1 };
            }
@@ -603,7 +603,7 @@ __PACKAGE__->register_method ({
        my $res = PVE::Storage::scan_iscsi($param->{portal});
 
        my $data = [];
-       foreach my $k (keys %$res) {
+       foreach my $k (sort keys %$res) {
            push @$data, { target => $k, portal => join(',', @{$res->{$k}}) };
        }