LGTM, thanks On Tue, Oct 7, 2014 at 4:53 PM, 'Klaus Aehlig' via ganeti-devel < ganeti-devel@googlegroups.com> wrote:
> ....based on the migration tags the respective nodes have. > > Signed-off-by: Klaus Aehlig <aeh...@google.com> > --- > src/Ganeti/HTools/Node.hs | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/Ganeti/HTools/Node.hs b/src/Ganeti/HTools/Node.hs > index 1e87980..f2a9701 100644 > --- a/src/Ganeti/HTools/Node.hs > +++ b/src/Ganeti/HTools/Node.hs > @@ -70,6 +70,7 @@ module Ganeti.HTools.Node > , addPriEx > , addSec > , addSecEx > + , checkMigration > -- * Stats > , availDisk > , availMem > @@ -645,6 +646,13 @@ addSecEx force t inst pdx = > } > in Ok r > > +-- | Predicate on whether migration is supported between two nodes. > +checkMigration :: Node -> Node -> T.OpResult () > +checkMigration nsrc ntarget = > + if migTags nsrc `Set.isSubsetOf` rmigTags ntarget > + then Ok () > + else Bad T.FailMig > + > -- * Stats functions > > -- | Computes the amount of available disk on a given node. > -- > 2.1.0.rc2.206.gedb03e5 > > -- Helga Velroyen | Software Engineer | hel...@google.com | Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores