rolekit: Return values from deploy()

Miloslav Trmač mitr at
Mon Aug 4 11:46:28 UTC 2014

----- Original Message -----
> Right now, the deploy() routines have an output signature of ''
> (meaning they return on success or throw a D-BUS error, but return no
> results).
> I think we probably need to change this to 'a{ss}' (so that we can
> return a dictionary of responses). My reasoning is that we may have
> Roles that we deploy for which we will want to have one-time-only
> attributes returned (such as an autogenerated password). It seems to
> me that the best place for this would be in the response to the
> deploy() operation.
> Do you concur?

Is it _that_ necessary?  Could we instead refuse to deploy without a provided password?  What I find problematic about returning a value after deploy() like this is that if you run deploy() from client and that client crashes/gets disconnected, the value is lost.  (Secondarily, having a shell script parse the dictionary in json form would not be that great.)

(In general I don’t like untyped dictionaries, but that’s mostly aesthetic, a pain with having to manually wrap them in D-Bus objects. so neither here nor there.)

More information about the server mailing list