object KadminUtils extends LazyLogging
- Source
- KadminUtils.scala
- Alphabetic
- By Inheritance
- KadminUtils
- LazyLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def defaultUnknownError[R]: Either[ErrorCase, R]
-
def
destroyTickets(): Expect[Unit]
Destroys the user's tickets.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def expectAndSendPassword[R](principal: String, password: String)(expectBlock: ExpectBlock[Either[ErrorCase, R]]): RegexWhen[Either[ErrorCase, R]]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def insufficientPermission[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): RegexWhen[Either[ErrorCase, R]]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
listTickets(options: String = ""): Expect[Seq[Ticket]]
Lists cached tickets.
Lists cached tickets.
- options
options to pass to the
klist
command.- returns
an Expect that returns the list of all the cached tickets.
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
obtainTGT(options: String = "", principal: String, password: Option[String] = None, keytab: Option[File] = None): Expect[Either[ErrorCase, Unit]]
Obtains a ticket granting ticket for
principal
either usingpassword
orkeytab
.Obtains a ticket granting ticket for
principal
either usingpassword
orkeytab
.- options
options to pass to the
kinit
command.- returns
Either an ErrorCase or Unit if the operation was successful.
-
def
parseDateTime(dateTimeString: ⇒ String): Either[UnknownError, ExpirationDateTime]
Tries to parse a date time string returned by a kadmin
get_principal
operation.Tries to parse a date time string returned by a kadmin
get_principal
operation.The string must be in the format
"EEE MMM dd HH:mm:ss zzz yyyy"
, see Joda Time DateTimeFormat for an explanation of the format.If the string is either
"[never]"
or"[none]"
theNever
object will be returned. Otherwise the string will be parsed in the following way:- Any text following the year, as long as it is separated with a space, will be removed from
dateTimeString
. - Since
DateTimeFormat
cannot process time zones, the timezone will be removed fromdateTimeString
, and an attempt to match it against one ofDateTimeZone.getAvailableIDs
will be made. If no match is found the default timezone will be used. - The default locale will be used when reading the date. This is necessary for the day of the week (EEE) and the month of the year (MMM) parts.
- Finally a
DateTimeFormat
will be constructed using the format above (except the time zone), the computed timezone and the default locale. - The clean
dateString
(the result of step 1 and 2) will be parsed to aDateTime
using the format constructed in step 4.
- dateTimeString
the string containing the date time.
- returns
An
UnknownError
in case the parsing failed.Never
or anAbsoluteDateTime
on success.
- Any text following the year, as long as it is separated with a space, will be removed from
-
def
parseDuration(durationString: String): Either[UnknownError, FiniteDuration]
Parses
durationString
into a FiniteDuration.Parses
durationString
into a FiniteDuration.The expected format is "d days? HH:mm:ss".
- durationString
the string to parse.
- returns
An
UnknownError
in case the parsing failed. AFiniteDuration
on success.
- def passwordExpired[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): StringWhen[Either[ErrorCase, R]]
- def passwordIncorrect[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): RegexWhen[Either[ErrorCase, R]]
- def passwordTooShort[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): StringWhen[Either[ErrorCase, R]]
- def passwordWithoutEnoughCharacterClasses[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): StringWhen[Either[ErrorCase, R]]
- def policyDoesNotExist[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): StringWhen[Either[ErrorCase, R]]
- def principalDoesNotExist[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): StringWhen[Either[ErrorCase, R]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unknownError[R](expectBlock: ExpectBlock[Either[ErrorCase, R]]): RegexWhen[Either[ErrorCase, R]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )