diff --git a/src/Ganeti/OpCodes.hs b/src/Ganeti/OpCodes.hs index fde6b640c2628eb1e0a4a5a832e4e732c18496fb..66d6e793e9ba0301e573f72f9b04a439b5510312 100644 --- a/src/Ganeti/OpCodes.hs +++ b/src/Ganeti/OpCodes.hs @@ -6,7 +6,7 @@ {- -Copyright (C) 2009, 2010, 2011, 2012 Google Inc. +Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,6 +44,7 @@ module Ganeti.OpCodes , MetaOpCode(..) , wrapOpCode , setOpComment + , setOpPriority ) where import Data.Maybe (fromMaybe) @@ -667,3 +668,8 @@ wrapOpCode = MetaOpCode defOpParams setOpComment :: String -> MetaOpCode -> MetaOpCode setOpComment comment (MetaOpCode common op) = MetaOpCode (common { opComment = Just comment}) op + +-- | Sets the priority on a meta opcode. +setOpPriority :: OpSubmitPriority -> MetaOpCode -> MetaOpCode +setOpPriority prio (MetaOpCode common op) = + MetaOpCode (common { opPriority = prio }) op