clostack.payload

Functions to work with appropriate cloudstack payloads.

build-args

(build-args args)

Build arguments, ready to be signed.

build-payload

(build-payload config opcode args)(build-payload {:keys [api-key api-secret expiration]} args)

Build a signed payload for a given config, opcode and args triplet

default-expiration

serialize-pair

(serialize-pair [k v])

Encode a key/value pair

sign

(sign query api-secret)

Sign the given query

signable-args

(signable-args path)

Transform a string to its expected signable form

transform-arg

(transform-arg [k v])

transform argument into a list of key/value pairs.

transform-args

(transform-args args)

Transform arguments into a vector of key/value pairs.

transform-map

(transform-map top-k [i m])

Encode a map argument appropriately

transform-maps

(transform-maps k maps)

For a list of maps, produce the expected key/value pairs.