Modulemd.Module¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The name of this module. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Modulemd.Module(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- clear_xmds()¶
Iterates through all
Modulemd.ModuleStream
entries in thisModulemd.Module
and removes any XMD sections that are present. This is generally done to trim down the metadata to only the portions that are useful to the package manager.New in version 2.14.
- copy()¶
- Returns:
A deep copy of this
Modulemd.Module
object.- Return type:
New in version 2.0.
- get_all_streams()¶
- Returns:
A list of all available stream objects associated with this module. There may be multiple streams with the same name and different version and context. The order of items in this list is not guaranteed.
- Return type:
New in version 2.0.
- get_defaults()¶
- Returns:
The defaults of this module or
None
if none.- Return type:
New in version 2.0.
- get_newest_active_obsoletes(stream, context)¶
- Parameters:
- Returns:
The newest active obsoletes attached to this module with specified stream and context (when eol_date is not set or it already occurred the obsoletes is active). If no context is passed it matches obsoletes without context.
- Return type:
New in version 2.10.
- get_obsoletes()¶
- Returns:
A list of all obsoletes attached to this module. These are pointers to the internal memory objects and must not be modified or freed.
- Return type:
New in version 2.10.
- get_stream_by_NSVC(stream_name, version, context)¶
- Parameters:
- Returns:
The requested stream object or
None
if no match was found.- Return type:
New in version 2.0.
Deprecated since version 2.2: Use
Modulemd.Module.get_stream_by_NSVCA
() instead.
- get_stream_by_NSVCA(stream_name, version, context, arch)¶
- Parameters:
stream_name (
str
) – The name of the stream to retrieve.version (
int
) – The version of the stream to retrieve. If set to zero, the version is not included in the search.context (
str
orNone
) – The context of the stream to retrieve. IfNone
, the context is not included in the search.arch (
str
orNone
) – The processor architecture of the stream to retrieve. IfNone
, the architecture is not included in the search.
- Raises:
- Returns:
The requested stream object.
None
and sets error appropriately if the provided information is not sufficient to return exactly oneModulemd.ModuleStream
result.- Return type:
New in version 2.2.
- get_stream_names()¶
- Returns:
An ordered #GStrv list of stream names in this module.
- Return type:
[
str
]
New in version 2.6.
- get_streams_by_stream_name(stream_name)¶
- Parameters:
stream_name (
str
) – The name of the stream to retrieve.- Returns:
A list of all available stream objects associated with a particular stream name, sorted highest to lowest by the version. The same version may have more than one associated context.
- Return type:
New in version 2.0.
- get_translation(stream)¶
- Parameters:
stream (
str
) – The stream to look up translations for.- Returns:
The set of translations attached to streams.
- Return type:
New in version 2.8.
- remove_streams_by_NSVCA(stream_name, version, context, arch)¶
- Parameters:
stream_name (
str
) – The name of the stream to remove.version (
int
) – The version of the stream to remove. If set to zero, matches all versions.context (
str
orNone
) – The context of the stream to remove. IfNone
, matches all stream contexts.arch (
str
orNone
) – The processor architecture of the stream to remove. IfNone
, matches all architectures.
Remove one or more
Modulemd.ModuleStream
objects from thisModulemd.Module
that match the provided parameters.New in version 2.3.
- search_streams(stream_name, version, context, arch)¶
- Parameters:
stream_name (
str
) – The name of the stream to retrieve.version (
int
) – The version of the stream to retrieve. If set to zero, the version is not included in the search.context (
str
orNone
) – The context of the stream to retrieve. IfNone
, the context is not included in the search.arch (
str
orNone
) – The processor architecture of the stream to retrieve. IfNone
, the architecture is not included in the search.
- Returns:
The list of stream objects matching the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by stream name, then by version (highest to lowest), then by context and finally by architecture.
- Return type:
New in version 2.5.
- search_streams_by_glob(stream_name, version, context, arch)¶
- Parameters:
stream_name (
str
orNone
) – The name of the stream to retrieve. IfNone
, will search all streams.version (
str
orNone
) – The version of the stream to retrieve. IfNone
, will search all versions.context (
str
orNone
) – The context of the stream to retrieve. IfNone
, will search all contexts.arch (
str
orNone
) – The processor architecture of the stream to retrieve. IfNone
, the architecture is not included in the search.
- Returns:
The list of stream objects matching all of the requested parameters. This function cannot fail, but it may return a zero-length list if no matches were found. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture.
- Return type:
All arguments to this method will be compared using fnmatch(3).
New in version 2.9.
- search_streams_by_nsvca_glob(nsvca_pattern)¶
- Parameters:
nsvca_pattern (
str
orNone
) – A glob pattern to match against the NSVCA strings of theModulemd.ModuleStream
objects in this module. IfNone
, this will match all NSVCAs.- Returns:
An array of
Modulemd.ModuleStream
objects whose NSVCA string matches the provided pattern. This function cannot fail, but may return an array of zero entries if the pattern did not match any streams. The returned streams will be in a predictable order, sorted first by module name, then stream name, then by version (highest first), then by context and finally by architecture.- Return type:
New in version 2.9.
- validate()¶
- Raises:
- Returns:
- Return type:
New in version 2.0.