flux.uri.uri module
- class flux.uri.uri.FluxURIResolver(pluginpath=None)
Bases:
objectA 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.resolversnamespace.- plugins()
Get a dict of loaded URI resolver plugins by {name: description}
- resolve(uri)
Resolve
urito 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
jobidis assumed.URI "query" parameters may be supported by the underlying resolver plugin, but the
remoteandlocalquery 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
uricannot otherwise be converted to a job uri by the plugin for _scheme_.
- class flux.uri.uri.JobURI(uri, remote_hostname=None)
Bases:
URIA Flux job/instance URI
A URI specific to a Flux instance. Same attributes as flux.uri.URI, with additional attributes to convert to a
remoteorlocalURI.- 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.
- Parameters
uri (str) -- The URI string with which to initialize the JobURI instance.
remote_hostname (str) -- If
uriis a local URI, use the provided hostname instead of the current hostname when rendering the remote URI.
- force_local = False
- property local
- property remote
- class flux.uri.uri.URI(uri)
Bases:
objectSimple 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