flux.uri.uri module
- class flux.uri.uri.FluxURIResolver(pluginpath=None)
Bases:
object
A plugin-based Flux job URI resolver class
A FluxURIResolver loads plugins which implement different _schemes_ for resolution simple URIs to Flux job URIs. Plugins or "resolvers" are loaded from the
flux.uri.resolvers
namespace.- plugins()
Get a dict of loaded URI resolver plugins by {name: description}
- resolve(uri)
Resolve
uri
to a Flux job URI using dynamically loaded pluginsThe _scheme_ of the provided target URI determines which plugin is used to satisfy the query.
If no _scheme_ is provided, then a default scheme of
jobid
is assumed.URI "query" parameters may be supported by the underlying resolver plugin, but the
remote
andlocal
query strings are always supported and will result in forced conversion of the returned job URI to a remote or local form, respectively.Raises NotImplementedError if no plugin for _scheme_ can be found.
Raises ValueError if
uri
cannot otherwise be converted to a job uri by the plugin for _scheme_.
- class flux.uri.uri.JobURI(uri)
Bases:
URI
A Flux job/instance URI
A URI specific to a Flux instance. Same attributes as flux.uri.URI, with additional attributes to convert to a
remote
orlocal
URI.- remote
If local URI, returns a remote URI substituting current hostname. If a remote URI, returns the URI.
- local
If a remote URI, convert to a local URI. Otherwise return the URI.
- force_local = False
- property local
- property remote
- class flux.uri.uri.URI(uri)
Bases:
object
Simple URI class
Parse URI strings with urllib.parse.urlparse, but with mutable properties
- uri
copy of original uri argument
- scheme
addressing scheme
- netloc
network location part
- path
path part
- params
parameters if present
- query
query component
- query_dict
query component as dictionary
- fragment
fragment identifier