[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 2/3] ms-planner: include PreviousShare information in Unshare events



We can't put this in $evt->{Share} because existing clients will see
it there and assume it means the resource is shared.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ms-planner | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ms-planner b/ms-planner
index af0c746..5d20cc2 100755
--- a/ms-planner
+++ b/ms-planner
@@ -234,6 +234,7 @@ sub launder_check_plan () {
                        Type => Unshare,
                        Avail => 1,
                        Info => $cshare->{Type},
+                       PreviousShare => $cshare,
                    };
                    $cshare= undef;
                }
@@ -412,6 +413,7 @@ sub cmd_get_plan () {
        my @jevts;
        foreach my $evt (@$evts) {
            my $share= $evt->{Share};
+           my $previousshare= $evt->{PreviousShare};
            my $job= $evt->{Job};
            push @jevts, {
                Time => $evt->{Time} - $plan->{Start},
@@ -419,6 +421,7 @@ sub cmd_get_plan () {
                Avail => $evt->{Avail},
                ($job ? (Job => $job) : ()),
                ($share ? (Share => $share) : ()),
+               ($previousshare ? (PreviousShare => $previousshare) : ()),
            };
        }
        $jplan->{Events}{$reso}= \@jevts;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.