Modulemd.ModuleStream¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
The processor architecture of this module stream. |
||
r/w/c |
The context of this module stream. Distinguishes between streams with the same version but different dependencies due to module stream expansion. |
||
r |
The metadata version of this ModuleStream object. Read-only. |
||
r/w/co |
The name of the module providing this stream. |
||
r/w/co |
The name of this module stream. |
||
r/w/c |
The version of this module stream |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Modulemd.ModuleStream(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod new(mdversion, module_name, module_stream)¶
- Parameters:
- Returns:
A newly-allocated
Modulemd.ModuleStreamobject of the requested metadata version.- Return type:
New in version 2.0.
- classmethod read_file(path, strict, module_name, module_stream)¶
- Parameters:
path (
str) – The path to a YAML document containing a module stream definition.strict (
bool) – Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it.module_name (
strorNone) – An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git.module_stream (
strorNone) – An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git.
- Raises:
- Returns:
A newly-allocated
Modulemd.ModuleStreamobject if the YAML file was valid and contained exactly onedocument: modulemdsubdocument.Noneif the document fails validation or multiple documents are encountered and sets error appropriately. SeeModulemd.ModuleIndexfor functions to read in multiple-subdocument YAML.- Return type:
Create a
Modulemd.ModuleStreamobject from a YAML file.Note: This function also reads modulemd-packager v2 and v3 documents, which are transparently returned as
Modulemd.ModuleStream(V2) objects. However, if a modulemd-packager v3 document (Modulemd.PackagerV3) is encountered and it uses buildopts (Modulemd.Buildopts) in one or more build configurations, only the buildopts present in the first listed configuration (if any) will be applied to the returnedModulemd.ModuleStreamV2object.New in version 2.0.
Deprecated since version 2.11: Use
Modulemd.read_packager_file() instead.
- classmethod read_string(yaml_string, strict, module_name, module_stream)¶
- Parameters:
yaml_string (
str) – A YAML document string containing a module stream definition.strict (
bool) – Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it.module_name (
strorNone) – An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git.module_stream (
strorNone) – An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git.
- Raises:
- Returns:
A newly-allocated
Modulemd.ModuleStreamobject if the YAML string was valid and contained exactly onedocument: modulemdsubdocument.Noneif the document fails validation or multiple documents are encountered and sets error appropriately. SeeModulemd.ModuleIndexfor functions to read in multiple-subdocument YAML.- Return type:
Create a
Modulemd.ModuleStreamobject from a YAML string.Note: This function also reads modulemd-packager v2 and v3 documents, which are transparently returned as
Modulemd.ModuleStream(V2) objects. However, if a modulemd-packager v3 document (Modulemd.PackagerV3) is encountered and it uses buildopts (Modulemd.Buildopts) in one or more build configurations, only the buildopts present in the first listed configuration (if any) will be applied to the returnedModulemd.ModuleStreamV2object.New in version 2.0.
Deprecated since version 2.11: Use
Modulemd.read_packager_string() instead.
- build_depends_on_stream(module_name, stream_name)¶
- Parameters:
- Returns:
Trueif any of theModulemd.Dependenciesobjects associated with this module applies to the provided module name and stream in the build-time dependencies.- Return type:
New in version 2.1.
- copy(module_name, module_stream)¶
- Parameters:
- Returns:
A newly-allocated
Modulemd.ModuleStreamobject that is a complete copy of self, optionally with a new stream name.- Return type:
Copies a
Modulemd.ModuleStream, optionally assigning it a new stream name in the process.New in version 2.0.
- depends_on_stream(module_name, stream_name)¶
- Parameters:
- Returns:
Trueif any of theModulemd.Dependenciesobjects associated with this module applies to the provided module name and stream in the runtime dependencies.- Return type:
New in version 2.1.
- equals(self_2)¶
- Parameters:
self_2 (
Modulemd.ModuleStream) – AModulemd.ModuleStreamobject.- Returns:
- Return type:
Checks if self and self_2 are identical objects.
New in version 2.3.
- get_NSVCA()¶
- Returns:
The NSVCA of this module stream. The returned format is described here.
Noneif module name or stream stream is unknown.- Return type:
New in version 2.2.
- get_arch()¶
- Returns:
Module architecture object. Indicates to which processor architecture this
Modulemd.ModuleStreamapplies.- Return type:
New in version 2.2.
- get_context()¶
- Returns:
Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion.
- Return type:
New in version 2.0.
- get_mdversion()¶
- Returns:
The metadata version of this
Modulemd.ModuleStream.- Return type:
New in version 2.0.
- get_nsvc()¶
- Returns:
The NSVC (name:stream:py:data::version<Modulemd.ModuleStream.props.version>[
:context]) of this module stream.Noneif module name or stream stream is unknown.- Return type:
Retrieves a representation of the module name, stream name, version and context of this
Modulemd.ModuleStreamin the formmodule_name:stream_name:version:context. Note that this excludes the architecture of the module stream and as such is not guaranteed to be unique within a repository.New in version 2.0.
- get_version()¶
- Returns:
The version of this
Modulemd.ModuleStream.- Return type:
- set_arch(arch)¶
- Parameters:
arch (
strorNone) – Module architecture. Indicates to which processor architecture thisModulemd.ModuleStreamapplies.
New in version 2.2.
- set_context(context)¶
- Parameters:
context (
strorNone) – Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion.
New in version 2.0.
- set_version(version)¶
- Parameters:
version (
int) – The version of thisModulemd.ModuleStream.
New in version 2.0.
- upgrade(mdversion)¶
- Parameters:
mdversion (
int) – The metadata version to upgrade to. If zero, upgrades to the highest-supported version.- Raises:
- Returns:
A newly-allocated
Modulemd.ModuleStreamcopy of this object upgraded to the requested version. ReturnsNoneand sets error appropriately if the upgrade could not be completed automatically.- Return type:
Return an upgraded copy of this object. Does not modify the original.
New in version 2.0.
Deprecated since version 2.10: Use
Modulemd.ModuleStream.upgrade_ext() instead.
- upgrade_ext(mdversion)¶
- Parameters:
mdversion (
int) – The metadata version to upgrade to. If zero, upgrades to the highest-supported version.- Raises:
- Returns:
A newly-allocated
Modulemd.Modulecontaining a copy of this object upgraded to the requested version, possibly with multiple streams. ReturnsNoneand sets error appropriately if the upgrade could not be completed automatically.- Return type:
Does not modify the original
Modulemd.ModuleStreamobject, from.New in version 2.10.
- validate()¶
- Raises:
- Returns:
Trueif theModulemd.ModuleStreampassed validation.Falseand sets error appropriately if validation fails.- Return type:
Verifies that all stored values are internally consistent and that the module is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents.
New in version 2.0.
- do_build_depends_on_stream(module_name, stream_name) virtual¶
- Parameters:
- Returns:
Trueif any of theModulemd.Dependenciesobjects associated with this module applies to the provided module name and stream in the build-time dependencies.- Return type:
New in version 2.1.
- do_copy(module_name, module_stream) virtual¶
- Parameters:
- Returns:
A newly-allocated
Modulemd.ModuleStreamobject that is a complete copy of self, optionally with a new stream name.- Return type:
Copies a
Modulemd.ModuleStream, optionally assigning it a new stream name in the process.New in version 2.0.
- do_depends_on_stream(module_name, stream_name) virtual¶
- Parameters:
- Returns:
Trueif any of theModulemd.Dependenciesobjects associated with this module applies to the provided module name and stream in the runtime dependencies.- Return type:
New in version 2.1.
- do_equals(self_2) virtual¶
- Parameters:
self_2 (
Modulemd.ModuleStream) – AModulemd.ModuleStreamobject.- Returns:
- Return type:
Checks if self_1 and self_2 are identical objects.
New in version 2.3.
- do_get_mdversion() virtual¶
- Returns:
The metadata version of this
Modulemd.ModuleStream.- Return type:
New in version 2.0.
- do_validate() virtual¶
- Returns:
Trueif theModulemd.ModuleStreampassed validation.Falseand sets error appropriately if validation fails.- Return type:
Verifies that all stored values are internally consistent and that the module is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents.
New in version 2.0.
Property Details¶
- Modulemd.ModuleStream.props.arch¶
-
The processor architecture of this module stream.
- Modulemd.ModuleStream.props.context¶
-
The context of this module stream. Distinguishes between streams with the same version but different dependencies due to module stream expansion.
- Modulemd.ModuleStream.props.mdversion¶
-
The metadata version of this ModuleStream object. Read-only.
- Modulemd.ModuleStream.props.module_name¶
- Name:
module-name- Type:
- Default Value:
- Flags:
The name of the module providing this stream.
- Modulemd.ModuleStream.props.stream_name¶
- Name:
stream-name- Type:
- Default Value:
- Flags:
The name of this module stream.