Modulemd.DefaultsV1¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Modulemd.DefaultsV1(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(module_name)¶
- Parameters:
module_name (
str
) – The name of the module to which these defaults apply.- Returns:
A newly-allocated
Modulemd.DefaultsV1
object.- Return type:
New in version 2.0.
- add_default_profile_for_stream(stream_name, profile_name, intent)¶
- Parameters:
stream_name (
str
) – The name of the module stream to which to add this default profile.profile_name (
str
) – The name of the default profile to add.intent (
str
orNone
) – The name of the system intent to add profile defaults to. IfNone
, this sets the generic fallback profiles for the stream. System intents are deprecated and calls with this non-None
argument will become void in the future.
Add a profile that will be installed for this stream if none are explicitly specified by the user. This function may be called any number of times for the same stream and will deduplicate input.
New in version 2.0.
- get_default_profiles_for_stream(stream_name, intent)¶
- Parameters:
- Returns:
A sorted #GStrv list of unique profiles to be installed by default for this stream.
None
, if this stream_name is not present in the defaults.- Return type:
[
str
]
New in version 2.0.
- get_default_stream(intent)¶
- Parameters:
intent (
str
orNone
) – The name of the system intent whose default stream will be retrieved. If leftNone
or the specified intent has no different default, it will return the generic default stream for this module. System intents are deprecated and this argument will be ignored in the future.- Returns:
The name of the default stream for this module.
- Return type:
New in version 2.0.
- get_streams_with_default_profiles(intent)¶
- Parameters:
intent (
str
orNone
) – The name of the system intent whose stream profiles will be retrieved. If leftNone
or the specified intent has no separate defaults for this module, it will return the generic stream profiles. System intents are deprecated and this argument will be ignored in the future.- Returns:
A sorted #GStrv list of unique stream names for which default profiles have been assigned.
- Return type:
[
str
]
New in version 2.0.
- remove_default_profiles_for_stream(stream_name, intent)¶
- Parameters:
stream_name (
str
) – The name of the module stream from which to remove default profiles.intent (
str
orNone
) – The name of the system intent from which to remove the profile defaults for this stream. System intents are deprecated and calls with this non-None
arugment will become void in the future.
Removes this stream from the list of profiles entirely. It will not appear in the output document.
New in version 2.0.
- set_default_stream(default_stream, intent)¶
- Parameters:
default_stream (
str
orNone
) – The name of the default stream for this module. IfNone
, it will remove the default stream.intent (
str
orNone
) – If non-None
, this indicates the system intent to apply this default stream. IfNone
, it will be added as common defaults. System intents are deprecated and calls with this non-None
argument will become void in the future.
Set the default stream for this module.
New in version 2.0.
- set_empty_default_profiles_for_stream(stream_name, intent)¶
- Parameters:
Sets the default profiles for stream_name to the empty set. When output to a file, it will appear as
stream_name: []
.New in version 2.0.